Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to Print Pixel Color Value C++

I have image with all value is 127(grey), and I want to try to pick one of coordinate and print pixel value, value must return 127 with this code :

printf("%d ", nom1.at<uchar>(Point(0, 0)));

but its give me an error . My purpose is to get each pixel color value and print it.

Thank you.

How to Print Pixel Color Value C++

I have image with all value is 127(grey), and I want to try to pick one of coordinate and print pixel value, value must return 127 with this code :127.

printf("%d ", nom1.at<uchar>(Point(0, 0)));

but its give me an error . My purpose is to get each pixel color value and print it.

Thank you.