|
|
Line 435: |
Line 435: |
|
| |
|
| '''Potential mentor''': Carnë Draug | | '''Potential mentor''': Carnë Draug |
|
| |
| === Color management functions in image package ===
| |
|
| |
| {{Warning|requires review and mentor}}
| |
|
| |
| The goal is to implement these functions:
| |
|
| |
| iccread
| |
| iccwrite
| |
| makecform
| |
| applycform
| |
|
| |
| These functions are useful for color management, in particular for converting data (especially images) between color spaces. ICC profiles are essentially used to store look-up tables or matrix transforms (or both) that define the conversions. For example, to convert an CMYK image to sRGB, you would load a "print" ICC profile that defines the conversion from CMYK to L*a*b* (the CIE color space that is supposed to match the human visual system), then load another profile that defines the conversion from L*a*b* to sRGB (there is a standard profile for this conversion (IEC 61966-2-1), which is why Matlab has a built-in conversion from sRGB to L*a*b*). To do the above conversions in Matlab, you would use the following code:
| |
|
| |
| <syntaxhighlight lang="octave">
| |
| cmykImage = double(imread('cmyk-image-filename.tif'));
| |
| iccProfile = iccread('icc-profile-filename.icc');
| |
| labImage = applycform(cmykImage, makecform('clut', iccProfile, 'AToB3'));
| |
| rgbImage = applycform(labImage, makecform('lab2srgb'));
| |
| </syntaxhighlight>
| |
|
| |
| The <code>'AToB3'</code> selects one of the color transforms (look-up tables) contained in the profile. This one is "Absolute Colorimetric." More details on ICC profiles may be obtained from [http://www.color.org/icc_specs2.xalter the ICC spec].
| |
|
| |
| Knowledge of ICC profiles (at least knowledge of their application) would be a prerequisite. Since [http://www.littlecms.com/ littlecms] implements all the necessary functions for reading, writing, and applying profiles, it would be primarily a matter of integrating this library into Octave (assuming that is the preferred implementation -- one could certainly read the ICC files directly, but why reinvent that particular wheel).
| |
|
| |
| '''Required skills''': C++ programming, some knowledge of ICC profiles desirable.
| |
|
| |
| '''Difficulty''': Easy.
| |
|
| |
| '''Possible Mentor''': TBD
| |