Color space conversion (cam2xyz)
6 次查看(过去 30 天)
显示 更早的评论
Hello all,
there is a fabulous site where raw image conversion (using Matlab) is described:
In my work, I follow steps described in the article; I use dcraw and later do linearization, white balancing, demosaicing and color space conversion...
In order to apply Bradford matrix and transform my image as being taken under D50 illuminant, I have to perform this multiplication in XYZ color space.
In this article, author does color space conversion: from camera rgb to srgb! This is original code:
rgb2cam = xyz2cam * rgb2xyz; % Assuming previously defined matrices
rgb2cam = rgb2cam ./ repmat(sum(rgb2cam,2),1,3); % Normalize rows to 1
cam2rgb = rgb2camˆ-1;
I would like to do the following color space conversion: from camera rgb to xyz! This is my code:
xyz2cam = xyz2cam ./ repmat(sum(xyz2cam,2),1,3); % Normalize rows to 1
cam2xyz = xyz2cam^-1;
I applied the same logic as author did, but am not sure wether my conversion is correct? Can you please explain normalization step?
Thank you, Matija.
0 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!