Package com.microblink.blinkid.entities.recognizers.templating.dewarpPolicies

# Class NoUpScalingDewarpPolicy

java.lang.Object
com.microblink.blinkid.entities.recognizers.templating.DewarpPolicy
com.microblink.blinkid.entities.recognizers.templating.dewarpPolicies.NoUpScalingDewarpPolicy

public final class NoUpScalingDewarpPolicy extends DewarpPolicy
No upscaling dewarp policy. Dewarp height will be calculated in a way that no part of image will be up-scaled. However, if dewarp height calculated in this way is larger than value defined by maxAllowedDewarpHeight, then maxAllowedDewarpHeight will be used for dewarp height, effectively scaling down the image. This policy is usually best for processor groups that use DEEP OCR, hologram detection or NN-based classification.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DEFAULT_MAX_ALLOWED_DEWARPED_HEIGHT`
  Default max allowed dewarp height used when using default constructor.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `NoUpScalingDewarpPolicy()`
  `NoUpScalingDewarpPolicy(int maxAllowedDewarpHeight)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getMaxAllowedDewarpHeight()`
  Returns the max allowed dewarp height as specified by this policy.
  `protected void`
  `setNativePolicy(long nativeProcessorContext)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### DEFAULT_MAX_ALLOWED_DEWARPED_HEIGHT

    public static final int DEFAULT_MAX_ALLOWED_DEWARPED_HEIGHT
    Default max allowed dewarp height used when using default constructor.
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### NoUpScalingDewarpPolicy

    public NoUpScalingDewarpPolicy()

  - ### NoUpScalingDewarpPolicy

    public NoUpScalingDewarpPolicy(@IntRange(from=1L,to=65535L) int maxAllowedDewarpHeight)
    Parameters:
      `maxAllowedDewarpHeight` - Max allowed dewarp height.

- ## Method Details

  - ### setNativePolicy

    protected void setNativePolicy(long nativeProcessorContext)
    Specified by:
      `setNativePolicy` in class `DewarpPolicy`

  - ### getMaxAllowedDewarpHeight

    public int getMaxAllowedDewarpHeight()
    Returns the max allowed dewarp height as specified by this policy.
    Returns:
      the max allowed dewarp height