Kofax Mobile SDK API 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... | |
A configuration object for controlling the FixedAspectRatioDetector object.
Default constructor creates a document detection setting object that has default values.
Copy constructor. Creates a copy object for the document detection settings.
settings | the settings object to copy from |
Point getCenterPoint | ( | ) |
Gets the center point within the image of the target frame.
double getTargetFrameAspectRatio | ( | ) |
Gets the aspect ratio of the rectangular frame that should match the document being searched.
double getTargetFramePaddingPercent | ( | ) |
Gets the minimum padding in percent length to be maintained between the edges of the target frame and image.
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.
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.
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:
paddingPercent | : double |