Options

struct Options

Selfie capture options.

  • Minimum face capture overlay width threshold percentage, represented as a value between 0.0 and 1.0. Default is 0.6.

    A minimum face width of 0.6 (60%) means that a scanned face must be greater than 60% of the face capture overlay width.

    Declaration

    Swift

    public var minFaceWidth: Float
  • Minimum eye open probability percentage, represented as a value between 0.0 and 1.0. Default is 0.4.

    If a user is detected as closing one or both of their eyes, they will be prompted to open them.

    Declaration

    Swift

    public var eyeOpenProbability: Float
  • Minimum captured face angle from vertical, in degrees. Default is -10.

    When a user attempts to capture their face while tilting their head an angle beyond this threshold, they will be prompted to straighten their head.

    Declaration

    Swift

    public var minHeadEulerAngle: Float
  • Maximum captured face angle from vertical, in degrees. Default is -10.

    When a user attempts to capture their face while tilting their head an angle beyond this threshold, they will be prompted to straighten their head.

    Declaration

    Swift

    public var maxHeadEulerAngle: Float
  • Minimum nose height percentage, relative to the height of the face, represented as a value between 0.0 and 1.0. Default is 0.48.

    With a minimum nose height percentage of 48%, the end of a user’s nose can be detected within 2% of the total face height above the center point.

    If a user’s nose is too height, they will be prompted to move their face down.

    Declaration

    Swift

    public var minRelativeNoseHeight: Float
  • Maximum nose height percentage, relative to the height of the face, represented as a value between 0.0 and 1.0. Default is 0.67.

    With a maximum nose height percentage of 67%, the end of a user’s nose can be detected within 17% of the total face height below the center point.

    If a user’s nose is too low, they will be prompted to move their face up.

    Declaration

    Swift

    public var maxRelativeNoseHeight: Float
  • Hat and glasses detection confidence threshold, represented as a value between 0.0 and 1.0. Default is 0.79.

    If a user is detected as wearing a hat or glasses, they will be prompted to remove them.

    Declaration

    Swift

    public var labelsConfidenceThreshold: Float
  • Face mask detection probability threshold percentage, represented as a value between 0.0 and 1.0. Default is 0.79.

    Declaration

    Swift

    public var faceMaskProbabilityThreshold: Float
  • Live face detection probability threshold percentage, represented as a value between 0.0 and 1.0. Default is 0.9.

    If a user is detected as not having a “live face” the face capture will fail, and the user will be prompted to retry or cancel.

    Declaration

    Swift

    public var liveFaceProbabilityThreshold: Float
  • Consecutive fake face limit count. Default is 15.

    Declaration

    Swift

    public var consecutiveFakeFaceLimit: Int
  • Maximum percentage of pixels with a light intensity over the threshold, represented as a value between 0.0 and 1.0. Default is 0.05.

    Declaration

    Swift

    public var lightIntensityThreshold: Float
  • Minimum focus threshold percentage, represented as a value between 0.0 and 1.0. Default is 0.2.

    Declaration

    Swift

    public var focusThreshold: Float
  • Whether or not to display debug information during capture. Default is false.

    Declaration

    Swift

    public var isDebugMode: Bool
  • Whether or not to always try to capture in 4K. Default is false.

    Declaration

    Swift

    public var capture4K: Bool
  • Whether or not to upload face data to the Ground Truth Engine (GTE) service. Default is true.

    Declaration

    Swift

    public var uploadFaceData: Bool
  • Whether or not to display an instruction screen to the user before initiating capture. Default is true.

    Declaration

    Swift

    public var enableInstructionScreen: Bool
  • Selife capture oval scale multiplier represented as a value between 0.5 and 1.0. Default is 0.7.

    Declaration

    Swift

    public var ovalScaleMultiplier: Float { get set }
  • Selfie Capture camera position. Default is front.

    Declaration

    Swift

    public var cameraPosition: AVCaptureDevice.Position
  • Whether or not to show the toggle camera button. Default is false.

    Declaration

    Swift

    public var showToggleCamera: Bool