While capturing video thru OpenCV, I'm getting following. [closed]

asked 2016-08-11 08:56:22 -0600

ramasamy-rudram gravatar image

D:\Ram\Projects\Temp and Samples\dlib-18.18\examples\build\Debug>makeupapp_ex.exe shape_predictor_68_face_landmarks.dat

Error detected at line 36. Error detected in file d:\ram\projects\temp and samples\dlib-18.18\dlib\opencv/cv_image.h. Error detected in function __thiscall dlib::cv_image::cv_image(const class cv::Mat).

Failing expression was img.depth() == cv::DataType::basic_pixel_type>::depth && img.channels() == pixel_traits::num. The pixel type you gave doesn't match pixel used by the open cv Mat object. img.depth(): 0 img.cv::DataType::basic_pixel_type>::depth: 0 img.channels(): 1 img.pixel_traits::num: 3

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant by StevenPuttemans
close date 2016-08-12 03:36:06.964485

Comments

I am using Dlib & OpenCV for facial landmarking

ramasamy-rudram gravatar imageramasamy-rudram ( 2016-08-11 08:56:55 -0600 )edit

The error is generated in dlib and thus this question is not related to OpenCV but rather to a wrapped version. Since this is not the core buisness of this forum, please post your question at the correct place.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-08-12 03:35:37 -0600 )edit

let me clarify: you need to convert to grayscale, before passing it to dlib's shape prediction.

berak gravatar imageberak ( 2016-08-12 04:04:40 -0600 )edit