I am using the following code to convert an cv::Mat into dlib array2D (which is required to track objects through dlib correlation tracker)
int main()
{
cv::Mat img = cv::imread("wine_plant.jpg");
dlib::cv_image<dlib::bgr_pixel> dlib_img(img);
return 0;
}
But while debugging I get the following error message.
Error C2440 'initializing': cannot convert from 'const cv::Mat' to 'IplImage' yolo_cywine c:\users\antho\documents\c++\dlib-19.7\source\dlib\opencv\cv_image.h 37
Based on other issues already opened on the same matter, I also tried this
cv::Mat img = cv::imread("wine_plant.jpg");
dlib::cv_image<unsigned char> dlib_img(img);
But same result.
Am I missing something or is there something I am doing wrong? Could you please help me out?
Thanks in advance.