This webpage gives an overview of color scalespace or the spatial color model as it can be used in
digital image processing, from digital microscopy and High Content Screening (HCS) to medical imaging and astronomy.
Although this article is limited to 2D, the spatial color approach can be used for 3D and even 4D image processing.
The basic principle is "what you describe is what you get".
For an introduction on differential geometry see
differential geometry. The spatial color model and linear and non linear scalespace
can be combined to select shapes with specific colors.
The 0th order (E) derivative measures the total weight of the light spectrum and corresponds closely
to the luminositiy curve as defined by the CIE 164 standard (standard human observer).
The 1st order derivative (El) of the spectrum measures
yellow-ish minus cyan-ish and the
2nd order derivative (Ell) measures green-ish minus
magenta-ish.
Introduction of spatial extent in the Gaussian color model yields a local
Taylor expansion at wavelength lambda0 and position x0.
The spatial Gaussian color model measures up to the 2nd order in the spectral
axis, the coefficients of the Taylor expansion of the Gaussian smoothed spatio-spectral energy distribution.
Each measurement of a color signal has a spatial (x,y) as well as a spectral (lambda) resolution (scale, sigma).
One probes an energy density volume in a three-dimensional spatio-spectral space,
where the size of the probe is determined by the observation scale sigmax,
sigmay and sigmalambda.
The probe for spatial color is constructed by probing the product of the spatial
and the spectral space with a Gaussian aperture.
The following images illustrate the result of using and combining the derivatives in order to select certain colors. The sigma used for the calculations is 1.
RGB color grid showing the primary colors red,
green and blue and their combinations.
Yellow being a mix of red and green, cyan
being a mix of green and blue and magenta being a mix of red and blue.
The images show a color grid and its first (El) an second order (Ell) color derivative, the Gaussian derivative
was calculated with a sigma of 1.
The derivatives are divided by the original image E for normalisation of the first
order color derivative (El/E) and of the second order derivative (Ell/E).
The normalisation makes the result independent of the color intensity.
The second image on the left shows where the normalised first order color derivative (El/E)
is positive (white), which selects the colors red,
yellow and green. The image on the right shows
where the normalised first order color derivative
(El/E) is negative (white), which selects the colors cyan,
blue and
magenta.
The second image on the left shows where the normalised second order color derivative
(Ell/E) is positive (white), which selects the colors red,
blue and magenta. The image on the
right shows where the normalised second order
color derivative (Ell/E) is negative (white), which selects the colors
yellow, green and
cyan.
The second image on the left shows the result of adding El to Ell. The image on the right
shows where the result of this addition is positive (white), which selects the colors
red, yellow and magenta.
The second image on the left shows the result of subtracting Ell from El, the image on the right
shows where the result of this subtraction is positive (white) which selects the colors
yellow, green and cyan.
The images show the result of dividing El by Ell and the regions in which the result is
positive (second left, white), which selects the colors red and
cyan.
The image on the right shows where the result of this subtraction is negative, which selects the
colors yellow, green,
blue and magenta.
El/Ell or Ell/El as such describe the hue.
By combining the color scalespace with linear scalespace it is possible to selectively
detect colored spots.
The following formulas, which are a combination of linear scalespace and color scalespace will
detect colored elliptic patches on a darker background. The detection is independent of the
intensity of the colored spot over a whide range of intensities.
Other formulas for color detection are possible, this list only gives a basic overview.
Scale, sigma, is 2.0 in all cases.
Other combinations of color scalespace and linear scalespace are also possible,
eg. line detection.
Red:
Lww<0 and LvvLww-Lvw2>0 and El>0 and Ell>0
Yellow and Green:
Lww<0 and LvvLww-Lvw2>0 and El>0 and Ell<0
Green:
Lww<0 and LvvLww-Lvw2>0 and El>0 and Ell<0 El+Ell<0
Yellow:
Lww<0 and LvvLww-Lvw2>0 and El>0 and Ell<0 El+Ell<0
Cyan:
Lww<0 and LvvLww-Lvw2>0 and El<0 and Ell<0
Magenta and Blue:
Lww<0 and LvvLww-Lvw2>0 and El<0 and Ell>0
Magenta:
Lww<0 and LvvLww-Lvw2>0 and El<0 and Ell>0 and El+Ell>0"
Blue:
Lww<0 and LvvLww-Lvw2>0 and El<0 and Ell>0 and El+Ell<0"
Red, Yellow and Green:
Lww<0 and LvvLww-Lvw2>0 and El>0
Blue, Cyan and Magenta:
Lww<0 and LvvLww-Lvw2>0 and El<0
Red, Blue and Magenta:
Lww<0 and LvvLww-Lvw2>0 and Ell>0
Green, Yellow and Cyan:
Lww<0 and LvvLww-Lvw2>0 and Ell<0
Red, Yellow and Magenta:
Lww<0 and LvvLww-Lvw2>0 and El+Ell>0
Blue, Green and Cyan:
Lww<0 and LvvLww-Lvw2>0 and El+Ell<0
Color Canny edge detection, sigma (scale) of the Gaussian in this case was 2.
The color canny edge detector was used with shadow and highlight invariance (H), and
no non maxima suppression.
The main advantage of the El, Ell color space is the color differentiatibility, as shown here.
Several invariants for the detection of color edges are defined.
The following color invariants are currently available:
H = shadow and highlight invariance (White)
N = illumination color and shadow invariance (Colored)
C = shadow invariance (WhiteMatte)
W = intensity normalization (WhiteUni)
E = not invariant for anything (NoInvar)
Sensitivity of the invariants in table form:
| Geometry shadow | Highlight | Illumination profile | Illumination intensity | Illumination color |
||
| Dominant color (Hue) | H | - | - | - | - | + |
| Object color | N | - | + | - | - | - |
| C | - | + | - | - | + | |
| Normalised color | W | + | + | + | - | + |
| Spectral color | E | + | + | + | + | + |
The invariants are orderable on both degree of invariance and (opposite)
dicriminatory power:
Discriminative power E > W > C > N > H as opposed to their invariance.
Hints and tips:
For bright-field microscopy, N is the best choice for color edge detection, since it
has high discriminative power, but is invariant to illumination distribution (unequal
background) and illumination color.
Mouse tail section stained with hematoxylin and eosin.
By chosing the right invariant Canny color edge detector (N, illumination color
and shadow invariance), the detected color edges are very robust (invariant) to
changes in illumination color tempearture.
Four color separation of fluospheres by solving a system of differential equations for each color, sigma is 1.0. In this case the spatial color is being used as the sole discriminator without additional spatial constraints, i.e. selection is on spatial color only.
Four separate exposures of three TetraSpeck beads (TetraSpecktm microspheres,
4.0 um, fluorescent blue/green/orange/dark red) photographed using optical filter sets
appropriate for DAPI, fluorescein, rhodamine and Texas Red dye. The stage was shifted
after each exposure.
The same beads appear blue, green, orange or red, depending on the
filters used.
Detection of fluorescent blue stained nuclei, sigma is 2.0. In this case the spatial color is being used as the sole discriminator without additional spatial constraints, i.e. selection is on spatial color only.
For additonal information you may also contact my former colleague Jan-Mark Geusebroek (currently UvA) or Prof. Bart M. ter Haar Romeny (T.U. Eindhoven).
I am indebted, for their pioneering work on automated digital microscopy and High Content Screening (HCS) (1988-2001), to my former colleaguas at Janssen Pharmaceutica (1997-2001), such as Frans Cornelissen, Hugo Geerts, Jan-Mark Geusebroek, Roger Nuyens, Rony Nuydens, Luk Ver Donck and their colleaguas.
Many thanks also to the pioneers of Nanovid microscopy at Janssen Pharmaceutica, Marc De Brabander, Jan De Mey, Hugo Geerts, Marc Moeremans, Rony Nuydens and their colleagues. I also want to thank all those scientists who have helped me with general information and articles.
The author of this Webpage is Peter Van Osta.