Class 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 Detail

      • 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 Detail

      • NoUpScalingDewarpPolicy

        public NoUpScalingDewarpPolicy()
      • NoUpScalingDewarpPolicy

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

      • 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