1 | initial version |
OpenCV is Row-major, not column-major Stored Row1: BGRABGRA... Row2 BGRABGRA....
I don't see anything obviously wrong with your code. That will give you a CV_32F between 0 and 1.
If you mean, you go back to BGR later using an OpenCV function, then yes. OpenCV doesn't apply any scaling automatically. So your result if you put a float gray through cvtColor would be between 0 and 1, and still be a float. Then when you convert it back to CV_8U, you would have to scale it by 255 again.