From b74a6710d1137cc2d4cc3ad11ea9d66f4c683e03 Mon Sep 17 00:00:00 2001 From: pfeatherstone <45853521+pfeatherstone@users.noreply.github.com> Date: Wed, 20 Sep 2023 12:07:36 +0100 Subject: [PATCH] simplify and fix bug (#2866) --- examples/ffmpeg_webcam_face_pose_ex.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/examples/ffmpeg_webcam_face_pose_ex.cpp b/examples/ffmpeg_webcam_face_pose_ex.cpp index 7953855cf..38d2e7608 100644 --- a/examples/ffmpeg_webcam_face_pose_ex.cpp +++ b/examples/ffmpeg_webcam_face_pose_ex.cpp @@ -88,15 +88,11 @@ int main(int argc, const char** argv) shape_predictor pose_model; deserialize("shape_predictor_68_face_landmarks.dat") >> pose_model; - ffmpeg::frame frame; array2d img; // Grab and process frames until the main window is closed by the user. - while(cap.read(frame) && !win.is_closed()) + while(cap.read(img) && !win.is_closed()) { - // Convert the frame object into a dlib image object - convert(frame, img); - // Detect faces std::vector faces = detector(img); // Find the pose of each face.