Experiment No.5
Experiment No.5
Experiment No.5
Software Used:
Programming Language – MATLAB® (Version 7 or higher)
Operating System – Microsoft Windows (XP 32-bit or higher)(Preferable)
Theory:
The various color spaces exist because they present color information in
ways that make certain calculations more convenient or because they provide a
way to identify colors that is more intuitive. For example, the RGB color space
defines a color as the percentages of red, green, and blue hues mixed together.
Other color models describe colors by their hue (shade of color), saturation
(amount of gray or pure color), and luminance (intensity, or overall brightness).
Color spaces are different types of color modes, used in image processing
and signals and system for various purposes. Some of the common color spaces
are:
RGB
HSI
YCbCr
RGB Color Model
In the RGB model, an image consists of three independent image
planes, one in each of the primary colours: red, green and blue. Specifying a
particular colour is by specifying the amount of each of the primary components
present. Figure shows the geometry of the RGB colour model for specifying
colours using a Cartesian coordinate system. The greyscale spectrum, i.e. those
colours made from equal amounts of each primary, lies on the line joining the
black and white vertices.
The YCbCr color space is widely used for digital video. In this format,
luminance information is stored as a single component (Y) and chrominance
information is stored as two color-difference components (Cb and Cr). Cb and
Cr represent the difference between a reference value and the blue or red
component, respectively.
The basic equation to convert between RGB and YCbCr are:
Procedure:
1. Read the input RGB image contents by ‘imread’ function and display.
2. Convert input image to gray image and display.
3. Convert input image to HSI image by implementation of formulae of H,
S, I and display.
4. Convert input image to YCbCr color spaces and display
5. Apply Median filter on RGB image
Conclusion: