How to convert lab color space to rgb color image?

6 views (last 30 days)
To correct non uniform illumination in a retinal image, i have converted the rgb color image to CIE lab color space, then the luminance (l) is processed separately and combined it with the chrominence (a,b). Now i want to convert it back to rgb color space.

Answers (1)

Image Analyst
Image Analyst on 18 Oct 2014
Use makecform and the lab2rgb option.
Or you can use rgb2hsv and hsv2rgb, like I do most times. LAB doesn't always have the same color for different L values, just run the attached demo to see an illustration.
  1 Comment
DGM
DGM on 19 Mar 2022
Or you could say that color points are not constrained when working in LAB, so points can be moved out of gamut. Where they go after that is a matter of the rendering intent used by the conversion tools.
All out-of-gamut colors mapped to black:
HSV and HSL are constrained. Any color point in the cylinder described by the extents of H,S and L/V lies within RGB. Most other color models (including HSI) are not constrained, so operations within them may move colors out-of-gamut and cause unexpected color shifts when converting to RGB.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!