0% found this document useful (0 votes)
24 views23 pages

Chapter 5 DIP

Uploaded by

Salih Akadar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views23 pages

Chapter 5 DIP

Uploaded by

Salih Akadar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 23

Chapter 5

Color Image Processing and deep learning for


object recognition
Color Image Processing
 In automated image analysis, color is a powerful descriptor,
which simplifies object identification and extraction.
 When a beam of sunlight is passed through a glass prism, the
emerging beam of light is not white but consists of a
continuous spectrum of colors (Sir Isaac Newton, 1666).

 The color spectrum can be divided into seven broad regions:


violet, indigo, blue, green, yellow, orange, and red.
Color Image Processing
 Due to the absorption characteristics of the human eye, all
colors perceived by the human can be considered as a variable
combination of the so called three primary colors:
 Red (R) (700 nm)
 Green (G) (546.1 nm)
 Blue (B) (435.8 nm)
Color Image Processing
 The human visual system can distinguish hundreds of
thousands of different color shades and intensities, but only
around 20-30 shades of grey.
 Therefore, in an image, a great deal of extra information may
be contained in the color, and this extra information can then
be used to simplify image analysis, e.g. object identification
and extraction based on color.
 Three independent quantities are used to describe any
particular color.
 hue is determined by the dominant wavelength.
 Visible colors occur between about 400nm (violet) and 700nm
(red) on the electromagnetic spectrum, as shown in figure 1
 The saturation is determined by the excitation purity, and
depends on the amount of white light mixed with the hue.
 A pure hue is fully saturated, i.e. no white light mixed in.
Hue and saturation together determine the chromaticity for a
given color.
 Finally, the intensity is determined by the actual amount of
light, with more light corresponding to more intense colors.
color Models (color space or color system)
 color models provide a standard way to specify a particular color,
by defining a 3D coordinate system, and a subspace that contains
all constructible colors within a particular model.
 Any color that can be specified using a model will correspond to
a single point within the subspace it defines.
 Different types of color models:
 RGB

 CMY

 YIQ etc..
1 The RGB Model
 In the RGB model, an image consists of three independent
image planes, one in each of the primary colors: red, green and
blue.
 Specifying a particular color is by specifying the amount of
each of the primary components present.
 The below figure shows the geometry of the RGB color model
for specifying colors using a Cartesian coordinate system. The
greyscale spectrum, i.e. those colors made from equal amounts
of each primary, lies on the line joining the black and white
vertices.
Figure 2: The RGB color cube. The greyscale spectrum lies on the line joining the
black and white vertices.
 This is an additive model, i.e. the colors present in the light add to
form new colors, and is appropriate for the mixing of colored light
for example.
 The image on the left of figure 3 shows the additive mixing of red,
green and blue primaries to form the three secondary colors yellow
(red + green), cyan (blue + green) and magenta (red + blue), and
white ((red + green + blue).
 The RGB model is used for color monitors and most video cameras.
2 The CMY Model

 The CMY (cyan-magenta-yellow) model is a subtractive model


appropriate to absorption of colors.
 Whereas the RGB model asks what is added to black to get a
particular color, the CMY model asks what is subtracted from
white.
 In this case, the primaries are cyan, magenta and yellow, with
red, green and blue as secondary colors (see the image on the
right of figure 3).
 The CMY model is used by printing devices and filters
cont..

Figure: 2
3. The YIQ Model
 The YIQ (luminance-inphase-quadrature) model is a recoding
of RGB for color television, and is a very important model for
color image processing.
 The luminance (Y) component contains all the information
required for black and white television, and captures our
perception of the relative brightness of particular colors.
Color Transformations
 Color transforms are fundamental operations in digital image
processing used to manipulate the color information in an
image.
 These transforms allow us to change an image's color space,
alter color balance, adjust brightness and contrast, and perform
a variety of other color-based operations.
 There are several color models used in digital image
processing, each with its unique characteristics and
applications.
 Understanding color transforms in digital image processing is
crucial for many image processing applications, including
color correction, color enhancement, and image compression.
Morphological image processing and Image
segmentation
Morphological Image Processing:
 Morphological operations are simple yet powerful techniques
based on the shape of an image. Two fundamental
morphological operators are:
 Erosion: Shrinks the white regions in an image by

removing pixels from the boundaries.


 Dilation: Expands the white regions by adding pixels to

the boundaries.
 These operations are used to modify the shapes and sizes of
objects in an image and are particularly useful in applications
such as image segmentation, feature extraction, and noise
reduction.
 Erosion and dilation are binary operations that are performed
on a binary image, which is an image consisting of only black
and white pixels.
In these operations, a structuring element, which is a small
binary image, is used to modify the shape of the input image.
The following image represents original, erosion and dilation
images respectively.
Image segmentation
 Image segmentation is a method in which a digital image is
broken down into various subgroups called Image segments
which helps in reducing the complexity of the image to make
further processing or analysis of the image simpler.
 Segmentation in easy words is assigning labels to pixels.
 All picture elements or pixels belonging to the same category
have a common label assigned to them.
 Image segmentation involves dividing an image into
meaningful regions or segments.
 For example: Let’s take a problem where the picture has to be
provided as input for object detection. Rather than processing
the whole image, the detector can be inputted with a region
selected by a segmentation algorithm.
 This will prevent the detector from processing the whole image
thereby reducing inference time.
segmentation
Image segmentation

Image Segmentation Techniques


 Threshold Based Segmentation
 Edge Based Segmentation
 Region-Based Segmentation
 Clustering Based Segmentation
 Artificial Neural Network Based Segmentation
Machine learning and deep learning for Image processing
Machine learning (ML) is a type of artificial intelligence (AI)
that allows software applications to become more accurate at
predicting outcomes without being explicitly programmed to
do so.
A machine learning algorithm can be related to any other
algorithm in computer science.
ML algorithm is a procedure that runs on data and is used
for building a production-ready machine learning model.
How does Machine Learning work
A Machine Learning system learns from historical data, builds
the prediction models, and whenever it receives new data,
predicts the output for it.
The accuracy of predicted output depends upon the amount of
data, as the huge amount of data helps to build a better model
which predicts the output more accurately.
Cont...

06/13/2024 20
Types of machine learning
There are two main types of machine learning.
 Supervised and unsupervised learning
 In supervised learning, the machine is trained on a set of labeled
data, which means that the input data is paired with the desired
output.
 The machine then learns to predict the output for new input data.
 In unsupervised learning, the machine is trained on a set of
unlabeled data, which means that the input data is not paired with
the desired output.
 The machine then learns to find patterns and relationships in the
data.
 Clustering algorithms group similar data points together based on
their inherent characteristics.
Deep Learning
 Deep learning is a subset of machine learning, which is
essentially a neural network with layers of interconnected nodes
that process and transform data.
 These neural networks are inspired by the structure and function
of the human brain’s biological neurons, and they are designed to
learn from large amounts of data.
 It is capable of learning complex patterns and relationships
within data.
 Convolutional neural networks(CNNs) examples of deep learning
algorithms and it specifically designed for image processing and
object detection.

machine learning and deep learning both are subsets of artificial intelligence but
there are many similarities and differences between them
Machine Learning Deep Learning

Apply statistical algorithms to learn the hidden patterns Uses artificial neural network architecture to learn the
and relationships in the dataset. hidden patterns and relationships in the dataset.

Requires the larger volume of dataset compared to


Can work on the smaller amount of dataset
machine learning

Better for complex task like image processing, natural


Better for the low-label task.
language processing, etc.

Takes less time to train the model. Takes more time to train the model.

A model is created by relevant features which are


Relevant features are automatically extracted from
manually extracted from images to detect an object in the
images. It is an end-to-end learning process.
image.

More complex, it works like the black box interpretations


Less complex and easy to interpret the result.
of the result are not easy.

It can work on the CPU or requires less computing power


as compared to deep learning. It requires a high-performance computer with GPU.

You might also like