Kofax Mobile SDK API Reference
|
Public Member Functions | |
SelfieDetectionSettings () | |
Constructor creates a selfie detection setting object with predefined values. More... | |
SelfieDetectionSettings (SelfieDetectionSettings settings) | |
Constructor creates a selfie detection setting object that has specified values. More... | |
void | setMinimumFaceSize (double minimumFaceSize) |
double | getMinimumFaceSize () |
Point | getCenterPoint () |
void | setCenterPoint (Point targetFrameCenter) |
double | getTargetFrameAspectRatio () |
void | setTargetFrameAspectRatio (double targetFrameAspectRatio) |
double | getTargetFramePaddingPercent () |
void | setTargetFramePaddingPercent (double paddingPercent) |
double | getFaceAngleTolerance () |
void | setFaceAngleTolerance (double faceAngleTolerance) |
A configuration objects for controlling the guided detection driven by target frame.
The purpose of the settings object is to define properties of a rectangular target frame, and the minFaceSize that the face should be occupied in the display. 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 face.
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.
Constructor creates a selfie detection setting object with predefined values.
SelfieDetectionSettings | ( | SelfieDetectionSettings | settings | ) |
Constructor creates a selfie detection setting object that has specified values.
Point getCenterPoint | ( | ) |
Gets the center point within the image of the target frame.
double getFaceAngleTolerance | ( | ) |
Returns the minimum rotation of the face about the vertical axis of the image.
double getMinimumFaceSize | ( | ) |
Returns the minFaceSize
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 | ) |
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 setFaceAngleTolerance | ( | double | faceAngleTolerance | ) |
The face angle required to detect the face about vertical axis of the Image. The default value is 15. range is [0 to 60]. The values other than the given range will be ignored.
faceAngleTolerance |
void setMinimumFaceSize | ( | double | minimumFaceSize | ) |
the smallest head size to search for relative to the size of the target frame, in the range of 0.0 and 1.0. For example, a setting of 0.5 would indicate that detected face need to fill at least half of the target frame. The Default value is 0.35, the values other than the given range will be ignored.
minimumFaceSize | Sets the smallest desired face size, expressed as a proportion of the area of the head to the area of the target frame. |
void setTargetFrameAspectRatio | ( | double | targetFrameAspectRatio | ) |
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 | ) |
Values will be clamped to the range [0-50]. The default value is 15. 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 |