Dlib FaceLandmark Detector 1.4.1
Enox Software
|
Face landmark detector. More...
Classes | |
class | RectDetection |
Represents the detection result of an object, including its bounding rectangle, detection confidence, and weight index. More... | |
Public Member Functions | |
FaceLandmarkDetector (string objectDetectorFilePath, string shapePredictorFilePath) | |
Initializes a new instance of the FaceLandmarkDetector class. | |
FaceLandmarkDetector (string shapePredictorFilePath) | |
Initializes a new instance of the FaceLandmarkDetector class. | |
List< Rect > | Detect () |
Detects objects in the image. | |
List< Rect > | Detect (double adjust_threshold) |
Detects objects in the image. | |
double[] | DetectArray () |
Detects objects in the image. | |
double[] | DetectArray (double adjust_threshold) |
Detects objects in the image. | |
List< Vector2 > | DetectLandmark (double left, double top, double width, double height) |
Detects the object landmarks within the specified region. | |
double double y[] | DetectLandmark (in(double x, double y, double width, double height) rect) |
List< Vector2 > | DetectLandmark (Rect rect) |
Detects the object landmarks within the specified region defined by a rectangle. | |
double[] | DetectLandmarkArray (double left, double top, double width, double height) |
Detects the object landmarks within the specified region defined by a rectangle. | |
double[] | DetectLandmarkArray (in(double x, double y, double width, double height) rect) |
Detects the object landmarks within the specified region defined by a rectangle. | |
double[] | DetectLandmarkArray (Rect rect) |
Detects the object landmarks within the specified region defined by a rectangle. | |
int | DetectLandmarkOnly (double left, double top, double width, double height) |
Detects objects and returns the number of detected object landmarks. | |
int | DetectLandmarkOnly (in(double x, double y, double width, double height) rect) |
Detects objects and returns the number of detected object landmarks within the specified region defined by a rectangle. | |
int | DetectLandmarkOnly (Rect rect) |
Detects objects and returns the number of detected object landmarks within the specified region defined by a rectangle. | |
int | DetectOnly () |
Detects objects and returns the number of objects detected. | |
int | DetectOnly (double adjust_threshold) |
Detects objects and returns the number of objects detected. | |
List< RectDetection > | DetectRectDetection () |
Detects objects in the image. | |
List< RectDetection > | DetectRectDetection (double adjust_threshold) |
Detects objects in the image. | |
double double double double height[] | DetectValueTuple () |
double double double double height[] | DetectValueTuple (double adjust_threshold) |
void | DrawDetectLandmarkResult (IntPtr intPtr, int width, int height, int bytesPerPixel, bool flip, int r, int g, int b, int a) |
Draws the detected landmark result on the provided image buffer with optional vertical flipping. | |
void | DrawDetectLandmarkResult (IntPtr intPtr, int width, int height, int bytesPerPixel, int r, int g, int b, int a) |
Draws the detected landmark result on the provided image buffer. | |
void | DrawDetectLandmarkResult (Texture2D texture2D, int r, int g, int b, int a, bool updateMipmaps=false, bool makeNoLongerReadable=false) |
Draws the detected landmark result on the provided texture. | |
void | DrawDetectLandmarkResult (Texture2D texture2D, int r, int g, int b, int a, Color32[] pixels32Buffer, byte[] rawTextureDataBuffer=null, bool updateMipmaps=false, bool makeNoLongerReadable=false) |
Draws the detected landmark result on the provided texture. | |
void | DrawDetectLandmarkResult< T > (T[] array, int width, int height, int bytesPerPixel, bool flip, int r, int g, int b, int a) |
Draws the detected landmark result on the provided image buffer, with an option to flip the image vertically. | |
void | DrawDetectLandmarkResult< T > (T[] array, int width, int height, int bytesPerPixel, int r, int g, int b, int a) |
Draws the detected landmark result on the provided image buffer. | |
void | DrawDetectResult (IntPtr intPtr, int width, int height, int bytesPerPixel, bool flip, int r, int g, int b, int a, int thickness) |
Draws the detection result on a memory buffer with optional vertical flipping. | |
void | DrawDetectResult (IntPtr intPtr, int width, int height, int bytesPerPixel, int r, int g, int b, int a, int thickness) |
Draws the detection result on a memory buffer. | |
void | DrawDetectResult (Texture2D texture2D, int r, int g, int b, int a, int thickness, bool updateMipmaps=false, bool makeNoLongerReadable=false) |
Draws the detection result on the specified texture. | |
void | DrawDetectResult (Texture2D texture2D, int r, int g, int b, int a, int thickness, Color32[] pixels32Buffer, byte[] rawTextureDataBuffer=null, bool updateMipmaps=false, bool makeNoLongerReadable=false) |
Draws the detection result on the specified texture. | |
void | DrawDetectResult< T > (T[] array, int width, int height, int bytesPerPixel, bool flip, int r, int g, int b, int a, int thickness) |
Draws the detection result on an array representing the image data. | |
void | DrawDetectResult< T > (T[] array, int width, int height, int bytesPerPixel, int r, int g, int b, int a, int thickness) |
Draws the detection result on an array representing the image data. | |
void | GetDetectLandmarkResult (double[] result) |
Gets the result data of the object landmarks detected by the DetectLandmarkOnly() method, passing a data size of DetectLandmarkOnly() * 2 as an argument. This method can retrieve results without memory allocation. | |
void | GetDetectLandmarkResult (Span< double > result) |
Gets the result data of the object landmarks detected by the DetectLandmarkOnly() method, passing a data size of DetectLandmarkOnly() * 2 as an argument. This method can retrieve results without memory allocation. | |
void | GetDetectResult (double[] result) |
Gets the result data of the objects detected by the DetectOnly() method, passing a data size of DetectOnly() * 6 as an argument. This method can retrieve results without memory allocation. | |
void | GetDetectResult (Span< double > result) |
Gets the result data of the objects detected by the DetectOnly() method, passing a data size of DetectOnly() * 6 as an argument. This method can retrieve results without memory allocation. | |
long | GetShapePredictorNumFeatures () |
Gets the number of features in the shape predictor. | |
long | GetShapePredictorNumParts () |
Gets the number of parts in the shape predictor. | |
bool | IsAllPartsInRect () |
Determines whether all of the object parts are contained within the object rectangle. | |
void | SetImage (IntPtr intPtr, int width, int height, int bytesPerPixel) |
Sets the image from an IntPtr. | |
void | SetImage (IntPtr intPtr, int width, int height, int bytesPerPixel, bool flip) |
Sets the image from an IntPtr. | |
void | SetImage (Texture2D texture2D) |
Sets the image from a Texture2D. | |
void | SetImage (WebCamTexture webCamTexture) |
Sets the image from a WebCamTexture. | |
void | SetImage (WebCamTexture webCamTexture, Color32[] pixels32Buffer) |
Sets the image from a WebCamTexture. | |
void | SetImage< T > (T[] array, int width, int height, int bytesPerPixel) |
Sets the image from a pixel data array. | |
void | SetImage< T > (T[] array, int width, int height, int bytesPerPixel, bool flip) |
Sets the image from a pixel data array. | |
Public Member Functions inherited from DlibFaceLandmarkDetector.DisposableObject | |
void | Dispose () |
void | ThrowIfDisposed () |
Public Attributes | |
double double double | width |
double | x |
Detects objects in the image. | |
double double | y |
Protected Member Functions | |
override void | Dispose (bool disposing) |
Protected Member Functions inherited from DlibFaceLandmarkDetector.DisposableDlibObject | |
DisposableDlibObject () | |
DisposableDlibObject (bool isEnabledDispose) | |
DisposableDlibObject (IntPtr ptr) | |
DisposableDlibObject (IntPtr ptr, bool isEnabledDispose) | |
Protected Member Functions inherited from DlibFaceLandmarkDetector.DisposableObject | |
DisposableObject () | |
DisposableObject (bool isEnabledDispose) | |
Additional Inherited Members | |
Static Public Member Functions inherited from DlibFaceLandmarkDetector.DisposableObject | |
static IntPtr | ThrowIfNullIntPtr (IntPtr ptr) |
Package Attributes inherited from DlibFaceLandmarkDetector.DisposableDlibObject | |
Properties inherited from DlibFaceLandmarkDetector.DisposableObject | |
bool | IsDisposed [get, protected set] |
bool | IsEnabledDispose [get, set] |
Face landmark detector.
DlibFaceLandmarkDetector.FaceLandmarkDetector.FaceLandmarkDetector | ( | string | shapePredictorFilePath | ) |
Initializes a new instance of the FaceLandmarkDetector class.
This instance uses the default frontal face detector.
ObjectDetector is initialized as follows:
ShapePredictor is initialized as follows:
shapePredictorFilePath | The file path of the shape predictor. |
DlibFaceLandmarkDetector.FaceLandmarkDetector.FaceLandmarkDetector | ( | string | objectDetectorFilePath, |
string | shapePredictorFilePath ) |
Initializes a new instance of the FaceLandmarkDetector class.
ObjectDetector is initialized with the following code:
ShapePredictor is initialized with the following code:
objectDetectorFilePath | The file path of the object detector. |
shapePredictorFilePath | The file path of the shape predictor. |
List< Rect > DlibFaceLandmarkDetector.FaceLandmarkDetector.Detect | ( | ) |
Detects objects in the image.
List< Rect > DlibFaceLandmarkDetector.FaceLandmarkDetector.Detect | ( | double | adjust_threshold | ) |
Detects objects in the image.
adjust_threshold | A parameter to adjust the detection threshold. |
double[] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectArray | ( | ) |
Detects objects in the image.
double[] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectArray | ( | double | adjust_threshold | ) |
Detects objects in the image.
adjust_threshold | A parameter to adjust the detection threshold. |
List< Vector2 > DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmark | ( | double | left, |
double | top, | ||
double | width, | ||
double | height ) |
Detects the object landmarks within the specified region.
left | The left coordinate of the region to search for landmarks. |
top | The top coordinate of the region to search for landmarks. |
width | The width of the region to search for landmarks. |
height | The height of the region to search for landmarks. |
double double y[] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmark | ( | in(double x, double y, double width, double height) | rect | ) |
List< Vector2 > DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmark | ( | Rect | rect | ) |
Detects the object landmarks within the specified region defined by a rectangle.
rect | A rectangle defining the region to search for landmarks. The rectangle is defined by its left, top, width, and height. |
double[] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmarkArray | ( | double | left, |
double | top, | ||
double | width, | ||
double | height ) |
Detects the object landmarks within the specified region defined by a rectangle.
left | The left coordinate of the rectangle. |
top | The top coordinate of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
double[] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmarkArray | ( | in(double x, double y, double width, double height) | rect | ) |
Detects the object landmarks within the specified region defined by a rectangle.
rect | A ValueTuple<Double, Double, Double, Double> representing a rectangle. The ValueTuple contains the following values:
|
double[] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmarkArray | ( | Rect | rect | ) |
Detects the object landmarks within the specified region defined by a rectangle.
rect | The rectangle defining the region in which to detect object landmarks. |
int DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmarkOnly | ( | double | left, |
double | top, | ||
double | width, | ||
double | height ) |
Detects objects and returns the number of detected object landmarks.
left | The left coordinate of the object region to detect landmarks. |
top | The top coordinate of the object region to detect landmarks. |
width | The width of the object region to detect landmarks. |
height | The height of the object region to detect landmarks. |
int DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmarkOnly | ( | in(double x, double y, double width, double height) | rect | ) |
Detects objects and returns the number of detected object landmarks within the specified region defined by a rectangle.
rect | A ValueTuple<Double, Double, Double, Double> representing a rectangle. The ValueTuple contains the following values:
|
int DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectLandmarkOnly | ( | Rect | rect | ) |
Detects objects and returns the number of detected object landmarks within the specified region defined by a rectangle.
rect | The rectangle defining the region in which to detect object landmarks. |
int DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectOnly | ( | ) |
Detects objects and returns the number of objects detected.
int DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectOnly | ( | double | adjust_threshold | ) |
Detects objects and returns the number of objects detected.
adjust_threshold | A parameter to adjust the detection threshold. |
List< RectDetection > DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectRectDetection | ( | ) |
Detects objects in the image.
List< RectDetection > DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectRectDetection | ( | double | adjust_threshold | ) |
Detects objects in the image.
adjust_threshold | A parameter to adjust the detection threshold. |
double double double double height[] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectValueTuple | ( | ) |
double double double double height[] DlibFaceLandmarkDetector.FaceLandmarkDetector.DetectValueTuple | ( | double | adjust_threshold | ) |
|
protectedvirtual |
Reimplemented from DlibFaceLandmarkDetector.DisposableDlibObject.
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult | ( | IntPtr | intPtr, |
int | width, | ||
int | height, | ||
int | bytesPerPixel, | ||
bool | flip, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a ) |
Draws the detected landmark result on the provided image buffer with optional vertical flipping.
intPtr | The pointer to the memory buffer where the detected landmark result will be drawn. |
width | The width of the image (in pixels) where the landmarks will be drawn. |
height | The height of the image (in pixels) where the landmarks will be drawn. |
bytesPerPixel | The number of bytes per pixel in the memory buffer. Valid values are 1 (grayscale), 3 (RGB), or 4 (RGBA). |
flip | A boolean flag indicating whether to flip the image vertically. Set to true to flip, or false to leave the image unflipped. |
r | The red component (0-255) of the color to use for drawing the landmarks. |
g | The green component (0-255) of the color to use for drawing the landmarks. |
b | The blue component (0-255) of the color to use for drawing the landmarks. |
a | The alpha (transparency) component (0-255) of the color to use for drawing the landmarks. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult | ( | IntPtr | intPtr, |
int | width, | ||
int | height, | ||
int | bytesPerPixel, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a ) |
Draws the detected landmark result on the provided image buffer.
intPtr | The pointer to the memory buffer where the detected landmark result will be drawn. |
width | The width of the image (in pixels) where the landmarks will be drawn. |
height | The height of the image (in pixels) where the landmarks will be drawn. |
bytesPerPixel | The number of bytes per pixel in the memory buffer. Valid values are 1 (grayscale), 3 (RGB), or 4 (RGBA). |
r | The red component (0-255) of the color to use for drawing the landmarks. |
g | The green component (0-255) of the color to use for drawing the landmarks. |
b | The blue component (0-255) of the color to use for drawing the landmarks. |
a | The alpha (transparency) component (0-255) of the color to use for drawing the landmarks. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult | ( | Texture2D | texture2D, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a, | ||
bool | updateMipmaps = false, | ||
bool | makeNoLongerReadable = false ) |
Draws the detected landmark result on the provided texture.
texture2D | The Texture2D on where the detected landmark result will be drawn. Processing speed is fastest when the texture format is TextureFormat.RGBA32, TextureFormat.RGB24, or TextureFormat.Alpha8. |
r | The red component (0-255) of the color to use for drawing the landmarks. |
g | The green component (0-255) of the color to use for drawing the landmarks. |
b | The blue component (0-255) of the color to use for drawing the landmarks. |
a | The alpha (transparency) component (0-255) of the color to use for drawing the landmarks. |
updateMipmaps | If set to true, mipmap levels of the texture will be recalculated. |
makeNoLongerReadable | If set to true, the system memory copy of the texture will be released, making it no longer readable. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult | ( | Texture2D | texture2D, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a, | ||
Color32[] | pixels32Buffer, | ||
byte[] | rawTextureDataBuffer = null, | ||
bool | updateMipmaps = false, | ||
bool | makeNoLongerReadable = false ) |
Draws the detected landmark result on the provided texture.
texture2D | The Texture2D on where the detected landmark result will be drawn. Processing speed is fastest when the texture format is TextureFormat.RGBA32, TextureFormat.RGB24, or TextureFormat.Alpha8. |
r | The red component (0-255) of the color to use for drawing the landmarks. |
g | The green component (0-255) of the color to use for drawing the landmarks. |
b | The blue component (0-255) of the color to use for drawing the landmarks. |
a | The alpha (transparency) component (0-255) of the color to use for drawing the landmarks. |
pixels32Buffer | An optional array to receive pixel data in the form of Color32. You can pass in an existing array to avoid allocating new memory each frame. The array should be initialized to a length matching the width * height of the texture. WebCamTexture.GetPixels32 |
rawTextureDataBuffer | An optional array to receive raw texture data in the form of bytes. You can pass in an existing array to avoid allocating new memory each frame. The array should be initialized to a length matching the raw data size of the texture. Texture2D.GetRawTextureData |
updateMipmaps | If set to true, mipmap levels of the texture will be recalculated. |
makeNoLongerReadable | If set to true, the system memory copy of the texture will be released, making it no longer readable. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult< T > | ( | T[] | array, |
int | width, | ||
int | height, | ||
int | bytesPerPixel, | ||
bool | flip, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a ) |
Draws the detected landmark result on the provided image buffer, with an option to flip the image vertically.
array | The array representing the image data where the detected landmark result will be drawn. The array should contain pixel data in the format corresponding to bytesPerPixel . |
width | The width of the image (in pixels) where the landmarks will be drawn. |
height | The height of the image (in pixels) where the landmarks will be drawn. |
bytesPerPixel | The number of bytes per pixel in the memory buffer. Valid values are 1 (grayscale), 3 (RGB), or 4 (RGBA). |
flip | A boolean flag indicating whether to flip the image vertically. Set to true to flip, or false to leave the image unflipped. |
r | The red component (0-255) of the color to use for drawing the landmarks. |
g | The green component (0-255) of the color to use for drawing the landmarks. |
b | The blue component (0-255) of the color to use for drawing the landmarks. |
a | The alpha (transparency) component (0-255) of the color to use for drawing the landmarks. |
T | : | unmanaged |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectLandmarkResult< T > | ( | T[] | array, |
int | width, | ||
int | height, | ||
int | bytesPerPixel, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a ) |
Draws the detected landmark result on the provided image buffer.
array | The array representing the image data where the detected landmark result will be drawn. The array should contain pixel data in the format corresponding to bytesPerPixel . |
width | The width of the image (in pixels) where the landmarks will be drawn. |
height | The height of the image (in pixels) where the landmarks will be drawn. |
bytesPerPixel | The number of bytes per pixel in the memory buffer. Valid values are 1 (grayscale), 3 (RGB), or 4 (RGBA). |
r | The red component (0-255) of the color to use for drawing the landmarks. |
g | The green component (0-255) of the color to use for drawing the landmarks. |
b | The blue component (0-255) of the color to use for drawing the landmarks. |
a | The alpha (transparency) component (0-255) of the color to use for drawing the landmarks. |
T | : | unmanaged |
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 the detection result on a memory buffer with optional vertical flipping.
intPtr | The pointer to the memory buffer where the detection result will be drawn. |
width | The width of the image (in pixels) where the detection result will be drawn. |
height | The height of the image (in pixels) where the detection result will be drawn. |
bytesPerPixel | The number of bytes per pixel in the memory buffer. Valid values are 1 (grayscale), 3 (RGB), or 4 (RGBA). |
flip | A boolean flag indicating whether to flip the image vertically. Set to true to flip, or false to leave the image unflipped. |
r | The red component of the color to be used for drawing (0-255). |
g | The green component of the color to be used for drawing (0-255). |
b | The blue component of the color to be used for drawing (0-255). |
a | The alpha (transparency) component of the color to be used for drawing (0-255). |
thickness | The thickness of the lines used to draw the detection results. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult | ( | IntPtr | intPtr, |
int | width, | ||
int | height, | ||
int | bytesPerPixel, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a, | ||
int | thickness ) |
Draws the detection result on a memory buffer.
intPtr | The pointer to the memory buffer where the detection result will be drawn. |
width | The width of the image (in pixels) where the detection result will be drawn. |
height | The height of the image (in pixels) where the detection result will be drawn. |
bytesPerPixel | The number of bytes per pixel in the memory buffer. Valid values are 1 (grayscale), 3 (RGB), or 4 (RGBA). |
r | The red component of the color to be used for drawing (0-255). |
g | The green component of the color to be used for drawing (0-255). |
b | The blue component of the color to be used for drawing (0-255). |
a | The alpha (transparency) component of the color to be used for drawing (0-255). |
thickness | The thickness of the lines used to draw the detection results. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult | ( | Texture2D | texture2D, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a, | ||
int | thickness, | ||
bool | updateMipmaps = false, | ||
bool | makeNoLongerReadable = false ) |
Draws the detection result on the specified texture.
texture2D | The Texture2D on which the detection result will be drawn. Processing speed is fastest when the texture format is TextureFormat.RGBA32, TextureFormat.RGB24, or TextureFormat.Alpha8. |
r | The red component of the color to be used for drawing (0-255). |
g | The green component of the color to be used for drawing (0-255). |
b | The blue component of the color to be used for drawing (0-255). |
a | The alpha (transparency) component of the color to be used for drawing (0-255). |
thickness | The thickness of the lines used to draw the detection results. |
updateMipmaps | If set to true, mipmap levels of the texture will be recalculated. |
makeNoLongerReadable | If set to true, the system memory copy of the texture will be released, making it no longer readable. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult | ( | Texture2D | texture2D, |
int | r, | ||
int | g, | ||
int | b, | ||
int | a, | ||
int | thickness, | ||
Color32[] | pixels32Buffer, | ||
byte[] | rawTextureDataBuffer = null, | ||
bool | updateMipmaps = false, | ||
bool | makeNoLongerReadable = false ) |
Draws the detection result on the specified texture.
texture2D | The Texture2D on which the detection result will be drawn. Processing speed is fastest when the texture format is TextureFormat.RGBA32, TextureFormat.RGB24, or TextureFormat.Alpha8. |
r | The red component of the color to be used for drawing (0-255). |
g | The green component of the color to be used for drawing (0-255). |
b | The blue component of the color to be used for drawing (0-255). |
a | The alpha (transparency) component of the color to be used for drawing (0-255). |
thickness | The thickness of the lines used to draw the detection results. |
pixels32Buffer | An optional array to receive the Color32 pixel data. You can pass in an array to avoid allocating new memory each frame. The array must be initialized to a length matching the width * height of the texture. WebCamTexture.GetPixels32. |
rawTextureDataBuffer | An optional array to receive raw texture data. You can pass in an array to avoid allocating new memory each frame. The array must be initialized to a length matching the raw data size of the texture. Texture2D.GetRawTextureData. |
updateMipmaps | If set to true, mipmap levels of the texture will be recalculated. |
makeNoLongerReadable | If set to true, the system memory copy of the texture will be released, making it no longer readable. |
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 the detection result on an array representing the image data.
array | The array representing the image data where the detection result will be drawn. The array should contain pixel data in the format corresponding to bytesPerPixel . |
width | The width of the image (in pixels) where the detection result will be drawn. |
height | The height of the image (in pixels) where the detection result will be drawn. |
bytesPerPixel | The number of bytes per pixel in the memory buffer. Valid values are 1 (grayscale), 3 (RGB), or 4 (RGBA). |
flip | A boolean flag indicating whether to flip the image vertically. Set to true to flip, or false to leave the image unflipped. |
r | The red component of the color to be used for drawing (0-255). |
g | The green component of the color to be used for drawing (0-255). |
b | The blue component of the color to be used for drawing (0-255). |
a | The alpha (transparency) component of the color to be used for drawing (0-255). |
thickness | The thickness of the lines used to draw the detection results. |
T | : | unmanaged |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.DrawDetectResult< T > | ( | T[] | array, |
int | width, | ||
int | height, | ||
int | bytesPerPixel, | ||
int | r, | ||
int | g, | ||
int | b, | ||
int | a, | ||
int | thickness ) |
Draws the detection result on an array representing the image data.
array | The array representing the image data where the detection result will be drawn. The array should contain pixel data in the format corresponding to bytesPerPixel . |
width | The width of the image (in pixels) where the detection result will be drawn. |
height | The height of the image (in pixels) where the detection result will be drawn. |
bytesPerPixel | The number of bytes per pixel in the memory buffer. Valid values are 1 (grayscale), 3 (RGB), or 4 (RGBA). |
r | The red component of the color to be used for drawing (0-255). |
g | The green component of the color to be used for drawing (0-255). |
b | The blue component of the color to be used for drawing (0-255). |
a | The alpha (transparency) component of the color to be used for drawing (0-255). |
thickness | The thickness of the lines used to draw the detection results. |
T | : | unmanaged |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.GetDetectLandmarkResult | ( | double[] | result | ) |
Gets the result data of the object landmarks detected by the DetectLandmarkOnly() method, passing a data size of DetectLandmarkOnly() * 2 as an argument. This method can retrieve results without memory allocation.
result | An array of doubles representing detected object landmark data. The array contains values in the following order:
|
void DlibFaceLandmarkDetector.FaceLandmarkDetector.GetDetectLandmarkResult | ( | Span< double > | result | ) |
Gets the result data of the object landmarks detected by the DetectLandmarkOnly() method, passing a data size of DetectLandmarkOnly() * 2 as an argument. This method can retrieve results without memory allocation.
result | A span of doubles representing detected object landmark data. The span contains values in the following order:
|
void DlibFaceLandmarkDetector.FaceLandmarkDetector.GetDetectResult | ( | double[] | result | ) |
Gets the result data of the objects detected by the DetectOnly() method, passing a data size of DetectOnly() * 6 as an argument. This method can retrieve results without memory allocation.
result | An array of doubles representing detected object data. The array contains values in the following order:
|
void DlibFaceLandmarkDetector.FaceLandmarkDetector.GetDetectResult | ( | Span< double > | result | ) |
Gets the result data of the objects detected by the DetectOnly() method, passing a data size of DetectOnly() * 6 as an argument. This method can retrieve results without memory allocation.
result | A span of doubles representing detected object data. The span contains values in the following order:
|
long DlibFaceLandmarkDetector.FaceLandmarkDetector.GetShapePredictorNumFeatures | ( | ) |
Gets the number of features in the shape predictor.
long DlibFaceLandmarkDetector.FaceLandmarkDetector.GetShapePredictorNumParts | ( | ) |
Gets the number of parts in the shape predictor.
bool DlibFaceLandmarkDetector.FaceLandmarkDetector.IsAllPartsInRect | ( | ) |
Determines whether all of the object parts are contained within the object rectangle.
true
if all points are contained within the rectangle, otherwise false
. void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage | ( | IntPtr | intPtr, |
int | width, | ||
int | height, | ||
int | bytesPerPixel ) |
Sets the image from an IntPtr.
intPtr | The IntPtr pointing to the image data. |
width | The width of the image. |
height | The height of the image. |
bytesPerPixel | The number of bytes per pixel (1, 3, or 4). |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage | ( | IntPtr | intPtr, |
int | width, | ||
int | height, | ||
int | bytesPerPixel, | ||
bool | flip ) |
Sets the image from an IntPtr.
intPtr | The IntPtr pointing to the image data. |
width | The width of the image. |
height | The height of the image. |
bytesPerPixel | The number of bytes per pixel (1, 3, or 4). |
flip | If true, the image will be flipped vertically. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage | ( | Texture2D | texture2D | ) |
Sets the image from a Texture2D.
texture2D | Processing speed is fastest when the TextureFormat is RGBA32, RGB24, or Alpha8. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage | ( | WebCamTexture | webCamTexture | ) |
Sets the image from a WebCamTexture.
webCamTexture | The WebCamTexture to set as the image. |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage | ( | WebCamTexture | webCamTexture, |
Color32[] | pixels32Buffer ) |
Sets the image from a WebCamTexture.
webCamTexture | The WebCamTexture to set as the image. |
pixels32Buffer | The optional array to receive pixel data. You can pass in an array of Color32 values to avoid allocating new memory each frame. The array should have a length matching the width * height of the texture. WebCamTexture.GetPixels32 |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage< T > | ( | T[] | array, |
int | width, | ||
int | height, | ||
int | bytesPerPixel ) |
Sets the image from a pixel data array.
array | The array containing pixel data. |
width | The width of the image. |
height | The height of the image. |
bytesPerPixel | The number of bytes per pixel (1, 3, or 4). |
T | : | unmanaged |
void DlibFaceLandmarkDetector.FaceLandmarkDetector.SetImage< T > | ( | T[] | array, |
int | width, | ||
int | height, | ||
int | bytesPerPixel, | ||
bool | flip ) |
Sets the image from a pixel data array.
array | The array containing pixel data. |
width | The width of the image. |
height | The height of the image. |
bytesPerPixel | The number of bytes per pixel (1, 3, or 4). |
flip | If true, the image will be flipped vertically. |
T | : | unmanaged |
double double double DlibFaceLandmarkDetector.FaceLandmarkDetector.width |
double DlibFaceLandmarkDetector.FaceLandmarkDetector.x |
Detects objects in the image.
Detects the object landmarks within the specified region defined by a rectangle.
adjust_threshold | A parameter to adjust the detection threshold. |
rect | A ValueTuple<Double, Double, Double, Double> representing a rectangle. The ValueTuple contains the following values:
|
double double DlibFaceLandmarkDetector.FaceLandmarkDetector.y |