HSI and CIE lab color model
3 views (last 30 days)
Show older comments
Both HSI and Lab color model are human perception based but what is the advantage and drawbacks of HSI color model and CIELab color model?
How CIELab is superior then HSI and why HSI is weak as compared to CIELab?
Please Elaborate concepts...
0 Comments
Answers (1)
Image Analyst
on 24 May 2014
It usually comes down to the shape of the 3D color gamut and which color space will be easier to do thresholding in. If what you need can be gotten by carving out a box, then lab is good. If you need cylindrical coordinates to carve out a pie-shape, then hsv, hsi, hsl is easier.
lab is not necessarily superior to HSI and HSI is not weaker than lab. It just depends on what you're going to do. In fact you could make the reverse argument, that hsv is better than lab because the color (hue) does not depend on the lightness like with lab. Run the attached demo and look how the colors look different in LAB color space as the lightness changes, but see how the colors (hues) stay the same in hsv color space.
2 Comments
Image Analyst
on 24 May 2014
It's like I said, if their gamut is a box shape, then lab might be better. It just depends. Why don't you get the 3D color inspector plug-in for IMageJ http://rsb.info.nih.gov/ij/plugins/color-inspector.html and install it in MATLAB:
% Windows installation instructions:
% First, download and install ImageJ from here:
% http://rsb.info.nih.gov/ij/download.html
% Then download the 3D Color Inspector plug-in for ImageJ here:
% http://rsb.info.nih.gov/ij/plugins/color-inspector.html
% and save it here:
% C:/Program Files/ImageJ/plugins/Color
%
% Now we need to enable the plug-in to work with MATLAB.
% First open your classpath file:
% C:\Program Files\MATLAB\R2013b\toolbox\local\classpath.txt
% for editing. Then add the following lines as new lines to your classpath file:
% C:/Program Files/ImageJ/ij.jar
% C:/Program Files/ImageJ/plugins/Color/Color_Inspector_3D.jar
% Just put them as the first two lines, without any # symbols, right before this line:
% # DO NOT MODIFY THIS FILE.
%
% With Windows 7 you will need to save this to a different folder, like your Documents folder
% or some folder you have write privileges for, because Windows won't let you save
% anything under the Program Files folder. Then copy it over to the
% C:\Program Files\MATLAB\R2013b\toolbox\local folder and say Yes when it asks
% you if it's allowed to do the copy. Close down MATLAB if it's open, then start MATLAB.
% After starting MATLAB, type javaclasspath on the command line
% to verify that the folders have been recognized and added to the javaclasspath.
clc; % Clear the MATLAB command window.
% User must browse for the file they want to open.
% Set up a starting/initial folder that they will start browsing from.
startingFolder = pwd; % Change to something specific if you want.
if ~exist(startingFolder, 'dir')
startingFolder = pwd;
end
% Bring up the "Open File" dialog box.
[baseFileName, folder] = uigetfile({'*.jpg;*.tif;*.png;*.gif;*.bmp','Image Files (jpg,tif,png,bmp,gif)';...
'*.*','All Files (*.*)' },'Specify image file', startingFolder);
if baseFileName ~= 0
% If they didn't click Cancel, build the full filename:
fullFileName = fullfile(folder, baseFileName)
% Now pass that into the 3D Color Inspector plugin, and you're done.
color_inspector(fullFileName)
end
and you'll be able to visualize the 3D color gamut of your own images, like this:
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!