Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

EE 604

Image Processing
Opening and closing
• Opening: . Opening tends to open up gaps
between segments of the foreground.

• Closing: . Closing tends to seal up gaps


between segments of the foreground.
Frequency domain enhancement
• Enhancement in the frequency domain
requires to be preceded by proper
sampling at the Nyquist rate, then DFT,
and followed by a reversion to the
space domain.
• Failing to meet the sampling
requirements results in fold over which
in turn results in moire patterns. The
middle image is derived from the first
by downsampling without LP filtering
(note the scarf) though it is sharper,
while the third one is downsampled
after proper LP filtering. No moire by a
bit blurred.
Undersampling and moire
• Moire phenomena are akin to beat
phenomena in acoustics. Both result from the
superposition of nearly same, but non
identical periodic patterns in space or time
respectively.
• Moire in images arises from improper
sampling, where leakage os alias energy of Gonzalez
nearly the half of the sampling rate causes it
to occur.
Google images
Filtering out the dc

dc suppression

Microscope Image of IC, magnitude spectrum.


Filtering: lowpass, highpass

Col 1: image below


results from the
lowpass Gaussian
filter above, blurred
as expected;
Col 2: High pass
filtered with zero dc
passed through;
Col 3: High pass
filtered but with
some dc
passthrough.
Progressive lowpass filtering

Above: original image with its magnitude spectrum. The


concentric circles represent various options for the cutoffs
of a series of lowpass filters.
Towards the right: going from top to bottom, the outputs of
increasingly wider filters.
Colour
Representation and Processing
Colour vs wavelength
• Strictly speaking, there are an infinite number
of different wavelengths (spectral colours)
within the visible band, and each one ‘looks’
different. Visible Spectrum 400-700nm

• But we have only 3 different types of cones.


• So, it is possible to find a linear combination
of just 3 different spectral colours whose
appearance matches that of any given spectral
colour, even though such a combination is
definitely physically different. Eg: a
spectrometer will show the difference – but
the eye thinks the are same.
• The set of all 3-vectors of cone responses is
the set of all visible colours.
Cone Response Curves
Colour substitution
• Consider any physical colour. It is a mixture of certain spectral colours. Assume it is
a finite mixture. where the are spectral colours.
• Let the response vectors for spectral colour be
• For each spectral component , we can find 3 suitable primaries for which there
exists such that the appearance of the dot product .
• Then, the original consisting of arbitrary spectral colours is the same visible colour
as the combination , which is to say that .
• The above establishes that any physical colour can be replicated/imitated by
combining suitable properly chosen basic (primary) colours.
Important points
• Every physical colour is different: but many completely different physical colours
‘look’ identical to the HVS. This happens if the response vectors are identical (even if
they are very close, but we shall bring that up later).
• The choice of primaries we can pick is generally not unique. The weight vector
depends on the choice of primaries used for synthesis. Usually, we use the CIE 1931
standard nm.
• From the theory of vector spaces, we know that we can span the visible colour space
using any 3 linearly independent visible colours: in turn, as already discussed so far,
each such visible colour may be synthesized by innumerable combinations of physical
colours. This gives us an even larger set of options to synthesize a specific visible
colour.
• In general, let be the weights, called tristimulus values in for the 3 selected primary
visible colour vectors. We define the trichromatic coefficients . Evidently, and .
Chromaticity diagram

• The normalized tristimulus coefficients , are


evidently independent of overall intensity In this
sense, they represent the pure distilled notion of
colour, made independent of its intensity. Red,
bright or dim, is still red, and so, there a fixed set
of tristimulus coefficients to represent that
particular shade of red.
• Since they add up to unity, only 2 of the three
tristimuli are actually independent in , as . This
makes this ‘colour’ actually 2 dimensional.
• The colour appearance of each tristimulus vector
may therefore be plotted on the plane to give a so
called chromaticity diagram.
Chromaticity diagram

• The 2 dimensions of chromaticity are the nature and


the purity of the colour.
• Close to the periphery of the chart are the purest
colours – undiluted by white, while close to the
middle are the most washed out colours – the whites.
• The tristimuli representing the spectral colours lie on
the periphery.
• On the chart, mixtures obtained from two specific
points lie along the line joining them. Mixtures of
three points, lie in the triangle formed by them. In
all cases the mixture points lie within the chart, as it
is convex in shape. If the points are the primaries,
then the set of resulting mixtures are their respective
gamut.
Additive, subtractive primaries

• Colour mixtures are formed in 2 two distinct ways: by


the addition of lights, resulting in a mixture that
contains both components, and the subtractions from
pigments, which contains the intersection of the
components.
• Additive primaries are spectrally narrow eg: more the
primaries combined, wider the spectrum of the
mixture. white.
• Subtractive primaries are spectrally wide, effectively
the spectral complements of the additive primaries,
eg, (cyan, magenta, yellow); more the primaries
combined, narrower the spectrum of the mixture.
black.
Colour models: RGB

• Used to represent combinations of additive primaries


(CIE 1931) in a rectangular coordinate system.
• THE 24-bit cube has the combinations (Hex values 00 RGB cube
00 00 to FF FF FF). Most monitors can display them, but
there can be considerable misrepresentation due to the

Gonzalez
fine quantization involved.
• The safe set is a highly restricted subset made up of a
selection of just 6 out of the 256 levels, viz, {0, 51,
102, 153, 204, 255} = {00, 33, 66, 99, CC, FF}hex.
Because of the extremely coarse quantization, the
reproduction is seen to be reliable across devices. The
total gamut has only 216 colours.
Safe RGB
Gonzalez
Colour models: HSI

• The HSI model seeks to properly separate the


intensity from the sensation of colour. This begins
by recognising that along the body diagonal of the From RGB to HSI
cube lies the line of greys, or zero saturated (fully
diluted) colours, while the extreme vertices lie on
the locus of the pure spectral colours.
• Any line from and normal to the body diagonal,
the ‘line of greys’ starts with S = 0 and ends on
the periphery of the cube with S = 1.
• In each direction away from the line of greys lies a
different hue, H. Values of H are indexed from 0
(Red) to 360 (Red).

HSI space

You might also like