Dlib FaceLandmark Detector 1.4.1
Enox Software
|
Utility class for the integration of DlibFaceLandmarkDetector and OpenCVForUnity. More...
Static Public Member Functions | |
static Point[] | ConvertArrayToPointArray (double[] src, Point[] dst=null) |
Convert double array to Point array. | |
static List< Point > | ConvertArrayToPointList (double[] src, List< Point > dst=null) |
Convert double array to Point list. | |
static double double y[] | ConvertArrayToValueTupleArray (double[] src,(double x, double y)[] dst=null) |
static Vec2d[] | ConvertArrayToVec2dArray (double[] src, Vec2d[] dst=null) |
Convert double array to Vec2d array. | |
static Vector2[] | ConvertArrayToVector2Array (double[] src, Vector2[] dst=null) |
Convert double array to Vector2 array. | |
static List< Vector2 > | ConvertArrayToVector2List (double[] src, List< Vector2 > dst=null) |
Convert double array to Vector2 list. | |
static double[] | ConvertPointListToArray (IList< Point > src, double[] dst=null) |
Convert Point list to double array. | |
static Point[] | ConvertPointListToPointArray (IList< Point > src, Point[] dst=null) |
Convert Point list to Point array. | |
static double double y[] | ConvertPointListToValueTupleArray (IList< Point > src,(double x, double y)[] dst=null) |
static Vec2d[] | ConvertPointListToVec2dArray (IList< Point > src, Vec2d[] dst=null) |
Convert Point list to Vec2d array. | |
static Vector2[] | ConvertPointListToVector2Array (IList< Point > src, Vector2[] dst=null) |
Convert Point list to Vector2 array. | |
static List< Vector2 > | ConvertPointListToVector2List (IList< Point > src, List< Vector2 > dst=null) |
Convert Point list to Vector2 list. | |
static double[] | ConvertValueTupleArrayToArray (in(double x, double y)[] src, double[] dst=null) |
Convert ValueTuple array to double array. | |
static Point[] | ConvertValueTupleArrayToPointArray (in(double x, double y)[] src, Point[] dst=null) |
Convert ValueTuple array to Point array. | |
static List< Point > | ConvertValueTupleArrayToPointList (in(double x, double y)[] src, List< Point > dst=null) |
Convert ValueTuple array to Point list. | |
static Vec2d[] | ConvertValueTupleArrayToVec2dArray (in(double x, double y)[] src, Vec2d[] dst=null) |
Convert ValueTuple array to Vec2d array. | |
static double[] | ConvertVec2dArrayToArray (in Vec2d[] src, double[] dst=null) |
Convert Vec2d array to double array. | |
static Point[] | ConvertVec2dArrayToPointArray (in Vec2d[] src, Point[] dst=null) |
Convert Vec2d array to Point array. | |
static List< Point > | ConvertVec2dArrayToPointList (in Vec2d[] src, List< Point > dst=null) |
Convert Vec2d array to Point list. | |
static double double y[] | ConvertVec2dArrayToValueTupleArray (in Vec2d[] src,(double x, double y)[] dst=null) |
static double[] | ConvertVector2ListToArray (IList< Vector2 > src, double[] dst=null) |
Convert Vector2 list to double array. | |
static Point[] | ConvertVector2ListToPointArray (IList< Vector2 > src, Point[] dst=null) |
Convert Vector2 list to Point array. | |
static List< Point > | ConvertVector2ListToPointList (IList< Vector2 > src, List< Point > dst=null) |
Convert Vector2 list to Point list. | |
static double double y[] | ConvertVector2ListToValueTupleArray (IList< Vector2 > src,(double x, double y)[] dst=null) |
static Vec2d[] | ConvertVector2ListToVec2dArray (IList< Vector2 > src, Vec2d[] dst=null) |
Convert Vector2 list to Vec2d array. | |
static Vector2[] | ConvertVector2ListToVector2Array (IList< Vector2 > src, Vector2[] dst=null) |
Convert Vector2 list to Vector2 array. | |
static void | DrawFaceLandmark (Mat imgMat, double[] points, in Vec4d color, int thickness, bool drawIndexNumbers=false) |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point. | |
static void | DrawFaceLandmark (Mat imgMat, double[] points, in(double v0, double v1, double v2, double v3) color, int thickness, bool drawIndexNumbers=false) |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point. | |
static void | DrawFaceLandmark (Mat imgMat, double[] points, Scalar color, int thickness, bool drawIndexNumbers=false) |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point. | |
static void | DrawFaceLandmark (Mat imgMat, IList< Point > points, Scalar color, int thickness, bool drawIndexNumbers=false) |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point. | |
static void | DrawFaceLandmark (Mat imgMat, IList< Vector2 > points, Scalar color, int thickness, bool drawIndexNumbers=false) |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point. | |
static void | DrawFaceLandmark (Mat imgMat, in Vec2d[] points, in Vec4d color, int thickness, bool drawIndexNumbers=false) |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point. | |
static void | DrawFaceLandmark (Mat imgMat, in(double x, double y)[] points, in(double v0, double v1, double v2, double v3) color, int thickness, bool drawIndexNumbers=false) |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point. | |
static void | DrawFaceRect (Mat imgMat, DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection rect, in Vec4d color, int thickness) |
Draws a rectangle and detection information on the specified image based on the given DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection data. | |
static void | DrawFaceRect (Mat imgMat, DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection rect, in(double v0, double v1, double v2, double v3) color, int thickness) |
Draws a rectangle and detection information on the specified image based on the given DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection data. | |
static void | DrawFaceRect (Mat imgMat, DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection rect, Scalar color, int thickness) |
Draws a rectangle and detection information on the specified image based on the given RectDetection data. | |
static void | DrawFaceRect (Mat imgMat, double[] rect, in Vec4d color, int thickness) |
Draws a rectangle and detection information on the specified image based on the provided rectangle data. | |
static void | DrawFaceRect (Mat imgMat, double[] rect, in(double v0, double v1, double v2, double v3) color, int thickness) |
Draws a rectangle and detection information on the specified image based on the provided rectangle data. | |
static void | DrawFaceRect (Mat imgMat, double[] rect, Scalar color, int thickness) |
Draws a rectangle and detection information on the specified image based on the provided rectangle data. | |
static void | DrawFaceRect (Mat imgMat, in Vec4d rect, in Vec4d color, int thickness) |
Draws a rectangle on the specified image to indicate a detected face region. | |
static void | DrawFaceRect (Mat imgMat, in Vec4i rect, in Vec4d color, int thickness) |
Draws a rectangle on the specified image to indicate a detected face region. | |
static void | DrawFaceRect (Mat imgMat, in(double x, double y, double width, double height) rect, in(double v0, double v1, double v2, double v3) color, int thickness) |
Draws a rectangle on the specified image to indicate a detected face region. | |
static void | DrawFaceRect (Mat imgMat, in(int x, int y, int width, int height) rect, in(double v0, double v1, double v2, double v3) color, int thickness) |
Draws a rectangle on the specified image to indicate a detected face region. | |
static void | DrawFaceRect (Mat imgMat, OpenCVForUnity.CoreModule.Rect rect, Scalar color, int thickness) |
Draws a rectangle on the specified image to indicate a detected face region. | |
static void | DrawFaceRect (Mat imgMat, UnityEngine.Rect rect, in Vec4d color, int thickness) |
Draws a rectangle on the specified image to indicate a detected face region. | |
static void | DrawFaceRect (Mat imgMat, UnityEngine.Rect rect, in(double v0, double v1, double v2, double v3) color, int thickness) |
Draws a rectangle on the specified image to indicate a detected face region. | |
static void | DrawFaceRect (Mat imgMat, UnityEngine.Rect rect, Scalar color, int thickness) |
Draws a rectangle on the specified image to indicate a detected face region. | |
static void | SetImage (FaceLandmarkDetector faceLandmarkDetector, Mat imgMat) |
Sets the image for the specified FaceLandmarkDetector using a given Mat object. | |
Static Public Attributes | |
static double | x |
Convert Vector2 list to ValueTuple array. | |
Utility class for the integration of DlibFaceLandmarkDetector and OpenCVForUnity.
|
static |
Convert double array to Point array.
src | Array of double. |
dst | Array of Point. |
|
static |
Convert double array to Point list.
src | Array of double. |
dst | List of Point. |
|
static |
|
static |
Convert double array to Vec2d array.
src | Array of double. |
dst | Array of Vec2d. |
|
static |
Convert double array to Vector2 array.
src | Array of double. |
dst | Array of Vector2. |
|
static |
Convert double array to Vector2 list.
src | Array of double. |
dst | List of Vector2. |
|
static |
Convert Point list to double array.
src | List of Point. |
dst | Array of double. |
|
static |
Convert Point list to Point array.
src | List of Point. |
dst | Array of Point. |
|
static |
|
static |
Convert Point list to Vec2d array.
src | List of Point. |
dst | Array of Vec2d. |
|
static |
Convert Point list to Vector2 array.
src | List of Point. |
dst | Array of Vector2. |
|
static |
Convert Point list to Vector2 list.
src | List of Point. |
dst | List of Vector2. |
|
static |
Convert ValueTuple array to double array.
src | Array of ValueTuple. |
dst | Array of double. |
|
static |
Convert ValueTuple array to Point array.
src | Array of ValueTuple. |
dst | Array of Point. |
|
static |
Convert ValueTuple array to Point list.
src | Array of ValueTuple. |
dst | List of Point. |
|
static |
Convert ValueTuple array to Vec2d array.
src | Array of ValueTuple. |
dst | Array of Vec2d. |
|
static |
Convert Vec2d array to double array.
src | Array of Vec2d. |
dst | Array of double. |
|
static |
Convert Vec2d array to Point array.
src | Array of Vec2d. |
dst | Array of Point. |
|
static |
Convert Vec2d array to Point list.
src | Array of Vec2d. |
dst | List of Point. |
|
static |
|
static |
Convert Vector2 list to double array.
src | List of Vector2. |
dst | Array of double. |
|
static |
Convert Vector2 list to Point array.
src | List of Vector2. |
dst | Array of Point. |
|
static |
Convert Vector2 list to Point list.
src | List of Vector2. |
dst | List of Point. |
|
static |
|
static |
Convert Vector2 list to Vec2d array.
src | List of Vector2. |
dst | Array of Vec2d. |
|
static |
Convert Vector2 list to Vector2 array.
src | List of Vector2. |
dst | Array of Vector2. |
|
static |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point.
imgMat | The Mat image on which to draw the face landmarks. |
points | A double array representing the landmark positions, where each pair of consecutive values represents the X and Y coordinates of a point. The number of points must match one of the following: 5 points for a basic face shape (e.g., eyes, nose, mouth), 6 points for a face with more detailed landmarks, 17 points for a detailed face shape, or 68 points for a full set of face landmarks. |
color | The Vec4d color used to draw the landmarks and lines. |
thickness | The thickness of the lines used to connect the landmarks. |
drawIndexNumbers | If set to true , index numbers will be drawn next to each landmark point. If set to false , no index numbers will be drawn. Default is false . |
ArgumentNullException | Thrown if points is null . |
|
static |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point.
imgMat | The Mat image on which to draw the face landmarks. |
points | A double array representing the landmark positions, where each pair of consecutive values represents the X and Y coordinates of a point. The number of points must match one of the following: 5 points for a basic face shape (e.g., eyes, nose, mouth), 6 points for a face with more detailed landmarks, 17 points for a detailed face shape, or 68 points for a full set of face landmarks. |
color | The ValueTuple<Double, Double, Double, Double> color used to draw the landmarks and lines. |
thickness | The thickness of the lines used to connect the landmarks. |
drawIndexNumbers | If set to true , index numbers will be drawn next to each landmark point. If set to false , no index numbers will be drawn. Default is false . |
ArgumentNullException | Thrown if points is null . |
|
static |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point.
imgMat | The Mat image on which to draw the face landmarks. |
points | A list of Point points representing the landmark positions. The number of points must match one of the following: 5 points for a basic face shape (e.g., eyes, nose, mouth), 6 points for a face with more detailed landmarks, 17 points for a detailed face shape, or 68 points for a full set of face landmarks. |
color | The Scalar color used to draw the landmarks and lines. |
thickness | The thickness of the lines used to connect the landmarks. |
drawIndexNumbers | If set to true , index numbers will be drawn next to each landmark point. If set to false , no index numbers will be drawn. Default is false . |
ArgumentNullException | Thrown if points is null . |
|
static |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point.
imgMat | The Mat image on which to draw the face landmarks. |
points | A list of Point points representing the landmark positions. The number of points must match one of the following: 5 points for a basic face shape (e.g., eyes, nose, mouth), 6 points for a face with more detailed landmarks, 17 points for a detailed face shape, or 68 points for a full set of face landmarks. |
color | The Scalar color used to draw the landmarks and lines. |
thickness | The thickness of the lines used to connect the landmarks. |
drawIndexNumbers | If set to true , index numbers will be drawn next to each landmark point. If set to false , no index numbers will be drawn. Default is false . |
ArgumentNullException | Thrown if points is null . |
|
static |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point.
imgMat | The Mat image on which to draw the face landmarks. |
points | A list of Vector2 points representing the landmark positions. The number of points must match one of the following: 5 points for a basic face shape (e.g., eyes, nose, mouth), 6 points for a face with more detailed landmarks, 17 points for a detailed face shape, or 68 points for a full set of face landmarks. |
color | The Scalar color used to draw the landmarks and lines. |
thickness | The thickness of the lines used to connect the landmarks. |
drawIndexNumbers | If set to true , index numbers will be drawn next to each landmark point. If set to false , no index numbers will be drawn. Default is false . |
ArgumentNullException | Thrown if points is null . |
|
static |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point.
imgMat | The Mat image on which to draw the face landmarks. |
points | A list of Vec2d points representing the landmark positions. The number of points must match one of the following: 5 points for a basic face shape (e.g., eyes, nose, mouth), 6 points for a face with more detailed landmarks, 17 points for a detailed face shape, or 68 points for a full set of face landmarks. |
color | The Vec4d color used to draw the landmarks and lines. |
thickness | The thickness of the lines used to connect the landmarks. |
drawIndexNumbers | If set to true , index numbers will be drawn next to each landmark point. If set to false , no index numbers will be drawn. Default is false . |
ArgumentNullException | Thrown if points is null . |
|
static |
Draws a face landmark on the specified image. This method supports drawing landmarks for 68, 17, 6, or 5 landmark points. The landmarks are drawn by connecting the points with lines, and optionally, index numbers can be drawn on each point.
imgMat | The Mat image on which to draw the face landmarks. |
points | A list of ValueTuple<Double, Double> points representing the landmark positions. The number of points must match one of the following: 5 points for a basic face shape (e.g., eyes, nose, mouth), 6 points for a face with more detailed landmarks, 17 points for a detailed face shape, or 68 points for a full set of face landmarks. |
color | The ValueTuple<Double, Double, Double, Double> color used to draw the landmarks and lines. |
thickness | The thickness of the lines used to connect the landmarks. |
drawIndexNumbers | If set to true , index numbers will be drawn next to each landmark point. If set to false , no index numbers will be drawn. Default is false . |
ArgumentNullException | Thrown if points is null . |
|
static |
Draws a rectangle and detection information on the specified image based on the given DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection data.
imgMat | The Mat image on which to draw the rectangle and text. |
rect | The DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection containing the rectangle and detection details. |
color | The Vec4d color of the rectangle border. |
thickness | The thickness of the rectangle border. |
ArgumentNullException | Thrown if rect is null. |
|
static |
Draws a rectangle and detection information on the specified image based on the given DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection data.
imgMat | The Mat image on which to draw the rectangle and text. |
rect | The DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection containing the rectangle and detection details. |
color | The ValueTuple<Double, Double, Double, Double> color of the rectangle border. |
thickness | The thickness of the rectangle border. |
ArgumentNullException | Thrown if rect is null. |
|
static |
Draws a rectangle and detection information on the specified image based on the given RectDetection data.
imgMat | The Mat image on which to draw the rectangle and text. |
rect | The DlibFaceLandmarkDetector.FaceLandmarkDetector.RectDetection containing the rectangle and detection details. |
color | The Scalar color of the rectangle border. |
thickness | The thickness of the rectangle border. |
ArgumentNullException | Thrown if rect is null. |
|
static |
Draws a rectangle and detection information on the specified image based on the provided rectangle data.
imgMat | The Mat image on which to draw the rectangle and text. |
rect | An array containing the rectangle data in the format [x, y, width, height, detection_confidence, weight_index] . The last two values are optional and used for displaying additional detection information. |
color | The Vec4d color of the rectangle border. |
thickness | The thickness of the rectangle border. |
ArgumentNullException | Thrown if rect is null. |
|
static |
Draws a rectangle and detection information on the specified image based on the provided rectangle data.
imgMat | The Mat image on which to draw the rectangle and text. |
rect | An array containing the rectangle data in the format [x, y, width, height, detection_confidence, weight_index] . The last two values are optional and used for displaying additional detection information. |
color | The ValueTuple<Double, Double, Double, Double> color of the rectangle border. |
thickness | The thickness of the rectangle border. |
ArgumentNullException | Thrown if rect is null. |
|
static |
Draws a rectangle and detection information on the specified image based on the provided rectangle data.
imgMat | The Mat image on which to draw the rectangle and text. |
rect | An array containing the rectangle data in the format [x, y, width, height, detection_confidence, weight_index] . The last two values are optional and used for displaying additional detection information. |
color | The Scalar color of the rectangle border. |
thickness | The thickness of the rectangle border. |
ArgumentNullException | Thrown if rect is null. |
|
static |
Draws a rectangle on the specified image to indicate a detected face region.
imgMat | The Mat image on which to draw the rectangle. |
rect | The Vec4d defining the area to highlight. |
color | The Vec4d color of the rectangle border. |
thickness | The thickness of the rectangle border. |
|
static |
Draws a rectangle on the specified image to indicate a detected face region.
imgMat | The Mat image on which to draw the rectangle. |
rect | The Vec4i defining the area to highlight. |
color | The Vec4d color of the rectangle border. |
thickness | The thickness of the rectangle border. |
|
static |
Draws a rectangle on the specified image to indicate a detected face region.
imgMat | The Mat image on which to draw the rectangle. |
rect | The ValueTuple<Double, Double, Double, Double> defining the area to highlight. |
color | The ValueTuple<Double, Double, Double, Double> color of the rectangle border. |
thickness | The thickness of the rectangle border. |
|
static |
Draws a rectangle on the specified image to indicate a detected face region.
imgMat | The Mat image on which to draw the rectangle. |
rect | The ValueTuple<Int32, Int32, Int32, Int32> defining the area to highlight. |
color | The ValueTuple<Double, Double, Double, Double> color of the rectangle border. |
thickness | The thickness of the rectangle border. |
|
static |
Draws a rectangle on the specified image to indicate a detected face region.
imgMat | The Mat image on which to draw the rectangle. |
rect | The OpenCVForUnity.CoreModule.Rect defining the area to highlight. |
color | The Scalar color of the rectangle border. |
thickness | The thickness of the rectangle border. |
|
static |
Draws a rectangle on the specified image to indicate a detected face region.
imgMat | The Mat image on which to draw the rectangle. |
rect | The UnityEngine.Rect defining the area to highlight. |
color | The Vec4d color of the rectangle border. |
thickness | The thickness of the rectangle border. |
|
static |
Draws a rectangle on the specified image to indicate a detected face region.
imgMat | The Mat image on which to draw the rectangle. |
rect | The UnityEngine.Rect defining the area to highlight. |
color | The ValueTuple<Double, Double, Double, Double> color of the rectangle border. |
thickness | The thickness of the rectangle border. |
|
static |
Draws a rectangle on the specified image to indicate a detected face region.
imgMat | The Mat image on which to draw the rectangle. |
rect | The UnityEngine.Rect defining the area to highlight. |
color | The Scalar color of the rectangle border. |
thickness | The thickness of the rectangle border. |
|
static |
Sets the image for the specified FaceLandmarkDetector using a given Mat object.
faceLandmarkDetector | An instance of FaceLandmarkDetector that processes the specified image. |
imgMat | A Mat object representing the image to set. The matrix must be continuous and valid for processing. |
ArgumentNullException | Thrown if faceLandmarkDetector or imgMat is null. |
ArgumentException | Thrown if imgMat is not continuous. Ensure imgMat.isContinuous() == true . |
This method directly assigns the imgMat data pointer, width, height, and element size to the specified FaceLandmarkDetector. It avoids additional memory allocations by reusing the existing imgMat data.
|
static |
Convert Vector2 list to ValueTuple array.
Convert Vec2d array to ValueTuple array.
Convert double array to ValueTuple array.
Convert Point list to ValueTuple array.
src | List of Vector2. |
dst | Array of ValueTuple. |
src | List of Point. |
dst | Array of ValueTuple. |
src | Array of double. |
dst | Array of ValueTuple. |
src | Array of Vec2d. |
dst | Array of ValueTuple. |