Problem 1:
Using cvCvtColor convert a sRGB image into Lab image; In other words change the color space from RGB to LAB
Problem 2:
Do the same in MATLAB and compare results
*********************************************************************************
Lets begin with problem 2
I_srgb=imread('C:\view0.png');
I_lab = applycform(I_srgb,makecform('srgb2lab', 'AdaptedWhitePoint', whitepoint('D65')));
Using cvCvtColor convert a sRGB image into Lab image; In other words change the color space from RGB to LAB
Problem 2:
Do the same in MATLAB and compare results
*********************************************************************************
Lets begin with problem 2
I_srgb=imread('C:\view0.png');
I_lab = applycform(I_srgb,makecform('srgb2lab', 'AdaptedWhitePoint', whitepoint('D65')));
Lets print some values from three channels (L , a , b)
I_lab(1,1:10,1)
ans =
184 186 195 202 203 208 213 214 206 235
Trial>> I_lab(1,1:10,2)
ans =
128 127 125 125 125 124 123 123 125 129
Trial>> I_lab(1,1:10,3)
ans =
148 152 154 153 153 152 149 147 147 148
Now in OpenCV here is the program
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
|