Dlib FaceLandmark Detector  1.3.4
Enox Software
Classes | Public Member Functions | Protected Member Functions | List of all members
DlibFaceLandmarkDetector.FaceLandmarkDetector Class Reference

Face landmark detector. More...

Inheritance diagram for DlibFaceLandmarkDetector.FaceLandmarkDetector:
DlibFaceLandmarkDetector.DisposableDlibObject DlibFaceLandmarkDetector.DisposableObject

Classes

class  RectDetection
 

Public Member Functions

 FaceLandmarkDetector (string shapePredictorFilePath)
 
 FaceLandmarkDetector (string objectDetectorFilePath, string shapePredictorFilePath)
 
void SetImage (Texture2D texture2D)
 
void SetImage (WebCamTexture webCamTexture)
 
void SetImage (WebCamTexture webCamTexture, Color32[] bufferColors)
 
void SetImage (IntPtr intPtr, int width, int height, int bytesPerPixel)
 
void SetImage (IntPtr intPtr, int width, int height, int bytesPerPixel, bool flip)
 
void SetImage< T > (T[] array, int width, int height, int bytesPerPixel)
 
void SetImage< T > (T[] array, int width, int height, int bytesPerPixel, bool flip)
 
List< Rect > Detect ()
 
List< Rect > Detect (double adjust_threshold)
 
List< RectDetectionDetectRectDetection ()
 
List< RectDetectionDetectRectDetection (double adjust_threshold)
 
double [] DetectArray ()
 
double [] DetectArray (double adjust_threshold)
 
List< Vector2 > DetectLandmark (double left, double top, double width, double height)
 
List< Vector2 > DetectLandmark (Rect rect)
 
double [] DetectLandmarkArray (double left, double top, double width, double height)
 
double [] DetectLandmarkArray (Rect rect)
 
bool IsAllPartsInRect ()
 
long GetShapePredictorNumParts ()
 
long GetShapePredictorNumFeatures ()
 
void DrawDetectResult (Texture2D texture2D, int r, int g, int b, int a, int thickness, bool updateMipmaps=false, bool makeNoLongerReadable=false)
 
void DrawDetectResult (IntPtr intPtr, int width, int height, int bytesPerPixel, int r, int g, int b, int a, int thickness)
 
void DrawDetectResult (IntPtr intPtr, int width, int height, int bytesPerPixel, bool flip, int r, int g, int b, int a, int thickness)
 
void DrawDetectResult< T > (T[] array, int width, int height, int bytesPerPixel, int r, int g, int b, int a, int thickness)
 
void DrawDetectResult< T > (T[] array, int width, int height, int bytesPerPixel, bool flip, int r, int g, int b, int a, int thickness)
 
void DrawDetectLandmarkResult (Texture2D texture2D, int r, int g, int b, int a, bool updateMipmaps=false, bool makeNoLongerReadable=false)
 
void DrawDetectLandmarkResult (IntPtr intPtr, int width, int height, int bytesPerPixel, int r, int g, int b, int a)
 
void DrawDetectLandmarkResult (IntPtr intPtr, int width, int height, int bytesPerPixel, bool flip, int r, int g, int b, int a)
 
void DrawDetectLandmarkResult< T > (T[] array, int width, int height, int bytesPerPixel, int r, int g, int b, int a)
 
void DrawDetectLandmarkResult< T > (T[] array, int width, int height, int bytesPerPixel, bool flip, int r, int g, int b, int a)
 
- Public Member Functions inherited from DlibFaceLandmarkDetector.DisposableObject
void Dispose ()
 
void ThrowIfDisposed ()
 

Protected Member Functions

override void Dispose (bool disposing)
 
- Protected Member Functions inherited from DlibFaceLandmarkDetector.DisposableDlibObject
 DisposableDlibObject ()
 
 DisposableDlibObject (IntPtr ptr)
 
 DisposableDlibObject (bool isEnabledDispose)
 
 DisposableDlibObject (IntPtr ptr, bool isEnabledDispose)
 
- Protected Member Functions inherited from DlibFaceLandmarkDetector.DisposableObject
 DisposableObject ()
 
 DisposableObject (bool isEnabledDispose)
 

Additional Inherited Members

- Properties inherited from DlibFaceLandmarkDetector.DisposableObject
bool IsDisposed [get, protected set]
 
bool IsEnabledDispose [get, set]
 

Detailed Description

Face landmark detector.

Constructor & Destructor Documentation

◆ FaceLandmarkDetector() [1/2]

DlibFaceLandmarkDetector.FaceLandmarkDetector.FaceLandmarkDetector ( string  shapePredictorFilePath)

Initializes a new instance of the FaceLandmarkDetector class.


This instance uses default frontal face detector.

ObjectDetector is initialized in such a code. frontal_face_detector face_detector; face_detector = get_frontal_face_detector();

ShapePredictor is initialized in such a code. shape_predictor sp; deserialize(shape_predictor_filename) >> sp;

Parameters
shapePredictorFilePath

◆ FaceLandmarkDetector() [2/2]

DlibFaceLandmarkDetector.FaceLandmarkDetector.FaceLandmarkDetector ( string  objectDetectorFilePath,
string  shapePredictorFilePath 
)

Initializes a new instance of the FaceLandmarkDetector class.

ObjectDetector is initialized in such a code. if(object_detector_filename != null){ object_detector<scan_fhog_pyramid<pyramid_down<6>>> simple_detector; deserialize(object_detector_filename) >> simple_detector; }else{ frontal_face_detector face_detector; face_detector = get_frontal_face_detector(); }

ShapePredictor is initialized in such a code. shape_predictor sp; deserialize(shape_predictor_filename) >> sp;

Parameters
objectDetectorFilePath
shapePredictorFilePath

Member Function Documentation

◆ Detect() [1/2]

List<Rect> DlibFaceLandmarkDetector.FaceLandmarkDetector.Detect ( )

Detects Objects.

Returns
List<Rect> detected list of object's rect.

◆ Detect() [2/2]

List<Rect> DlibFaceLandmarkDetector.FaceLandmarkDetector.Detect ( double  adjust_threshold)

Detects Objects.

Parameters
adjust_threshold
Returns
List<Rect> detected list of object's rect.

◆ DetectArray() [1/2]

double [] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectArray ( )

Detects Objects.

Returns
double[] detected object's data.[left_0, top_0, width_0, height_0, detection_confidence_0, weight_index_0, left_1, top_1, width_1, height_1, detection_confidence_1, weight_index_1, ...]

◆ DetectArray() [2/2]

double [] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectArray ( double  adjust_threshold)

Detects Objects.

Parameters
adjust_threshold
Returns
double[] detected object's data.[left_0, top_0, width_0, height_0, detection_confidence_0, weight_index_0, left_1, top_1, width_1, height_1, detection_confidence_1, weight_index_1, ...]

◆ DetectLandmark() [1/2]

List<Vector2> DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmark ( double  left,
double  top,
double  width,
double  height 
)

Detects Object Landmark.

Parameters
left
top
width
height
Returns
List<Vector2> detected Vector2 list of object landmark.

◆ DetectLandmark() [2/2]

List<Vector2> DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmark ( Rect  rect)

Detects Object Landmark.

Parameters
rect
Returns
List<Vector2> detected Vector2 list of object landmark.

◆ DetectLandmarkArray() [1/2]

double [] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmarkArray ( double  left,
double  top,
double  width,
double  height 
)

Detects Object Landmark.

Parameters
left
top
width
height
Returns
double[] detected object landmark data.[x_0, y_0, x_1, y_1, ...]

◆ DetectLandmarkArray() [2/2]

double [] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmarkArray ( Rect  rect)

Detects Object Landmark.

Parameters
rect
Returns
double[] detected object landmark data.[x_0, y_0, x_1, y_1, ...]

◆ DetectRectDetection() [1/2]

List<RectDetection> DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectRectDetection ( )

Detects Objects.

Returns
List<RectDetection> detected list of object's RectDetection.

◆ DetectRectDetection() [2/2]

List<RectDetection> DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectRectDetection ( double  adjust_threshold)

Detects Objects.

Parameters
adjust_threshold
Returns
List<RectDetection> detected list of object's RectDetection.

◆ Dispose()

override void DlibFaceLandmarkDetector.FaceLandmarkDetector.Dispose ( bool  disposing)
protectedvirtual

◆ DrawDetectLandmarkResult() [1/3]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult ( Texture2D  texture2D,
int  r,
int  g,
int  b,
int  a,
bool  updateMipmaps = false,
bool  makeNoLongerReadable = false 
)

Draws Detect Landmark Result.

Parameters
texture2D
r
g
b
a

◆ DrawDetectLandmarkResult() [2/3]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult ( IntPtr  intPtr,
int  width,
int  height,
int  bytesPerPixel,
int  r,
int  g,
int  b,
int  a 
)

Draws Detect Landmark Result.

Parameters
intPtr
width
height
bytesPerPixel1 ,3 or 4
r
g
b
a

◆ DrawDetectLandmarkResult() [3/3]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult ( IntPtr  intPtr,
int  width,
int  height,
int  bytesPerPixel,
bool  flip,
int  r,
int  g,
int  b,
int  a 
)

Draws Detect Landmark Result.

Parameters
intPtr
width
height
bytesPerPixel1 , 3 or 4
flipflip vertical
r
g
b
a

◆ DrawDetectLandmarkResult< T >() [1/2]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult< T > ( T []  array,
int  width,
int  height,
int  bytesPerPixel,
int  r,
int  g,
int  b,
int  a 
)

Draws Detect Landmark Result.

Parameters
array
width
height
bytesPerPixel1 , 3 or 4
r
g
b
a
Type Constraints
T :struct 

◆ DrawDetectLandmarkResult< T >() [2/2]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult< T > ( T []  array,
int  width,
int  height,
int  bytesPerPixel,
bool  flip,
int  r,
int  g,
int  b,
int  a 
)

Draws Detect Landmark Result.

Parameters
array
width
height@bytesPerPixel 1 , 3 or 4 @flip flip vertical
r
g
b
a
Type Constraints
T :struct 

◆ DrawDetectResult() [1/3]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult ( Texture2D  texture2D,
int  r,
int  g,
int  b,
int  a,
int  thickness,
bool  updateMipmaps = false,
bool  makeNoLongerReadable = false 
)

Draws Detect Result.

Parameters
texture2D
r
g
b
a
thickness

◆ DrawDetectResult() [2/3]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult ( IntPtr  intPtr,
int  width,
int  height,
int  bytesPerPixel,
int  r,
int  g,
int  b,
int  a,
int  thickness 
)

Draws Detect Result.

Parameters
intPtr
width
height@bytePerPixel 1 , 3 or 4
r
g
b
a
thickness

◆ DrawDetectResult() [3/3]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult ( IntPtr  intPtr,
int  width,
int  height,
int  bytesPerPixel,
bool  flip,
int  r,
int  g,
int  b,
int  a,
int  thickness 
)

Draws Detect Result.

Parameters
intPtr
width
height
bytesPerPixel1 , 3 or 4
flipflip vertical
r
g
b
a
thickness

◆ DrawDetectResult< T >() [1/2]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult< T > ( T []  array,
int  width,
int  height,
int  bytesPerPixel,
int  r,
int  g,
int  b,
int  a,
int  thickness 
)

Draws Detect Result.

Parameters
array
width
height
bytesPerPixel1 , 3 or 4
r
g
b
a
thickness
Type Constraints
T :struct 

◆ DrawDetectResult< T >() [2/2]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult< T > ( T []  array,
int  width,
int  height,
int  bytesPerPixel,
bool  flip,
int  r,
int  g,
int  b,
int  a,
int  thickness 
)

Draws Detect Result.

Parameters
array
width
height
bytePerPixel1 , 3 or 4
flipflip vertical
r
g
b
a
thickness
Type Constraints
T :struct 

◆ GetShapePredictorNumFeatures()

long DlibFaceLandmarkDetector.FaceLandmarkDetector.GetShapePredictorNumFeatures ( )

Gets ShapePredictorNumFeatures.

Returns
long

◆ GetShapePredictorNumParts()

long DlibFaceLandmarkDetector.FaceLandmarkDetector.GetShapePredictorNumParts ( )

Gets ShapePredictorNumParts.

Returns
long

◆ IsAllPartsInRect()

bool DlibFaceLandmarkDetector.FaceLandmarkDetector.IsAllPartsInRect ( )

Whether all of the object parts point is contained in the object rectangle?

Returns
bool

◆ SetImage() [1/5]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage ( Texture2D  texture2D)

Sets Image from Texture2D.

Parameters
texture2D

◆ SetImage() [2/5]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage ( WebCamTexture  webCamTexture)

Sets Image from WebCamTexture.

Parameters
webCamTexture

◆ SetImage() [3/5]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage ( WebCamTexture  webCamTexture,
Color32 []  bufferColors 
)

Sets Image from WebCamTexture.

Parameters
webCamTexture
bufferColorsthe optional array to receive pixel data. You can optionally pass in an array of Color32s to use in colors to avoid allocating new memory each frame. The array needs to be initialized to a length matching width * height of the texture.(http://docs.unity3d.com/ScriptReference/WebCamTexture.GetPixels32.html)

◆ SetImage() [4/5]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage ( IntPtr  intPtr,
int  width,
int  height,
int  bytesPerPixel 
)

Sets Image from IntPtr.

Parameters
intPtr
width
height
bytesPerPixel1 , 3 or 4

◆ SetImage() [5/5]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage ( IntPtr  intPtr,
int  width,
int  height,
int  bytesPerPixel,
bool  flip 
)

Sets Image from IntPtr.

Parameters
intPtr
width
height
bytesPerPixel1 , 3 or 4
flipflip vertical

◆ SetImage< T >() [1/2]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage< T > ( T []  array,
int  width,
int  height,
int  bytesPerPixel 
)

Sets Image from Pixel Data Array.

Parameters
array
width
height
bytesPerPixel1 , 3 or 4
Type Constraints
T :struct 

◆ SetImage< T >() [2/2]

void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage< T > ( T []  array,
int  width,
int  height,
int  bytesPerPixel,
bool  flip 
)

Sets Image from Pixel Data Array.

Parameters
array
width
height
bytesPerPixel1 , 3 or 4
flipflip vertical
Type Constraints
T :struct 

The documentation for this class was generated from the following file: