Facing output difference while using different OpenCv Versions

asked 2013-11-26 00:30:11 -0500

Balaji gravatar image

updated 2013-11-27 21:48:47 -0500

Previously, I was using OpenCV 2.2 and now I am using OpenCV 2.4.5. The output of the cvCvtColor() function is different when converting from RGB to HSV, and the difference is in H(Hue).

The input of RGB is (211,216,255) and the output is:

•Using OpenCV 2.2: (116,44,255) •Using OpenCV 2.4.5: (117,44,255) The output difference is found in the Hue array (116 | 117). When I calculated it manually using the formula mentioned in the documentation, the output is 116.590909. So the assumption here is that OpenCV 2.4.5 rounds off the value and OpenCV 2.2 discards the values after the decimal point.

Can anyone please let me know why this difference happens?

edit retag flag offensive close merge delete