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

# Class DPIBasedDewarpPolicy

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

public final class DPIBasedDewarpPolicy extends DewarpPolicy
DPI based dewarp policy. Dewarp height will be calculated based on actual physical size provided by the `com.microblink.blinkid.entities.detectors.quad.QuadWithSizeDetector` and requested DPI (dots per inch). This policy is usually best for processor groups that prepare image for output (e.g. `ImageReturnProcessor`).

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final int`
  `DEFAULT_DPI`
  Default DPI that will be used with default constructor

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DPIBasedDewarpPolicy()`
  `DPIBasedDewarpPolicy(int desiredDPI)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getDPI()`
  Returns the desired DPI as defined 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_DPI

    public static final int DEFAULT_DPI
    Default DPI that will be used with default constructor
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### DPIBasedDewarpPolicy

    public DPIBasedDewarpPolicy()

  - ### DPIBasedDewarpPolicy

    public DPIBasedDewarpPolicy(@IntRange(from=100L,to=400L) int desiredDPI)
    Parameters:
      `desiredDPI` - Desired DPI (dots per inch

- ## Method Details

  - ### setNativePolicy

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

  - ### getDPI

    public int getDPI()
    Returns the desired DPI as defined by this policy.
    Returns:
      the desired DPI