Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I best compare two BGR colors to determine how similar/different they are?

I apologize for how basic this question is, please bear with me as I'm a beginner to OpenCV

Say I have two colors in BGR format (though I can convert them to another form if I have to - though an explanation on how to do so would be greatly appreciated) - how can I best quantify how similar/different these two colors are? Say, for example, I have a light green and a dark green - these are pretty similar. A light green and a yellow would also be similar, but a dark red and a light blue would be very different.

Is there any simple way to obtain a value that corresponds with the difference between two colors?

all help and advice is appreciated, thanks!