I'm a beginner in OpenCV and would like to print in my console the specific value of a pixel (RGB format) that I define by clicking on it.
After some searches I managed to prind the coordinates of the click I make on the image.
If anyone knows how to do that please modify this code that I am using:
void mouseEvent (int evt, int x, int y, int flags, void* param)
{
if (evt == CV_EVENT_LBUTTONDOWN)
{
printf("%d %d\n",x ,y );
}
}
and this is what I use to call the function:
cvSetMouseCallback("blah blah", mouseEvent, 0);