How can I convert to the XYZ color space from a non-standard RGB color profile using the Image Processing Toolbox 4.1 (R13SP1)?

1 view (last 30 days)
Can I convert from a custom RGB color space to the XYZ color space using the MAKECFORM function? I would like to do something similar to:
A = makecform('srgb2xyz')
except, instead of using the sRGB color space, I would like to use a custom RGB color profile.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
To convert from a non-standard RGB color profile to the device-independent XYZ profile connection space, use the following code:
InputProfile = iccread('myRGB.icc');
C = makecform('mattrc',InputProfile.MatTRC, 'direction', 'forward');
Note that this will only work if the ICC profile includes a MatTRC value.

More Answers (0)

Products


Release

R13SP1

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!