C,C++/OpenCV
Print out the values of a matrix in OpenCV C++
uniqueone
2016. 9. 28. 17:16
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");
}