Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

For color to gray conversion the following formula is used:

Gray=0.3R+0.59G+0.11B

That's because the human eye doesn't have the same sensibility for different colors.

As the R and B channels don't have the same weight, the gray image will be (slightly) different if you switch the two channels. This affects the gradient values, so the HOG results will differ too.

Anyway, OpenCV uses BGR encoding, so you should stick to that data format.