0% found this document useful (0 votes)
18 views49 pages

Cvip 04

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

Cvip 04

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

Computer Vision & Image

Processing
[CVIP]
2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad
Image Compression

1. Compression model

2. Lossless and Lossy Compression

3. Coding techniques for image compression.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Image Compression

Image compression is a process that makes image files smaller. Image


compression most often works either by removing bytes of information from
the image, or by using an image compression algorithm to rewrite the image
file in a way that takes up less storage space.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Image Compression Model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Redundancies
Coding Redundancy:

Coding redundancy is associated with the representation of information.


The information is represented in the form of codes.
If the gray levels of an image are coded in a way that uses more code symbols than absolutely necessary to
represent each gray level then the resulting image is said to contain coding redundancy.
Inter-pixel Spatial Redundancy:

Interpixel redundancy is due to the correlation between the neighboring pixels in an image.
That means neighboring pixels are not statistically independent. The gray levels are not equally probable.
The value of any given pixel can be predicated from the value of its neighbors that is they are highly
correlated.
The information carried by individual pixel is relatively small. To reduce the interpixel redundancy the
difference between adjacent pixels can be used
2/26/2024 2:08 PM toAU,
N.RAGHU, represent
Hyderabad an image.
Redundancies
Inter-pixel Temporal Redundancy:

Interpixel temporal redundancy is the statistical correlation between pixels from successive frames in
video sequence.
Temporal redundancy is also called interframe redundancy. Temporal redundancy can be exploited using
motion compensated predictive coding.
Removing a large amount of redundancy leads to efficient video compression.
Psychovisual Redundancy:

The Psychovisual redundancies exist because human perception does not involve quantitative analysis of
every pixel or luminance value in the image.
It’s elimination is real visual information is possible only because the information itself is not essential
for normal visual processing.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Coding Techniques

Run-length encoding

Block Coding

Quad tree Coding

Huffman Coding
2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad
Colour Image Processing

1. Introduction

2. colour monitors

3. Colour image storage -and processing

4. Colour models: RGB Colour Model, HSI Colour Models, HSV Colour

Model, HLS Colour Models, TV Colour Models.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Colour Image Compression

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Colour Image Processing
The use of color is important in
The characteristics used to distinguish one color from
image processing because:
Color is a powerful descriptor another are:
that simplifies object Brightness: means the amount of intensity (i.e. color
identification and extraction.
level).
Humans can discern thousands
Hue: represents dominant color as perceived by an
of color shades and intensities,
compared to about only two observer.
dozen shades of gray Saturation: refers to the amount of white light mixed with
a hue.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Colour Image Processing

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Colour Image Processing

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Colour Monitor

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Colour Image Storage Processing

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Colour Models
The purpose of a color model (also called Color Space or Color System) is to facilitate the
specification of colors in some standard way
A color model is a specification of a coordinate system and a subspace within that system
where each color is represented by a single point
Color Models

RGB (Red, Green, Blue)


CMY (Cyan, Magenta, Yellow)
CMYK (Cyan, Magenta, Yellow, Black)
2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad
HSI (Hue, Saturation, Intensity)
Colour Models

Each color is represented in its primary


color components Red, Green and Blue
This model is based on Cartesian Coordinate
System

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Colour Model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


RGB Model
In this model, the primary colors are red, green, and blue. It is an additive
model, in which colors are produced by adding components, with white having
all colors present and black being the absence of any color.

This is the model used for active displays such as television and computer
screens.

The RGB model is usually represented by a unit cube with one corner located at
the origin of a three-dimensional color coordinate system, the axes being
labeled R, G, B, and having a range of values [0, 1]. The origin (0, 0, 0) is
considered black and the diagonally opposite corner (1, 1, 1) is called white. The
line joining black to white represents a gray scale and has equal components of
R, G, B.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


RGB Color Cube

The total number of colors in a 24 Bit image is


(28)3 =16,777,216 (> 16 million)
2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad
Generating RGB image

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


CMY and CMYK Color Model
Cyan, magenta, and yellow are the secondary colors with respect to the primary colors of red,
green, and blue. However, in this subtractive model, they are the primary colors and red, green,
and blue, are the secondaries. In this model, colors are formed by subtraction, where adding
different pigments causes various colors not to be reflected and thus not to be seen. Here, white is
the absence of colors, and black is the sum of all of them. This is generally the model used for
printing.

Most devices that deposit color pigments on paper (such as Color Printers and Copiers) requires
CMY data input or perform RGB to CMY conversion internally

=
-
2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad
CMY and CMYK Color Model

CMY is a Subtractive Color Model

Equal amounts of Pigment primaries (Cyan, Magenta and Yellow) should


produce Black

In practice combining these colors for printing produces a “Muddy-Black” color

So in order to produce “True-Black” a fourth color “Black” is added giving rise


to CMYK model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


CMY Color Model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


CMY Color Model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


HSI Color Model

Hue (dominant colour seen)


Wavelength of the pure colour observed in the signal.
Distinguishes red, yellow, green, etc.
More the 400 hues can be seen by the human eye.

Saturation (degree of dilution)


Inverse of the quantity of “white” present in the signal. A pure colour
has 100% saturation, the white and grey have 0% saturation.
Distinguishes red from pink, marine blue from royal blue, etc.
About 20 saturation levels are visible per hue.

Intensity
Distinguishes the gray levels.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


HSI Colour Model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


HSI Colour Model

Separates out intensity I from the coding

Two values (Hue & Saturation) encode chromaticity

Intensity encode monochrome part.

Hue and saturation of colors respond closely to the way humans perceive color,
and thus this model is suited for interactive manipulation of color images .

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


HIS/L/V Colour Model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


HIS/L/V Colour Model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


HIS/L/V Colour Model

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad
2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad
Properties of HSI (HSV)

Hue H is defined by an angle

Saturation S models the purity of the color

I=(R+G+B)/3

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Properties of HSI (HSV)

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Conversion from RGB to HSI
Given an image in RGB color format, the H component of each
RGB pixel is obtained using the equation:

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Conversion from HSI to RGB

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Conversion from HSI to RGB

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Intensity Slicing

The technique of intensity slicing or density slicing or color


coding is one of the simplest example of Pseudo-color image
processing

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Basics of Full Color Image Processing

Color components are the function of co-ordinates(x,y) so


we can write it as:

For an image of size MxN there are MN such


vectors, c(x,y), for x=0,1,2,…,M-1; y=0,1,2,
…,N-1

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Color Transformations

Color transformation can be represented by


the expression ::
g(x,y)=T[f(x,y)]

f(x,y): input image


g(x,y): processed (output) image
T[*]: an operator on f defined over neighborhood of (x,y).

The pixel values here are triplets or quartets (i.e group


of 3 or 4 values)

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Color Transformations
Si=Ti(r1,r2,…,rn) i=1,2,3,….n

ri and Si are variables denoting the color components of f(x,y)


and g(x,y) at any point (x,y).

n is the no of color components

{T1,T2,…..,Tn} is a set of transformation or color mapping


functions.

Note that n transformations combine to produce a single


transformation T

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Color Image Smoothing

We recognize the components of this vector as the scalar


images that would be obtained by independently smoothing
each plane of the starting RGB image using conventional
gray scale neighborhood processing.
Thus we conclude that smoothing by neighborhood
averaging can be carried out on a per color plane basis.
2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad
Color Image Smoothing

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Color Image Smoothing

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Color Image Sharpening

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Noise in Color Images
Noise in color images can be removed through various noise models which we use
in Image Restoration in case the noise content of a color image has the same
characteristics in each color channel.
But it is possible for color channels to be affected differently by noise so in this
case noise are removed from the image by independently processing each plane
Remove noise by applying smoothing filters (e.g gaussian, average, median) to
each plane individually and then combine the result.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Noise in Color Images

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Color Image Compression
Compression is the process of
reducing or eliminating
redundant and/or irrelevant
information
A compressed image is not
directly displayable it must be
decompressed before input to a
color monitor.
In case if in a compressed image
1 bit of data represents 230 bits
of data in the original image,
then compressed image could
be transmitted over internet in 1
minute as compared to original
image which will take 4 hours to
transmit.

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad


Thank You

2/26/2024 2:08 PM N.RAGHU, AU, Hyderabad

You might also like