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

Classes

enum  DocumentEdgeDetection
 An enumeration containing the possible edge detection algorithms. More...
 

Public Member Functions

 DocumentDetectionSettings ()
 Default constructor creates a document detection setting object that has default values. More...
 
 DocumentDetectionSettings (DocumentDetectionSettings detectionSettings)
 
 DocumentDetectionSettings (DetectionSettings detectionSettings)
 
double getShortEdgeThreshold ()
 
void setShortEdgeThreshold (double shortEdgeThreshold)
 
double getLongEdgeThreshold ()
 
void setLongEdgeThreshold (double longEdgeThreshold)
 
DocumentEdgeDetection getEdgeDetection ()
 
void setEdgeDetection (DocumentEdgeDetection edgeDetection)
 
- 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 DocumentDetector object.

Constructor & Destructor Documentation

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

  • Center Point: null
  • Aspect Ratio: 0
  • Padding: 5
  • minFillFraction: 0.2
  • maxFillFraction: 1.3
  • maxSkewAngle: 10
  • toleranceFraction: 0.15
  • shortEdgeThreshold: 0.85
  • longEdgeThreshold: 0.85
  • edgeDetection: GPU_BASED

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

Parameters
detectionSettingsthe settings object to copy from

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

Parameters
detectionSettingsthe settings object to copy from

Member Function Documentation

DocumentEdgeDetection getEdgeDetection ( )

Returns edge detection algorithm.

Edge detection algorithm defines a set of techniques used for document bounds detection. The default value is GPU.

Returns
edge detection algorithm as DocumentEdgeDetection value
See also
setEdgeDetection(DocumentEdgeDetection)
DocumentEdgeDetection
double getLongEdgeThreshold ( )

Returns the minimum size threshold for the long axis of the image.

This property is a percent of the size of the target frame. The valid range is [0 - 1]. The default value is 0.85.

This property specifies the minimum size of the document that spans the long axis of image. If the detected document is rotated, it will be aligned to the closest 90 degree orientation before any comparison is made.

Returns
long edge threshold as double value
See also
setLongEdgeThreshold(double)
double getShortEdgeThreshold ( )

Returns the minimum document size threshold for the short axis of the image.

This property is a percent of the size of the target frame. The valid range is [0 - 1]. The default value is 0.85.

This property specifies the minimum size of the document that spans the short axis of the image. If the detected document is rotated in the preview, it will be aligned to the closest 90 degree orientation before any comparison is made.

Returns
short edge threshold as double value
See also
setShortEdgeThreshold(double)
void setEdgeDetection ( DocumentEdgeDetection  edgeDetection)

Sets edge detection algorithm.

Edge detection algorithm defines a set of techniques used for document bounds detection. The default value is GPU.

Parameters
edgeDetection: DocumentEdgeDetection
See also
DocumentEdgeDetection
void setLongEdgeThreshold ( double  longEdgeThreshold)

The minimum document size threshold for the long axis of the image.

Note: When both are set, this property is used in conjunction with setShortEdgeThreshold(double) with an OR operation to determine when edge threshold is met.

This property is a percent of the size of the target frame. The valid range is [0 - 1]. Values outside this range will throw IllegalArgumentException. The default value is 0.85.

This property specifies the minimum size of the document that spans the long axis of image. If the detected document is rotated, it will be aligned to the closest 90 degree orientation before any comparison is made.

Parameters
longEdgeThreshold: double
Exceptions
IllegalArgumentException
See also
setShortEdgeThreshold(double)
void setShortEdgeThreshold ( double  shortEdgeThreshold)

The minimum document size threshold for the short axis of the image.

Note: When both are set, this property is used in conjunction with setLongEdgeThreshold(double) with an OR operation to determine when edge threshold is met.

This property is a percent of the size of the target frame. The valid range is [0 - 1]. Values outside this range will throw IllegalArgumentException. The default value is 0.85.

This property specifies the minimum size of the document that spans the short axis of the image. If the detected document is rotated in the preview, it will be aligned to the closest 90 degree orientation before any comparison is made.

Parameters
shortEdgeThreshold: double
Exceptions
IllegalArgumentException
See also
setLongEdgeThreshold(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.