Kofax Mobile SDK API Reference
Public Member Functions | List of all members
FixedAspectRatioDetectionSettings Class Reference

Public Member Functions

 FixedAspectRatioDetectionSettings ()
 Default constructor creates a document detection setting object that has default values. More...
 
 FixedAspectRatioDetectionSettings (FixedAspectRatioDetectionSettings settings)
 
Point getCenterPoint ()
 Gets the center point within the image of the target frame. More...
 
void setCenterPoint (Point targetFrameCenter)
 Sets the center point within the image of the target frame. More...
 
double getTargetFrameAspectRatio ()
 Gets the aspect ratio of the rectangular frame that should match the document being searched. More...
 
void setTargetFrameAspectRatio (double targetFrameAspectRatio)
 Sets the aspect ratio of the rectangular frame that should match the document being searched. More...
 
double getTargetFramePaddingPercent ()
 Gets the minimum padding in percent length to be maintained between the edges of the target frame and image. More...
 
void setTargetFramePaddingPercent (double paddingPercent)
 Sets the minimum padding in percent length to be maintained between the edges of the target frame and image. More...
 

Detailed Description

A configuration object for controlling the FixedAspectRatioDetector object.

Constructor & Destructor Documentation

Default constructor creates a document detection setting object that has default values.

  • Center Point: null
  • Aspect Ratio: 2.125 / 3.375
  • Padding: 8

Copy constructor. Creates a copy object for the document detection settings.

Parameters
settingsthe settings object to copy from

Member Function Documentation

Point getCenterPoint ( )

Gets the center point within the image of the target frame.

Returns
Point
See also
setCenterPoint(android.graphics.Point)
double getTargetFrameAspectRatio ( )

Gets the aspect ratio of the rectangular frame that should match the document being searched.

Returns
double
See also
setTargetFrameAspectRatio(double)
double getTargetFramePaddingPercent ( )

Gets the minimum padding in percent length to be maintained between the edges of the target frame and image.

Returns
double
See also
setTargetFramePaddingPercent(double)
void setCenterPoint ( Point  targetFrameCenter)

Sets the center point within the image of the target frame.

The center point is any point within the image that the target frame will be constructed around and centered over. This value will be clamped to the valid area of the image being searched, and by default is set to the center of the image.

Parameters
targetFrameCenter: Point
void setTargetFrameAspectRatio ( double  targetFrameAspectRatio)

Sets the aspect ratio of the rectangular frame that should match the document being searched.

The aspect ratio is used to construct the target frame that should match the document being searched. If targetFrameAspectRatio > 1, the long edge of the target frame will align with the long edge of the camera preview. If 0 < targetFrameAspectRatio < 1, the long edge of the target frame will align with the short edge of the camera preview.

If the targetFrameAspectRatio is set to 0, then it will be automatically reset to an image aspect ratio.
Setting negative values has the same effect as if 0 was set.

The default value is 0.

Parameters
targetFrameAspectRatio: double
void setTargetFramePaddingPercent ( double  paddingPercent)

Sets the minimum padding in percent length to be maintained between the edges of the target frame and image.

Values will be clamped to the range [0-50]. The default value is 5. Also, note that there is a much lower operational bound to what the padding percent could be set to behave well. For example:

  • Given detection settings with a frame center at the center of the image, and a personal check aspect ratio, the constructed frame will fill the width of the image, leaving a space on the left and right equal to the padding percent of the image width.
  • Given detection settings with a frame center shifted to the left of the image center, the gap on the right side of the constructed frame will exceed the gap on the left.
Parameters
paddingPercent: double

The documentation for this class was generated from the following file:
Untitled Document © 2018 Kofax, Inc. All rights reserved. Use is subject to license terms.