VerIDSessionSettings

Base class for session settings

Package com.appliedrec.verid.core2

public class VerIDSessionSettings

Implements

Methods

getShowResult

Introduced in version 1.0.0

public getShowResult()

See whether the session will show the result to the user before reporting back to your activity or fragment.

Returns

boolean
true if the session will show the result

setShowResult

Introduced in version 1.0.0

public setShowResult(boolean)

Set whether the session will show the result to the user before reporting back to your activity or fragment.

Parameters

showResult boolean
{@literal true} to show result

getExpiryTime

Introduced in version 1.0.0

public getExpiryTime()

Get the session expiry time.

If the session fails to collect the requested number of results in the given time period the session will return with an error.

Returns

long
Expiry time in milliseconds

See also

setExpiryTime

Introduced in version 1.0.0

public setExpiryTime(long)

Set the session expiry time.

If the session fails to collect the requested number of results in the given time period the session will return with an error.

Parameters

expiryTime long
Expiry time in milliseconds

See also

getNumberOfResultsToCollect

Introduced in version 1.0.0

public getNumberOfResultsToCollect()

Get the number of face detection results will be returned by the session.

Returns

int
Number of results

setNumberOfResultsToCollect

Introduced in version 1.0.0

public setNumberOfResultsToCollect(int)

Set the number of face detection results to collect in the session.

This will affect the behaviour of the session. For example, setting the value to 2 or greater will enable liveness detection on authentication and liveness detection sessions. Setting the value on a registration session will determine how many faces will be registered for the user.

Parameters

numberOfResultsToCollect int
Number of results to collect

getMaxRetryCount

Introduced in version 1.0.0

public getMaxRetryCount()

Get the number of times the user will be allowed to retry the session before finishing.

The user will be prompted to retry only in specific circumstances: when they move too far in the requested direction, when they move in the opposite direction or when they move outside the view of the camera. Other session failures will finish the session right away.

If the retry count is greater than 0 the user will see a dialog explaining the failure and offering tips on how to get the best result. After the user retries the indicated number of times the session will return with a failure.

Returns

int
The number of times the user will be permitted to retry the session

setMaxRetryCount

Introduced in version 1.0.0

public setMaxRetryCount(int)

Set the number of times the user will be allowed to retry the session before finishing.

The user will be prompted to retry only in specific circumstances: when they move too far in the requested direction, when they move in the opposite direction or when they move outside the view of the camera. Other session failures will finish the session right away.

If the retry count is greater than 0 the user will see a dialog explaining the failure and offering tips on how to get the best result. After the user retries the indicated number of times the session will return with a failure.

Parameters

maxRetryCount int
The number of times the user will be permitted to retry the session

getIncludeFaceTemplatesInResult

Introduced in version 1.0.0

public getIncludeFaceTemplatesInResult()

Returns

boolean
true if the session result will include face templates that can be used for face recognition.

See also

setIncludeFaceTemplatesInResult

Introduced in version 1.0.0

public setIncludeFaceTemplatesInResult(boolean)

Set whether to include face templates in the session result.

If you are going to use the collected faces for face recognition set this to true. Otherwise setting it to false will speed up the processing in the session. This may be useful if all you need to do is to detect liveness.

Note that calling this method on registration and authentication sessions will have no effect. Both have this parameter always set to true.

Parameters

includeFaceTemplatesInResult boolean
{@literal true} to extract and return face templates for face recognition

getYawThreshold

Introduced in version 1.0.0

public getYawThreshold()

Get horizontal (yaw) threshold where face is considered to be at an angle.

For example, a value of 15 indicates that a face with yaw -15 and below is oriented left and a face with yaw 15 or above is oriented right.

Returns

float
Yaw threshold

See also

setYawThreshold

Introduced in version 1.0.0

public setYawThreshold(float)

Set horizontal (yaw) threshold where face is considered to be at an angle.

For example, a value of 15 indicates that a face with yaw -15 and below is oriented left and a face with yaw 15 or above is oriented right.

Parameters

yawThreshold float
Yaw threshold

See also

getPitchThreshold

Introduced in version 1.0.0

public getPitchThreshold()

Get vertical (pitch) threshold where face is considered to be at an angle.

For example, a value of 15 indicates that a face with pitch -15 and below is oriented up and a face with pitch 15 or above is oriented down.

Returns

float
Pitch threshold

See also

setPitchThreshold

Introduced in version 1.0.0

public setPitchThreshold(float)

Set vertical (pitch) threshold where face is considered to be at an angle.

For example, a value of 15 indicates that a face with pitch -15 and below is oriented up and a face with pitch 15 or above is oriented down.

Parameters

pitchThreshold float
Pitch threshold

See also

getFaceBoundsFraction

Introduced in version 1.0.0

public getFaceBoundsFraction()

Get the size of the face guide oval as a fraction of the view size.

Returns

android.graphics.PointF
Fraction of the view width and height that represents the size of the face oval in the view.

See also

setFaceBoundsFraction

Introduced in version 1.0.0

public setFaceBoundsFraction(PointF)

Set the size of the face guide oval as a fraction of the view size.

If the container view orientation is horizontal then the y parameter will be fraction of the view height.

If the container view orientation is vertical then the x parameter will be fraction of the view width.

Parameters

faceBoundsFraction android.graphics.PointF
Fraction of the container view

See also

getPauseDuration

Introduced in version 1.0.0

public getPauseDuration()

When the face is fixed the face detection will pause to allow enough time for the user to read the on-screen instructions. The default pause is 1500 (1.5 seconds). Decreasing the pause time will shorten the session but may lead to a frustrating user experience if the user isn't allowed enough time to read the prompts.

Returns

long
Pause time in milliseconds

See also

getFaceBufferSize

Introduced in version 1.0.0

public getFaceBufferSize()

To reduce the possibility of an unwanted face accidentally being considered in the session the service buffers a number of faces and checks that their bounds are within a given range of each other. Decreasing the value will speed up the session but introduce the possibility of a passing face being detected and considered for recognition. Default value is 4.

Returns

int
Size of the face buffer

See also

setFaceBufferSize

Introduced in version 1.0.0

public setFaceBufferSize(int)

Parameters

faceBufferSize int
Size of the face buffer

See also