Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // load input image
- var img = Dlib.LoadImage<RgbPixel>(inputFilePath);
- // find all faces in the image
- var faces = fd.Operator(img);
- foreach (var face in faces)
- {
- // find the landmark points for this face
- var shape = sp.Detect(img, face);
- // draw the landmark points on the image
- for (var i = 0; i < shape.Parts; i++)
- {
- var point = shape.GetPart((uint)i);
- var rect = new Rectangle(point);
- Dlib.DrawRectangle(img, rect, color: new RgbPixel(255, 255, 0), thickness: 4);
- }
- }
- // the rest of the code goes here....
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement