You are on page 1of 127

EC8093-DIGITAL IMAGE

PROCESSING
Dr.K.Kalaivani
Associate Professor
Dept. of EIE
Easwari Engineering College
Text Books and References
• TEXT BOOKS:
• Rafael C. Gonzalez, Richard E. Woods, ‘Digital Image Processing’, Pearson,
Third Edition, 2010.
• Anil K. Jain, ‘Fundamentals of Digital Image Processing’, Pearson, 2002.
• REFERENCES
• Kenneth R. Castleman, ‘Digital Image Processing’, Pearson, 2006.
• Rafael C. Gonzalez, Richard E. Woods, Steven Eddins, ‘Digital Image Processing
using MATLAB’, Pearson Education, Inc., 2011.
• D,E. Dudgeon and RM. Mersereau, ‘Multidimensional Digital Signal
Processing’, Prentice Hall Professional Technical Reference, 1990.
• William K. Pratt, ‘Digital Image Processing’, John Wiley, New York, 2002
• Milan Sonka et al ‘Image processing, analysis and machine vision’,
Brookes/Cole, Vikas Publishing House, 2nd edition, 1999
Unit1-Digital Image Fundamentals
• Steps in Digital Image Processing
• Components
• Elements of Visual Perception
• Image Sensing and Acquisition
• Image Sampling and Quantization
• Relationships between pixels
• Color image fundamentals
• RGB, HSI models
• Two-dimensional mathematical preliminaries
• 2D transforms - DFT, DCT.
• Unit 2 – Image Enhancement

• Unit 3- Image Restoration

• Unit 4- Image Segmentation

• Unit 5-Image Compression and Recognition


Image
• Picture
• Photograph
• Visual Data
• Usually 2D or 3D
Digital Images
• An image which is “discretized,”, i.e., defined on a discrete grid
• Two-dimensional collection of light values (or gray values)
• A digital image is composed of picture elements called pixels. Pixels
are the smallest sample of an image. Pixel represent brightness at one
point.
• Conversion of an analog into digital image involves two important
operations, namely Sampling and Quantization.
Advantages of Digital images
• The processing of image is faster and cost effective
• Digital images can be effectively stored and efficiently transmitted
from one place to another place
• When shooting the image, one can immediately see the image is good
or not.
• Copying the digital image is easy. Quality of the digital image will not
be degraded even if it is copied for several times
• Reproduction of the image is faster and cheaper
• Offers plenty of scope for versatile manipulation.
Disadvantages of Digital Images
• Misuse of copyright has become easier.
• All digital file cannot be enlarged beyond the certain size with out
compromising on quality
• Memory required to store and process good quality digital images are
very high
• For real implementation of digital image processing algorithms, the
processor has to be very fast, because the volume of data is very high.
Digital Image Processing
• Digital image processing refers to processing digital images by means
of digital computer

• An image may be defined as a two dimensional function , f(x,y) where


x and y are spatial(plane) coordinates, and the amplitude of f at any
pair of coordinates x,y is called the intensity or gray level of the image
at that point.
Digital Image Processing
Major steps in Digital Image Processing
• Step 1: Image Acquisition – Capturing Visual data by an image sensor
• Step 2: Discretization/Digitization; Quantization; Compression-
Efficient storage / transmission
• Step 3:Image Enhancement and restoration- Improving image quality
(Low contrast, blurr noise)
• Step 4:Image segmentation-Partition image into objects or
constituent parts
Applications of Digital Image Processing
• Medicine

• Forensics

• Remote sensing

• Communications

• Automobiles
Digital Image Generation
Generating a digital image
• Place a regular 2D grid over an image and read the colour
value
• at the intersections of the grid => set of data points for that
image
Fundamental steps in Digital Image
Processing
• Color is one of the very important features that has been
extracted from an image.

• Color image processing techniques process an image considering


its color as one of the important attribute in addition to other
attributes.
Wavelets and Multi-Resolution Processing
Image Compression

• Image compression is the process of reducing the storage


required to save an image or it is the process of reducing
the bandwidth required to transmit an image.

• Some compression standards are also defined.


Image Segmentation
• Image segmentation is the process of partitioning or dividing an image into its
constituent parts or objects.
• There are a number of algorithms available for segmentation procedures.
• Segmentation is usually done to recognize the objects from an image. If the
segmentation is more accurate, there will be successful recognition.
• The output of this process is raw pixel data.
Image Representation And Description
• Image representation is a process that is used to convert the output of
segmentation process into a form suitable for computer processing.
• Two types of representations are
• Boundary Representation – focuses on external shape characteristics such as corners and
inflections.
• Regional Representation – focuses on internal properties such as texture or skeletal
shape.
• Image description is the process of extracting the attributes from an image
that are used to give some quantitative information of interest.
• Description can also be called as the process of ‘Feature selection’.
Image Recognition

• Image recognition is a process that assigns a label or name to an


object identified from an image, based on its descriptors.
Knowledge Base
• This indicates the knowledge about a problem domain.
• Guides the operation of each processing module and controls the interaction
between modules
• Interpret and deduce high level information (semantic features) from low
level information feature (visual features)
• As knowledge base, the database of each application of image processing is
separately maintained viz.
• Eg. Casia database for iris, Casia database for face, MMU database for iris
etc.
• Any researcher or student can retrieve this database from knowledge base.
Knowledge base can provide the information about how a person can access
the database from it and what type of techniques is applied to do so.
Knowledge Base
• It also gives information about how to read the database one by one for
image processing. Even the programming code is maintained in the
knowledge- base.
• As noise is affecting the original image, to remove it enhancement is done.
Knowledge base can provide information about what type of noise it is
and how the technique is used to remove or reduce noise from the image.
• It gives different techniques available for noise reduction. Segmentation is
done to get the region of interest.
• Knowledge base provides different areas of interest on the basis of
application chosen. It also gives the information about different
techniques available for each application and how one technique works
differently on different applications.
Components of Image Processing
Image sensors

• Image sensing or image acquisition is used to acquire i.e. to get digital


images. It requires two elements, which are,
• A physical device that is sensitive to the energy radiated by the object to be
imaged. Example: A digital video camera
• A digitizer to convert the output of the physical sensing device into digital
form.
Specialized Image Processing Hardware

• This hardware consists of the digitizer and some hardware to perform other
basic operations.
• Example: Arithmetic Logic Unit (ALU) which perform arithmetic and logical operations on
entire images in parallel.
• This type of hardware is also known as front-end subsystem.
• The main feature of this hardware is its high speed. Therefore, fast functions
which cannot be performed by the main computer can be handled by this
unit.
Computer

• The computer used in an image processing system is a general -


purpose computer. It can range from a personal computer (PC) to a
supercomputer.
• In some dedicated applications, specially designed computers are
used to achieve the required performance.
Image processing software

• The software for image processing has specialized modules which


perform specific tasks. Some software packages have the facility for
the user to write code using the specialized modules.
Mass storage

• Since images require large amount of storage space, mass storage


capability is very important in image processing applications.
• Example: A 1024 x 1024 size image with each pixel represented in 8 -
bits, requires 1 megabyte of storage space, without compression.
Image displays
 

• Commonly used displays are color TV monitors. These monitors are


driven by the output of “image and graphics display cards” which are
a part of the computer system.
• If stereo display are needed in some applications, a headgear
containing two small displays is used.
Hardcopy devices
 

• Hardcopy devices are used for recording images. These devices


include,
• Laser printers
• Film cameras
• Heat - sensitive devices
• Inkjet units
• Digital units like optical and CD – ROM disks etc.
Eventhough the highest resolution is provided by camera film, the written
material preferred is paper.
Network

• Networking is a function used in all computer systems today. Since


image processing applications need large amount of data, the main
consideration here is the bandwidth.
• Also, communications with remote sites are done through the
Internet, which uses optical fiber and other broadband technologies.
Elements of visual perception
Although the field of DIP is built on a foundation of mathematical and probabilistic
formulations, human intuition and analysis play a central role in the choice of one technique
versus another and this choice often is made based on subjective visual judgements.

Fig. Structure of the cross section of


human eye
Elements of visual perception
• Shape is sphere
• Diameter: 20 mm
• 3 membranes enclose the eye
• Cornea & sclera :
• outer cover of the eye.
• Cornea is a tough transparent issue that covers the anterior surface of the eye.
• Sclera is an opaque membrane that encloses the remainder of the optic globe.
• Choroid
• Retina
The Choroid
• Lies directly below the sclera.
• The choroid contains blood vessels for eye nutrition
and is heavily pigmented to reduce extraneous light
entrance and backscatter.
• It is divided into the ciliary body and the iris. The
latter contracts or expands to control the amount of
light that enters the pupil .
• The central opening of the iris is pupil varies in
diameter from approximately 2 mm ~ 8 mm
• The front of the iris contains visible pigment of the
eye whereas back contains the black pigment
Lens
• The lens is made up of fibrous cells and is suspended by
fibers that attach it to the ciliary body.

• It is slightly yellow and absorbs approx. 8% of the visible


light spectrum.

• The lens contains 60-70% water, 6% of fat.


The Retina
• Innermost membrane of the eye
• The retina lines the inside of the wall’s entire posterior portion.
• When the eye is properly focused light from an object outside
the eye is imaged on retina.

• Discrete light receptors are distributed over the surface of the


retina:
• cones (6-7 million per eye) and
• rods (75-150 million per eye)
Cones
• Cones are located in the fovea and are sensitive to
color.

• Each one is connected to its own nerve end.

• Cone vision is called photopic (or bright-light vision


or day vision).

• There are three types of cones: Red, Green, and


Blue
Rods
• Rods are giving a general, overall picture of the
field of view

• They see only brightness (not color) and are not


involved in color vision.

• Several rods are connected to a single nerve and


are sensitive to low levels of illumination
(scotopic or dim-light vision or night vision).
MESOPIC VISION

• Intermediate region of illumination – between


dim and bright light

• Both rods and cones are active


Receptor Distribution
• The distribution of receptors is radially symmetric
about the fovea.

• Cones are most dense in the center of the fovea


while rods increase in density from the center out
to approximately 20% off axis and then decrease.
• Absence of receptors in this area results in the so
called blind spot.
Cones & Rods
BLIND SPOT

• Blind spot is the region of emergence of the optic


nerve from the eye

• Place on the retina where optic nerve connects,


and which consists of no light sensors
The Fovea
• The fovea is circular (1.5 mm in diameter) but can
be assumed to be a square sensor array (1.5 mm
x 1.5 mm).

• The density of cones: 150,000 elements/mm2 ~


337,000 for the fovea.

• A CCD imaging chip of medium resolution needs 5


mm x 5 mm for this number of elements
Image Formation in the Eye
• The eye lens (if compared to an optical lens) is
flexible.

• It gets controlled by the fibers of the ciliary body


and to focus on distant objects it gets flatter (and
vice versa).
Image Formation in the Eye
• Distance between the center of the lens and the
retina (focal length):
• varies from 17 mm to 14 mm (refractive power of lens
goes from minimum to maximum).

• Objects farther than 3 m use minimum refractive


lens powers (and vice versa).
Image Formation in the Eye
• Example:
• Calculation of retinal image of an object

15 x

100 17

x  2.55mm
Image Formation in the Eye
Image Formation in the Eye
• Perception takes place by the relative excitation
of light receptors.

• These receptors transform radiant energy into


electrical impulses that are ultimately decoded by
the brain.
Luminance

• Intensity per unit area


• Measured in lumens(lm), gives a measure of the
amount of energy an observer perceives from a light
source
• Emitting or reflecting light from the object

• The luminance of an object is independent of the


luminance of the surrounding objects
BRIGHTNESS
• Brightness is the perceived luminance
• Cannot be measured
• Depends on the luminance of the surround
• Two objects with different surroundings could
have identical luminance but different brightness
CONTRAST
• Contrast is the difference in visual properties that
makes an object (or its representation in an
image) distinguishable from other objects and the
background

• Contrast is determined by the difference in the


color and brightness of the light reflected or
emitted by an object and other objects within the
same field of view .
Brightness Adaptation
• Subjective brightness: Intensity as perceived by the human visual
system which is a logarithmic function of the light intensity incident
on the eye
• Brightness adaptation: For any given set of conditions, the current
sensitivity level of the visual system is called the brightness
adaptation.
Brightness Adaptation of Human Eye (cont.)

Simultaneous contrast. All small squares have exactly the same intensity
but they appear progressively darker as background becomes lighter.
HUE
• The hue of a color refers to its “redness”, “greenness” and
so on.

• A hue refers to the gradation of color within the


optical spectrum, or visible spectrum, of light.

• "Hue" may also refer to a particular color within this


spectrum, as defined by its dominant wavelength,

• or the central tendency of its combined wavelengths. For


example, a light wave with a central tendency within 565-
590 nm will be yellow.
SATURATION

• Saturation refers to the intensity of a specific hue.

• In art or when working with colors, saturation is


the amount of color a certain color has. For
example, black and white have no saturation and
bright red has 100% saturation
MACH BAND EFFECT
• The spatial interaction from an object and its
surroundings creates a phenomenon called mach
band effect.

• The visual system tends to undershoot or


overshoot around the boundary of regions of
different intensities
Brightness Adaptation of Human Eye (cont.)

A
B
Intensity

Position

In area A, brightness perceived is darker while in area B is


brighter. This phenomenon is called Mach Band Effect.
MACH BAND EFFECT

• Although the intensity of the stripes is constant, we actually perceive


brightness pattern that is strongly scalloped near the boundaries.
These seemingly scalloped bands are called Mach bands.
Image Sensing and Acquisition
• Images are generated by the combination of an “illumination” source
and the reflection or absorption of energy from that source by the
elements of the “scene” being imaged.
• Illumination may originate from a source of electromagnetic energy
such as radar, infrared, or X-ray energy.
• Depending on the nature of the source, illumination energy is
reflected from, or transmitted through, objects.
• Examples: Planar surface-Light is reflected, X-rays pass through a
patient’s body for the purpose of generating a diagnostic X-ray film,
• In some applications, the reflected or transmitted energy is focused
onto a photo converter (e.g., a phosphor screen), which converts the
energy into visible light.
Image Sensing and Acquisition

Fig. Single imaging Sensor


Image Sensing and Acquisition
• Three principal sensor arrangements used to transform illumination energy
into digital images.
• Concept: Incoming energy is transformed into a voltage by the combination
of input electrical power and sensor material that is responsive to the particular
type of energy being detected. The output voltage waveform is the response of
the sensor(s), and a digital quantity is obtained from each sensor by digitizing
its response.
• Image Acquisition Using a Single Sensor:
• Most familiar sensor of this type is the photodiode, which is constructed
of silicon materials and whose output voltage waveform is proportional to
light. The use of a filter in front of a sensor improves selectivity.
Image Sensing and Acquisition
Combining a single sensor with motion to generate a 2-D
image:

• In order to generate a 2-D image using a single sensor, there has to be relative
displacements in both the x- and y-directions between the sensor and the area to be
imaged.
• Figure shows an arrangement used in high-precision scanning, where a film negative
is mounted onto a drum whose mechanical rotation provides displacement in one
dimension.
• The single sensor is mounted on a lead screw that provides motion in the
perpendicular direction. Since mechanical motion can be controlled with high
precision, this method is an inexpensive (but slow) way to obtain high-resolution
images.
Image Acquisition Using Sensor Strips:
• A geometry that is used much more frequently than single sensors consists of an in-line
arrangement of sensors in the form of a sensor strip, as Figure shows.

• The strip provides imaging elements in one direction. Motion perpendicular to the strip
provides imaging in the other direction, as shown in Figure below.
Image Acquisition Using Sensor Strips:
• This is the type of arrangement used in most flat bed scanners.
• Sensing devices with 4000 or more in-line sensors are possible.
• In-line sensors are used routinely in airborne imaging applications, in
which the imaging system is mounted on an aircraft that flies at a
constant altitude and speed over the geographical area to be imaged.
• One- dimensional imaging sensor strips that respond to various bands
of the electromagnetic spectrum are mounted perpendicular to the
direction of flight.
• The imaging strip gives one line of an image at a time, and the
motion of the strip completes the other dimension of a two-
dimensional image.
Image Acquisition Using Sensor Strips:
• Sensor strips mounted in a ring configuration are used in medical and
industrial imaging to obtain cross-sectional (“slice”) images of 3-D
objects, as Figure shows.
Image Acquisition Using Sensor Strips:
• A rotating X-ray source provides illumination and the portion of the
sensors opposite the source collect the X-ray energy that pass through the
object (the sensors obviously have to be sensitive to X-ray energy).
• This is the basis for medical and industrial computerized axial tomography
(CAT).
• Output of the sensors must be processed by reconstruction algorithms
whose objective is to transform the sensed data into meaningful cross-
sectional images.
• In other words, images are not obtained directly from the sensors by
motion alone; they require extensive processing.
• A 3-D digital volume consisting of stacked images is generated as the
object is moved in a direction perpendicular to the sensor ring.
• Other modalities of imaging based on the CAT principle include magnetic
resonance imaging (MRI) and positron emission tomography (PET).
Image Acquisition Using Sensor Arrays:
• Figure shows individual sensors arranged in the form of a 2-D array.

• Numerous electromagnetic and some ultrasonic sensing devices frequently are arranged in
an array format. This is also the predominant arrangement found in digital cameras.
• A typical sensor for these cameras is a CCD array, which can be manufactured with a broad
range of sensing properties and can be packaged in rugged arrays of 4000 * 4000 elements
or more.
• CCD sensors are used widely in digital cameras and other light sensing instruments.
Image Acquisition Using Sensor Arrays:
• The response of each sensor is proportional to the integral of the light
energy projected onto the surface of the sensor, a property that is
used in astronomical and other applications requiring low noise
images.
• Noise reduction is achieved by letting the sensor integrate the input
light signal over minutes or even hours.
Image Acquisition Using Sensor Arrays:
Fig. An example of the digital image acquisition process (a)
Energy (“illumination”) source (b) An element of a scene (c)
Imaging system (d) Projection of the scene onto the image
plane (e) Digitized image
Image Acquisition Using Sensor Arrays:
• This figure shows the energy from an illumination source being reflected
from a scene element
• The energy also could be transmitted through the scene elements.
• The first function performed by the imaging system shown in Fig. (c) is to
collect the incoming energy and focus it onto an image plane. If the
illumination is light, the front end of the imaging system is a lens, which
projects the viewed scene onto the lens focal plane, as Fig.(d) shows.
• The sensor array, which is coincident with the focal plane, produces outputs
proportional to the integral of the light received at each sensor.
• Digital and analog circuitry sweep these outputs and converts them to
analog signal, which is then digitized by another section of the imaging
system.
• The output is a digital image, as shown diagrammatically in Fig. (e).
RGB Model

• An additive colour model, based on three components:


red(R), green (G) and Blue (B).
• 8 bits are usually used for each colour (=> 24 bits total)

• These can be stored (in memory) as 3 separate colour


planes ....
• ... or in an ‘interlaced form’, with each pixel represented
with 3 bytes (24bits) sequentially.
But!!!!!

Not all colours can be represented by the RGB system

However

It is probably good enough to fool the human vision system


The RGB Cube

B
Blue Cyan

Magenta

G
Green
Red Yellow

R
The HSI Model (an alternative to RGB)

• Hue, H, specifies the dominant pure colour perceived


by the observer (e.g. red, yellow, blue)
[i.e. a representation of the frequency/wavelength]
• Saturation, S, specifies the degree to which a pure
colour has been diluted by white light to produce
observed colour.
• Intensity, I, is related to the perceived brightness of
the colour.

N.B. Decoupling (separating) intensity from colour is


very useful in image manipulation and analysis as
increased/decreased lighting in a scene (more or less)
only effect this parameter.
The HSI Cone
Intensity
White

Hue
Green Yellow
Cyan Red
Saturation
Blue Magenta

Black
A Simple Image Model
• Image: a 2-D light-intensity function f(x,y)

• The value of f at (x,y)  the intensity (brightness) of the image at that


point

• 0 < f(x,y) < 


Digital
Digital Image
Image Acquisition
Acquisition
A Simple Image Model
• Nature of f(x,y):

• The amount of source light incident on the scene being viewed

• The amount of light reflected by the objects in the scene


A Simple Image Model
• Illumination & reflectance components:

• Illumination: i(x,y)
• Reflectance: r(x,y)

• f(x,y) = i(x,y)  r(x,y)

• 0 < i(x,y) < 


and 0 < r(x,y) < 1
(from total absorption to total reflectance)
A Simple Image Model
• Sample values of r(x,y):
• 0.01: black velvet
• 0.93: snow

• Sample values of i(x,y):


• 9000 foot-candles: sunny day
• 1000 foot-candles: cloudy day
• 0.01 foot-candles: full moon
Sampling & Quantization
• The spatial and amplitude digitization of f(x,y) is called:

• image sampling when it refers to spatial coordinates (x,y) and

• gray-level quantization when it refers to the amplitude.


Digital
Digital Image
Image
Sampling
Sampling and
and Quantization
Quantization
A
A Digital
Digital Image
Image
Sampling & Quantization
 f (0,0) f (0,1) ... f (0, M  1) 
 f (1,0) ... ... f (1, M  1) 
f ( x, y )  
 ... ... ... ... 
 
 f ( N  1,0) f ( N  1,1) ... f ( N  1, M  1)

Digital Image Image Elements


(Pixels)
Sampling & Quantization
• The digitization process requires decisions about:

• values for N,M (where N x M: the image array)

and

• the number of discrete gray levels allowed for each pixel.


Sampling & Quantization
• Usually, in DIP these quantities are integer powers of two:
N=2n M=2m and G=2k
number of gray levels

• Another assumption is that the discrete levels are equally spaced


between 0 and L-1 in the gray scale.
Examples
Examples
Examples
Examples
Examples
Examples
Examples
Examples
Sampling & Quantization
• If b is the number of bits required to store a digitized image then:

• b = N x M x k (if M=N, then b=N2k)


Storage
Storage
Sampling & Quantization
• How many samples and gray levels are required for a good
approximation?

• Resolution (the degree of discernible detail) of an image depends on sample


number and gray level number.
• i.e. the more these parameters are increased, the closer the digitized array
approximates the original image.
Sampling & Quantization
• How many samples and gray levels are required for a good
approximation? (cont.)

• But: storage & processing requirements increase rapidly as a function of N, M,


and k
Sampling & Quantization
• Different versions (images) of the same object can be generated
through:

• Varying N, M numbers
• Varying k (number of bits)
• Varying both
Sampling & Quantization
• Conclusions:
• Quality of images increases as N & k increase
• Sometimes, for fixed N, the quality improved by
decreasing k (increased contrast)
• For images with large amounts of detail, few gray
levels are needed
Dithering

• Full-color photographs may contain an almost infinite range of color values

• Dithering is the attempt by a computer program to approximate a color from a mixture of other
colors when the required color is not available

• Dithering is the most common means of reducing the color range of images down to the 256 (or
fewer) colors seen in 8-bit GIF images
• Most images are dithered in a diffusion or randomized
pattern to diminish the harsh transition from one color to
another

• But dithering also reduces the overall sharpness of an


image, and it often introduces a noticeable grainy pattern
in the image

• This loss of image detail is especially apparent when full-


color photos are dithered down to the 216-color browser-
safe palette.
Review: Matrices and Vectors

Definitions
Definitions (Con’t)
(Con’t)

A column vector is an m × 1 matrix:

A row vector is a 1 × n matrix:

A column vector can be expressed as a row vector by using


the transpose:

110
Review: Matrices and Vectors

Some
Some Basic
Basic Matrix
Matrix Operations
Operations

• The sum of two matrices A and B (of equal dimension),


denoted A + B, is the matrix with elements aij + bij.
• The difference of two matrices, A B, has elements aij  bij.
• The product, AB, of m×n matrix A and p×q matrix B, is an
m×q matrix C whose (i,j)-th element is formed by
multiplying the entries across the ith row of A times the
entries down the jth column of B; that is,

111
Review: Matrices and Vectors

Some
Some Basic
Basic Matrix
Matrix Operations
Operations (Con’t)
(Con’t)

The inner product (also called dot product) of two vectors

is defined as

Note that the inner product is a scalar.


112
TOEPLITZ MATRIX, CIRCULANT MATRIX

• It has a constant elements along the main diagonal and the sub
diagonals

• Circulant matrix – each of its rows (or columns) is a circular shift of


the previous row(or column)

113
ORTHOGONAL AND UNITARY MATRICES

• An orthogonal matrix is such that its inverse is equal to its transpose


A-1 = AT

• A Matrix is called unitary if its inverse is equal to its conjugate


transpose
A-1 = A*T

114
BLOCK MATRIX
• Any matrix whose elements are matrices themselves is called a block
matrix.

115
TWO DIMENSIONAL DISCRETE
FOURIER TRANSFORM ( 2D DFT)
2-D DFT:

The discrete fourier transform of a function (image) f(x,y) of size M×N is given
by,
(u, v) =1/MN∑ x ∑ y f(x,y) e-j2П(ux/M+vy/N)
for u=0,1,2,….,M-1. and v=0,1,2,…..,N-1.

 Similarly, given F(u,v), we obtain f(x,y) by the inverse fourier transform, given
by,
f(x,y)= ∑ u∑ v F(u,v) ej2П(ux/M+vy/N)
for x=0,1,2,….,M-1. and y=0,1,2,….,N-1.

 U and V are the transform or frequency variables and X and Y are the spatial
or image variables.

DFT AND UNITARY DFT ARE
SYMMETRIC

PERIODIC

FAST ALGORITHM

CONJUGATE SYMMETRIC
ABOUT N/2
• CIRCULAR CONVOLUTION THEOREM

• The DFT of the circular convolution of the two


sequences is equal to the product of their DFTs.
Discrete Cosine Transform
Introduction
• The discrete cosine transform (DCT) is a technique for converting a
signal into elementaryfrequency components. It is widely used in
image compression.
• Developed by Ahmed, Natarajan, and Rao [1974], the DCT is a close
relative of the discrete Fourier transform (DFT). Its application to
image compression was pioneered by Chenand Pratt [1984].
Definitions
• The N X N Cosine Transform matrix C={c(k,n)},also called as Discrete Cosine Transform (DCT) ,is defined as

c(k,n)=1/√N , k=0, 0≤n ≥N-1

= √2/N cos∏(2n+1)k/2N , 1≤k ≥N-1, 0≤n ≥N-1

The One Dimensional DCT of a sequence {u(n), 0≤n≥N-1}is defined as


N-1

v(k)=α(k) ∑ u(n) cos∏(2n+1)k/2N) , 0≤k ≥N-1


n=0

where α(0) ≈ 1/√N , α(k) = √2/N for 1≤k ≥N-1

The 2-Dimensional DCT pair is given by

C(u,v)= α(u) α(v) N-1∑ f(n,y) cos[u∏(2x+1)/2N] cos[u∏(2y+1)/2N] , 0≤u,v ≥N-1


n=0
Tranformation
• An N X N image is divided into a st of smaller m x m sub images
• The DCT is computed for each images
• Within each sub image ,only the DCT components that are non-
negligible are retained, providing a means of image compression. All
other components are assumed to be zero
• The remaining non-negligible components are used to reconstruct the
image
Here is the original image and its discrete cosine
transform

Particularly note the concentration of large DCT coefficients in the low-frequency


zone. The DCT is known to have excellent energy compaction properties.
Advantages
1.The DCT has the added advantage of mirror symmetry, making it
suitable for block encoding of an image
ie; processing an image via small overlapping sub images
2. Because of the symmetry property of the DCT, it produces less
degradation at each of the sub image boundaries than the DFT.
3. It supports Data compression
Properties of DCT
1. The Cosine Transform is real and orthogonal
ie; C=C* C -1= C T
2. The Cosine Transform of a sequence is related to the DFT
of its symmetric extension
3. The Cosine Transform is a fast transform.
The Cosine Transform of a vector of N elements can be
calculated in N log2N operations via an N-point FFT.
4.The Cosine Transform has excellent energy compaction for
higly correled data
5. The Basic Vectors of the DCT are the eigen vemtors of the
symmetric tridiagonal matrix
6. The NxN DCT is very close to first order KL Transform.

You might also like