i want to convert srgb to CIElab color space without using srg2lab and through x,y,z values. so what will be reference white here???
4 views (last 30 days)
Show older comments
RGB(1, 1, :) = [255 255 255];
rRGB=RGB(:,:,1);
gRGB=RGB(:,:,2); bRGB=RGB(:,:,3);
M = [0.4124564 0.3575761 0.1804375
0.2126729 0.7151522 0.0721750
0.0193339 0.1191920 0.9503041] ;
X1 = rRGB * 0.4124564 + gRGB * 0.3575761 + bRGB* 0.1804375;
Y1 = rRGB * 0.2126729 + gRGB * 0.7151522 + bRGB* 0.0721750 ;
Z1= rRGB * 0.0193339 + gRGB * 0.1191920 + bRGB* 0.9503041 ;
X= (X1./RGB(2))*100;
Y = (Y1./RGB(2))*100;
Z = (Z1./RGB(2))*100;
yn=116 *(Y/Yn);
cn= 500*(((X/Xn)^1/3)-((Y/Yn)^1/3));
bn= 200*(((Y/Yn)^1/3)-(Z/Zn)^1/3); so what will be this xn,yn,zn or reference whites?????
0 Comments
Answers (0)
See Also
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!