Kofax Mobile SDK API Reference
Public Member Functions | List of all members
SelfieDetectionSettings Class 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)
 

Detailed Description

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 & Destructor Documentation

Constructor creates a selfie detection setting object with predefined values.

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

Member Function Documentation

Point getCenterPoint ( )

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

Returns
Point
See also
setCenterPoint(Point)
double getFaceAngleTolerance ( )

Returns the minimum rotation of the face about the vertical axis of the image.

Returns
double
See also
setFaceAngleTolerance(double)
double getMinimumFaceSize ( )

Returns the minFaceSize

Returns
the minFaceSize
double getTargetFrameAspectRatio ( )

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

Returns
double
See also
setTargetFrameAspectRatio(double)
double getTargetFramePaddingPercent ( )

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)
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.

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

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

Parameters
minimumFaceSizeSets 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.

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

  • 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

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.