Kofax Mobile SDK API Reference
Public Member Functions | List of all members
CheckDetectionSettings Class Reference
Inheritance diagram for CheckDetectionSettings:
DetectionSettings

Public Member Functions

 CheckDetectionSettings ()
 Default constructor creates a check detection setting object that has default values. More...
 
 CheckDetectionSettings (DetectionSettings settings)
 
 CheckDetectionSettings (CheckDetectionSettings settings)
 
 CheckDetectionSettings (Point targetFrameCenter, double targetFrameAspectRatio, double targetFramePaddingPercent)
 Constructor creates a check detection setting object that has specified values. More...
 
CheckSide getSide ()
 
void setSide (CheckSide side)
 
double getTargetFrameAspectRatio ()
 Gets the aspect ratio of the rectangular frame that should match the passport being searched. More...
 
void setTargetFrameAspectRatio (double targetFrameAspectRatio)
 Sets the aspect ratio of the rectangular frame that should match the document being searched. More...
 
void setAspectRatioFraction (double aspectRatioFraction)
 
double getAspectRatioFraction ()
 
- Public Member Functions inherited from DetectionSettings
 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...
 

Additional Inherited Members

- Protected Member Functions inherited from DetectionSettings
 DetectionSettings ()
 Default constructor creates a detection setting object that has default values. More...
 
 DetectionSettings (DetectionSettings settings)
 

Detailed Description

A configuration object for controlling the CheckDetector object.

Note
Target frame aspect ratio is set for Personal Check by default (6.0 / 2.75 ≈ 2.18). For Business Check use: (9.25 / 3.67) ≈ 2.52

Constructor & Destructor Documentation

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

  • Center Point: null
  • Aspect Ratio: ≈ 2.18
  • Padding: 5
  • minFillFraction: 0.65
  • maxFillFraction: 1.3
  • maxSkewAngle: 10
  • toleranceFraction: 0.15
  • side: front
  • aspectRatioFraction: 0

Constructor that copies base settings defined in DetectionSettings class and sets all other settings to their default values.

Parameters
settingsthe settings object to copy from

Copy constructor.

Parameters
settingsthe settings object to copy from
CheckDetectionSettings ( Point  targetFrameCenter,
double  targetFrameAspectRatio,
double  targetFramePaddingPercent 
)

Constructor creates a check 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

double getAspectRatioFraction ( )

Returns the tolerance fraction value used for verification of aspect ratio for detected check.

Returns
the fraction value
See also
setAspectRatioFraction(double)
CheckSide getSide ( )

Returns the check side.

Returns
the check side
double getTargetFrameAspectRatio ( )

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

Returns
double
See also
setTargetFrameAspectRatio(double)
void setAspectRatioFraction ( double  aspectRatioFraction)

The maximum fractional error allowed between the target frame aspect ratio defined in setTargetFrameAspectRatio(double) and aspect ratio of detected check. Used to obtain the acceptable aspect ratio during detection.

This setting is applicable only for back side of check since for front side aspect ratio is calculated based on MICR.

The value 0.1 assumes that error of aspect ratio will be within 10%.

Default value 0 means that verification of aspect ratio for detected check is disabled.

Parameters
aspectRatioFractionthe fraction value
void setSide ( CheckSide  side)

Sets the side of a check that needs to be detected.

Parameters
sidethe check side
void setTargetFrameAspectRatio ( double  targetFrameAspectRatio)

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

The aspect ratio should be in the format of longEdge/shortEdge (i.e. targetFrameAspectRatio >= 1). The long edge of the target frame is align with the long edge of the camera preview or image. If 0 < targetFrameAspectRatio < 1 it will be inverted. For example: the ratio 0.4 (or 2.0/5.0) will be inverted to 2.5 (5.0/2.0).

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 6.0 / 2.75 ≈ 2.18.

Parameters
targetFrameAspectRatio: 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.