Pixel intencity difference in opencv and Matlab [closed]
I am trying to implement various Matlab functions rgb2lab in opencv. I got output images(in opencv) similar to Matlab. But their pixel values are different. For example output pixels values of 2x2 pixel image:
- Opencv pixel values : [255, 255, 255, 255, 255, 255; 255, 255, 255, 255, 255, 255]
- Matlab pixel values : e(:,:,1) = 51.0815 51.0815 51.0815 51.0815 e(:,:,2) = 33.3777 33.3777 33.3777 33.3777 e(:,:,3) = 10.6660 10.6660 10.6660 10.6660 Please help me to resolve my problem. How it happen?
You should seriously stop implementing things for a while and start to understand what you're doing and what you should expect as outcome. From the last questions asked by you I see you have little understanding of the different types of data (float, uchar/uint8), the problems that can be caused by working/converting between them if handled incorrectly (underflow, overflow, truncation) and other important things such as normalization. Also, Matlab and OpenCV work in different ways when showing images, and you should search and understand such differences before trying to compare results.
And you should start using the documentation's search option before implementing everything over again. The wheel has already been invented, right here. This can be closed down.