Pixel values differ between opencv and matlab
When I am displaying the pixel values of an image (a RGB image converted to grayscale) using "display" function in matlab, I found that the pixel values are less than 1 (all values are between 0 and 1). Whereas when I do the same in opencv, I am getting higher values. Why the change in values happen ?
In matlab I think that index are in [1, rows] and in C++ if you use it in [0. rows-1]. Is it help you?
@LBerger: I don't think that's the problem he's facing. Matlab, depending on the functions/data used automatically normalizes pixel values between 0 and 1. OpenCV doesn't do such normalization (afaik), so data is between 0 and 255. @lakshmi8: just apply a linear transformation [0,1]->[0-255] and viceversa to find correspondesces, or force Matlab to use uint8 data (instead of double, which is probably the format used right now)