# How to get OpenCV to store HSV in Matlab notation [0-1]?

I am working on transferring a working Matlab project to C++/OpenCV, but I'm encountering a problem while converting from BGR to HSV, since the project is intended to work with small numbers that Matlab uses to store HSV values.

If i just do a normalization to the HSV matrix (Hue/179, Saturation/255, Value/255) I will lose a part of data that could be important in the image recognition later on.

**Is there a better way to convert from BGR - HSV without losing part of the data?** Has anyone encountered this problem? What is the most efficient way solve to it?

Thanks

Zvonimir