OpenCV Single Channel Pixel Value Number Colour [closed]

asked 2019-10-10 10:48:16 -0600

lacrast gravatar image

updated 2019-10-11 02:29:38 -0600

Hey guys, do you know how opencv decides on the colour of the pixel value number as seen in the attached image? This is a max zoomed in portion of the red channel in an rgb image in opencv imshow. I'm interested in how they decide to colour the number white/grey/black.

image description

For example, in the image, pixels with values 128 and above are black whereas below 128, it's closer to white.

I've searched for any answers to this but found none.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by lacrast
close date 2019-10-11 04:03:38.521749

Comments

please put images here, not on an external drive, thank you.

berak gravatar imageberak ( 2019-10-11 01:43:18 -0600 )edit

i either don't understand it, or it's trivially: if the patch brightness to visualize is < 128, use white to plot numbers, else black ? or even (255 - Y) for maximim contrast ?

berak gravatar imageberak ( 2019-10-11 01:58:57 -0600 )edit

Apologies for adding an external image link. I think you are right with regards to it being trivially, to visualise < 128, use white dot else black. I've looked at some of the other channels and it seems that's the answer. Thank you.

lacrast gravatar imagelacrast ( 2019-10-11 02:31:36 -0600 )edit

which method are you using to display the pixel values?

Jorge Diaz gravatar imageJorge Diaz ( 2019-10-11 03:47:31 -0600 )edit