I have a cv::Mat color and to print the color I use cout << color.at<cv::vec3b>(row,col); It gives me [100,100,100].
but when I use cout << color.at<cv::vec3b>(row,col)[0] I get weird characters.
1 | initial version |
I have a cv::Mat color and to print the color I use cout << color.at<cv::vec3b>(row,col); It gives me [100,100,100].
but when I use cout << color.at<cv::vec3b>(row,col)[0] I get weird characters.
2 | No.2 Revision |
I have a cv::Mat color and to print the color I use cout << color.at<cv::vec3b>(row,col); It gives me [100,100,100].
but when I use cout << color.at<cv::vec3b>(row,col)[0] I get weird characters.
Seems like this works
uint8_t r = color.at<cv::Vec3b>(row,col)[0]
cout << unsigned(r);