Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FaceLandmarks

Hierarchy

Implements

Index

Constructors

constructor

  • new FaceLandmarks(relativeFaceLandmarkPositions: Point[], imgDims: IDimensions, shift?: Point): FaceLandmarks
  • Parameters

    • relativeFaceLandmarkPositions: Point[]
    • imgDims: IDimensions
    • Default value shift: Point = new Point(0, 0)

    Returns FaceLandmarks

Properties

Protected _imgDims

_imgDims: Dimensions

Protected _positions

_positions: Point[]

Protected _shift

_shift: Point

Accessors

imageHeight

  • get imageHeight(): number
  • Returns number

imageWidth

  • get imageWidth(): number
  • Returns number

positions

  • get positions(): Point[]
  • Returns Point[]

relativePositions

  • get relativePositions(): Point[]
  • Returns Point[]

shift

  • get shift(): Point
  • Returns Point

Methods

align

  • Aligns the face landmarks after face detection from the relative positions of the faces bounding box, or it's current shift. This function should be used to align the face images after face detection has been performed, before they are passed to the face recognition net. This will make the computed face descriptor more accurate.

    Parameters

    • Optional detection: FaceDetection | Rect

      (optional) The bounding box of the face or the face detection result. If no argument was passed the position of the face landmarks are assumed to be relative to it's current shift.

    Returns Rect

    The bounding box of the aligned face.

forSize

  • forSize<T>(width: number, height: number): T
  • Type parameters

    Parameters

    • width: number
    • height: number

    Returns T

Protected getRefPointsForAlignment

  • getRefPointsForAlignment(): Point[]
  • Returns Point[]

shiftBy

  • shiftBy<T>(x: number, y: number): T
  • Type parameters

    Parameters

    • x: number
    • y: number

    Returns T

shiftByPoint

  • shiftByPoint<T>(pt: Point): T
  • Type parameters

    Parameters

    • pt: Point

    Returns T

Generated using TypeDoc