Ask Your Question
0

BGR2HSV result is different with matlab

asked 2013-12-31 02:01:54 -0600

When I convert an image from RGB to HSV with cvtColor(src,dst,CV_BGR2HSV ,0), I get a really different result compared with the one i get from Matlab's rgb2hsv function, Please tell me which is right.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2013-12-31 13:30:14 -0600

xaffeine gravatar image

You may have some confusion about the order of the colors in the pixel (BGR vs RGB). Take a look at the definition of HSV color space and then, if necessary, experiment using images of known colors (e.g. all blue, all red, etc.).

edit flag offensive delete link more

Comments

Thanks, Maybe that's because the 'imwrite' function, the writen sequence is BGR, and the coefficient is different.

Sunshine gravatar imageSunshine ( 2014-01-01 02:28:35 -0600 )edit

Question Tools

Stats

Asked: 2013-12-31 02:01:54 -0600

Seen: 1,004 times

Last updated: Dec 31 '13