my example.

img is dlib image variable. img22 is opencv image variable.

 

 

 

cv::Mat img22 = dlib::toMat(img);
 for(int i=0; i<250; i++)
 {
  for(int j=0; j<250; j++)
  {
   mexPrintf("%d ",img22.at<unsigned char>(i,j));
  }
  mexPrintf("\n");
 }

Posted by uniqueone
,