ColorSpace : User manual 0.98

ColorSpace : User manual 0.98
Philippe Colantoni
The aim of this software is to display color information in different color spaces.
It can realize color conversion in RGB, CMY , XYZ, xyY , I1 I2 I3 , U V W ,
LSLM , L∗ a∗ b∗ , L∗ u∗ v ∗ , LHC, HSV , HSI, HSV P olar, HSIP olar, LHS,
Y U V , Y IQ, Y CbCr, LM S, LM Slog , Llog Mlog Slog , Lαβ, Spectral, SpectralP olar
color spaces.
It proposes two visualization methods:
1. A 2D representation of the colors (image representation with pseudocolor).
2. A 3D representation of the colors where the coordinates of each color (in a
particular color space) are used to determine the position in the 3D space.
It uses Gtk as GUI, this library originally developed for X-Windows graphic
interface is now available on Windows systems (thanks TLM for the Win32 port
of this library: By using Gtk, we
are able to build, without code modification, Unix and Windows versions of this
The 3D color space visualization method uses OpenGL to display the 3D
color information.
Image Reader/Viewer
When you run the software a first window appear (see fig. 1(a)). This window
is an image reader/viewer. You can select the file to read using: the command
line, the “File/Open” menu or by a drag and drop from the file explorer of
ColorSpace can read image from the web (only the http protocol is supported). The “File/Open URL” menu makes appear a new window where you
set the URL of the image and configure your proxy.
(a) Image Viewer
(b) Image Viewer with ROI
Figure 1: Image Reader/Viewer
• On Windows ColorSpace uses the Internet Explorer proxy configuration.
• On Linux ColorSpace uses the http_proxy environment variable.
ColorSpace is now able to save is state (“File/Save state” menu). This is
a major improvement which allows users to save and to replay sessions. This feature has been integrated to ICobra (
an image content based retrieval application which can generate online state file.
The web site will integrate tutorials using the same principle.
Warning: State file extension must be .csi
The ImageMagick library is used to read the image files (image with 16 bits
by channel are accepted). This library can read a tremendous variety of file
formats (see the web site of ImageMagick to get the whole list:
A selection mechanism using color transparency has been included in the
image viewer. You can select different regions of interest (ROI) in the image,
at each of these ROI corresponds one transparency color (see fig. 1(b)).
This first window can be used as a simple image viewer. It includes all the
basic features of this kind of tool:
• Status bar with the current color value, zoom factor and the mouse pointer
coordinate (within the image coordinate system).
Figure 2: Zoom window
• Zoom In/Out in the window with the menus “Visualization/Zoom/Zoom
In” and “Visualization/Zoom/Zoom Out” or directly with the mouse:
“Control + Left click” (Zoom In), “Control + Right click” (Zoom Out).
• Zoom window (menu “Visualization/Zoom/Zoom Window”). When you
select this menu a new window becomes visible, this window shows at
each moment (according to a specific zoom factor) the neighborhoods of
the pixel behind the mouse pointer. It is possible to change the zoom
factor in the window with a “right click” (see fig. 2).
• Hide/Display the rulers, the scroolbars, the menu, the status bar, the grid
with the menus in “Visualization/Display”
• Gamma correction changes only the appearance of the colors. This function does not change the image buffer values.
Note: You can find the same menus with a “right click” on the image.
You can select different regions of interest (ROI) in the image, at each of
these ROI corresponds one color. With our selection method a ROI can be
composed by a set of non-connected pixels.
There are two methods to enable the selection mode in the image viewer:
• Using the toggle button at the right bottom of the window (the color of
this button is the current color of the selection)
• Using the menu “Selection/Display Selection”.
The index selection (“Selection/Select index”) enables to switch the current
ROI. A single click on a color changes the current ROI to this color. A “Double
click” on a color activates a new window where you can select the associated
color to the ROI.
Note: You can access to the index selection by a “right double click” on the
selection button.
Different drawing modes and brushes are available:
• In “Selection” the menus switch the current drawing mode (pen, line,
rectangle, ellipse or hand).
• The menu “Selection/Select Brush” shows a new window with different
By default, the undo level for all drawing operations is 10; you can change
this value with the menu “Edition/Undo Level”.
Color Space Converter
Figure 3: Color space converter window
The color space converter window (“Color/Color spaces” menu in Image
viewer window) is a selector for different color spaces. It includes three menus
associated to different methods to display the color information of an image.
The main part of the window is dedicated to the color space selection and
configuration (see fig. 3).
For color spaces that use XYZ as intermediate color space, the primaries
and the reference white can be changed directly or by using some predefined
values.You can save and reload these values.
Warning: Calibration file extension must be .csi
This window is the control center of this software. It is designed to launch
the different windows used to display the color information:
• Within an image where each color channels of the original color space are
associated with the red, green and blue channels of the displayed image.
• Within a 3D viewer.
Hybrid Color Space Converter
The hybrid color space converter window (“Color/Hybrid color spaces” menu
in the Image Viewer window) is a selector for hybrid color spaces (see the color
space transformations documentation).
This window displays directly the content of the image conversion. Each channel
is mapped respectively to the red, green and blue channels of the displayed image
(see fig. 4(a)). You can display separately (menu “Visualization/Channel”) and
change the look up table (LUT) used to visualize the channel information (menu
“Visualization/Channel/Lut”, there are 7 different LUT) (see fig. 4(b)).
This window shares the same properties as the Image Viewer and allows a
ROI selection process.
3D Color Space Visualization
The first goal of this program was to propose an interactive method to visualize
the 3D dimensional aspect of the color information (see fig. 5(a) and fig. 5(b)).
The 3D color space visualization window uses OpenGL to display the 3D color
There is two methods to transfer the color information:
1. Using the “Visualization menu”:
• “Visualization/Get Image From Viewer” takes all the colors from the
image viewer window.
• “Visualization/Get Selection From Viewer” takes all the selected colors within the image viewer window.
2. Using a “drag and drop” process:
(a) L∗ a∗ b∗ (all components
are visible)
(b) xyY (only x component
is visible
Figure 4: Image
• “Middle Button” or “Shift+ Right Button” drags the ROI colors
from the image window and release the button drops theses colors in
the 3D window (a hash table is used to reduce the color number).
• “Control + Middle Button” or “Control + Shift + Right Button”
drags all the colors from the image window.
3D Navigation
The navigation process uses a camera, we define this camera with its position
and its target (in Cartesian or Spherical coordinates):
• “Left Button”: modify the camera position and keep the distance to the
• “Shift + Left Button”: modify the target position and keep the distance
to the camera.
• “Middle Button” or “Control + Left Button”: modify the distance to the
• “Right Button”: translate the camera position according to a perpendicular plane to the vector defined by the camera and the target.
• “Shift + Right Button”: translate the camera and the target position with
the same vector.
(a) L∗ a∗ b∗ color space
(b) xyY color space
Figure 5: 3D Visualization
Camera Window
Figure 6: Camera window
The camera window (see fig. 6) offers to change the camera properties. These
properties include the position of the camera and its target in Cartesian coordinates (“Position” and “Target”) and in Spherical coordinates (“Distance”, “Phi”
and “Theta”). “Fov” allows to adjust the field of view value and “Perspective”
to choose the visualization mode (perspective or orthographic projection).
Visualization Menu
In this menu (see fig. 7(a)) you can change different properties:
• “Display Color” lets to display (or not) the colors.
• “Display Axes” lets to display (or not) the axes.
• “RGB cube” lets to display (or not) the RGB cube associated to the
current color space.
• “Light” enables or disables the openGL light (if you want to see the true
colors disable this menu)
• “Point” displays each color as a point.
• “Wireframe”, “Flat”, “Smooth” display each color as a geometric primitive with different openGL properties.
• “Display transfer information” when you enable this feature the color information (total number of color...) is displayed when you transfer the
• “Benchmark” lets your evaluate the current frame rate.
(a) Visualization Menu
(b) Objects Menu
Figure 7: Menus
For color spaces that use XYZ as intermediate color space, you can display
the CIE 31 and 64 standard observers with the following menus:
• “Display CIE31 standard observer”
• “Display CIE64 standard observer”
You can change the properties of the standard observers with the “CIE 31-64
Properties” menu.
Object menu
This menu (see fig. 7(b)) can be used to change the geometric primitive used
to visualize the colors (if you are in Wireframe, Flat or Smooth mode).
Viewport Properties Window
The Viewport Properties Window (see fig. 8(a)) allows to change the background color and the size of the 3D window.
(a) Viewport window
(b) Color space configuration window
Figure 8: Configuration windows
Projections Properties Window
The user has two reasons to display color projections: (1) in order to increase
the relief effect. The human visual system will consider the projection as a
shadow. That shadow will be used by the brain to build the 3D representation
of the 2D image. (2) in order the visualize the colors density. For this purpose,
we use transparency effet which allows us to modulate the projected colors when
multiple points are projected at the same place.
User can modify projection properties such as: projection planes (multiple
projections planes are allowed), projection color and projection transparency.
Color Space Configuration Window
The Color Space Configuration Window (see fig. 8(b)) lets to modify the 3D
display properties (RGB cube properties, axes properties...).
Informations Window
This window (see fig. 9) displays the color cloud statistics.
3D Histogram Visualization
This window is very similar to the 3D Color Space Visualization window. It
can be used to visualize the color histogram (see fig. 10(a) and fig. 10(b)) of an
image (or a ROI).
With this representation we use the size of geometric primitive to evaluate
the colors density.
Figure 9: Informations window
(a) L∗ u∗ v ∗ color space
(b) I1 I2 I3 color space
Figure 10: Histograms
Download PDF