Atalasoft MobileImage API Reference
Public Member Functions | Protected Member Functions | List of all members
com.kofax.kmc.ken.engines.data.DetectionSettings Class Referenceabstract
Inheritance diagram for com.kofax.kmc.ken.engines.data.DetectionSettings:
com.kofax.kmc.ken.engines.data.CheckDetectionSettings com.kofax.kmc.ken.engines.data.DocumentDetectionSettings

Public Member Functions

 DetectionSettings (Point targetFrameCenter, double targetFrameAspectRatio, double targetFramePaddingPercent)
 Constructor creates a document detection setting object that has specified values. More...
 
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...
 
double getMinFillFraction ()
 Gets the minimum fill area as a fraction of the target frame. More...
 
void setMinFillFraction (double minFillFraction)
 Sets the minimum fill area as a fraction of the target frame. More...
 
double getMaxFillFraction ()
 Gets the maximum fill area as a fraction of the target frame. More...
 
void setMaxFillFraction (double maxFillFraction)
 Sets the maximum fill area as a fraction of the target frame. More...
 
double getMaxSkewAngle ()
 Gets the maximum angle the document can be rotated off from the target frame. More...
 
void setMaxSkewAngle (double maxSkewAngle)
 Sets the maximum angle the document can be rotated off from the target frame. More...
 
double getToleranceFraction ()
 Gets the maximum distance the document can be shifted from the target frame. More...
 
void setToleranceFraction (double toleranceFraction)
 Sets the maximum distance the document can be shifted from the target frame. More...
 

Protected Member Functions

 DetectionSettings ()
 Default constructor creates a detection setting object that has default values. More...
 
 DetectionSettings (DetectionSettings settings)
 

Detailed Description

A base class for configuration objects for controlling the guided detection driven by target frame.

The primary purpose of the settings object is to define properties of a rectangular target frame. The target frame is a rectangular area confined within the bounds of the image, and represents the the ideal area that should be covered by a document. Results returned from the document detector will provide adjustment guidance relative to the target frame.

A target frame is constructed from a center point, an aspect ratio, and a minimum edge padding. The size of the target frame is the largest possible rectangle that can be made without violating any of these constraints.

Additional settings properties set tolerances on the guidance available from a result object.

Constructor & Destructor Documentation

com.kofax.kmc.ken.engines.data.DetectionSettings.DetectionSettings ( )
inlineprotected

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

  • Center Point: null
  • Aspect Ratio: 0
  • Padding: 5
  • minFillFraction: 0.65
  • maxFillFraction: 1.3
  • maxSkewAngle: 10
  • toleranceFraction: 0.15
com.kofax.kmc.ken.engines.data.DetectionSettings.DetectionSettings ( DetectionSettings  settings)
inlineprotected

Copy constructor

Parameters
settingsthe settings object to copy from
com.kofax.kmc.ken.engines.data.DetectionSettings.DetectionSettings ( Point  targetFrameCenter,
double  targetFrameAspectRatio,
double  targetFramePaddingPercent 
)
inline

Constructor creates a document detection setting object that has specified values.

Parameters
targetFrameCenterSet the target rectangle center point. Should just be a point with in the bounds of the image height and width.
targetFrameAspectRatioSet the aspect ratio the target rectangle should have. Must be greater than 0.
targetFramePaddingPercentSet the padding around the target rectangle. must be greater than or equal to 0 and less then 100.

Member Function Documentation

Point com.kofax.kmc.ken.engines.data.DetectionSettings.getCenterPoint ( )
inline

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

Returns
Point
See also
setCenterPoint(android.graphics.Point)
double com.kofax.kmc.ken.engines.data.DetectionSettings.getMaxFillFraction ( )
inline

Gets the maximum fill area as a fraction of the target frame.

Returns
double
See also
setMaxFillFraction(double)
double com.kofax.kmc.ken.engines.data.DetectionSettings.getMaxSkewAngle ( )
inline

Gets the maximum angle the document can be rotated off from the target frame.

Returns
double
See also
setMaxSkewAngle(double)
double com.kofax.kmc.ken.engines.data.DetectionSettings.getMinFillFraction ( )
inline

Gets the minimum fill area as a fraction of the target frame.

Returns
double
See also
setMinFillFraction(double)
double com.kofax.kmc.ken.engines.data.DetectionSettings.getTargetFrameAspectRatio ( )
inline

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

Returns
double
See also
setTargetFrameAspectRatio(double)
double com.kofax.kmc.ken.engines.data.DetectionSettings.getTargetFramePaddingPercent ( )
inline

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)
double com.kofax.kmc.ken.engines.data.DetectionSettings.getToleranceFraction ( )
inline

Gets the maximum distance the document can be shifted from the target frame.

Returns
double
See also
setToleranceFraction(double)
void com.kofax.kmc.ken.engines.data.DetectionSettings.setCenterPoint ( Point  targetFrameCenter)
inline

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 com.kofax.kmc.ken.engines.data.DetectionSettings.setMaxFillFraction ( double  maxFillFraction)
inline

Sets the maximum fill area as a fraction of the target frame.

The maximum fill fraction puts an upper bound on what is considered an acceptable zoom level. If the area of a detected document is greater then the area of the target frame multiplied by the maximum fill fraction, guidance will suggest zooming out from the document. Setting a negative number is ignored.

The default value is 1.3.

void com.kofax.kmc.ken.engines.data.DetectionSettings.setMaxSkewAngle ( double  maxSkewAngle)
inline

Sets the maximum angle the document can be rotated off from the target frame.

The skew angle tolerance puts an upper bound on how far a document can be rotated clockwise or counter-clockwise relative to the target frame and still be considered acceptable. Angles of rotation greater than the tolerance will result in guidance to turn the document. Setting a negative number is ignored.

The default value is 10, specified in degrees.

Parameters
maxSkewAngle: double
void com.kofax.kmc.ken.engines.data.DetectionSettings.setMinFillFraction ( double  minFillFraction)
inline

Sets the minimum fill area as a fraction of the target frame.

The minimum fill fraction puts a lower bound on what is considered an acceptable zoom level. If the area of a detected document is less then the area of the target frame multiplied by the minimum fill fraction, guidance will suggest zooming in on the document. Setting a negative number is ignored.

The default value is 0.65.

Parameters
minFillFraction: double
void com.kofax.kmc.ken.engines.data.DetectionSettings.setTargetFrameAspectRatio ( double  targetFrameAspectRatio)
inline

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

Aspect ratio between 0 and 1 or negative is not recommended. It can result in erroneous detection of target frame. The aspect ratio is presented in the format of longEdge/shortEdge, and is used to construct the largest target frame. If the targetFrameAspectRatio is set to 0, then it will be automatically reset to an image aspect ratio.

The default value is 0.

Parameters
targetFrameAspectRatio: double
void com.kofax.kmc.ken.engines.data.DetectionSettings.setTargetFramePaddingPercent ( double  paddingPercent)
inline

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
void com.kofax.kmc.ken.engines.data.DetectionSettings.setToleranceFraction ( double  toleranceFraction)
inline

Sets the maximum distance the document can be shifted from the target frame.

The movement tolerance puts an upper bound on how far a document can be shifted from the target frame and still be considered acceptable. The tolerance is specified as a fraction of the target size, and the comparison is made between the center of the target frame and the center of the detected document bounds. Setting a negative number is ignored.

The default tolerance value is 0.15.

Parameters
toleranceFraction: double

The documentation for this class was generated from the following file:
Untitled Document © 2016 Atalasoft, Inc., 116 Pleasant St, Suite 321, Easthampton, MA 01027, U.S.A. All rights reserved. Use is subject to license terms.