Dip Unit 1
Dip Unit 1
PROCESSING
UNIT-1
DIGITAL IMAGE
FUNDAMENTALS
Introduction
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Image Aquisition
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Image Enhancement
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Image Restoration
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Morphological Processing
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Segmentation
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Object Recognition
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Representation & Description
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Image Compression
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Key Stages in Digital Image
Processing:
Colour Image Processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental steps of DIP
• Image acquisition – This stage involves preprocessing,
such as scaling.
• Image enhancement – Here we bring out details that
were obscured or highlight some features of interest in
an image. (eg) increasing the contrast of an image.
• Image Restoration – Here we talk about how to
improve the appearance of an image. Unlike
enhancement, which is subjective, this is objective.
• Color Image Processing – Due to Internet, this area is
becoming popular. Various color models are worthy to
know.
• Wavelets – Representing the images in various
degrees of resolution in the basis of wavelets.
Fundamental steps of DIP
• Compression – It is a technique for reducing the storage required
to save an image or bandwidth needed to transmit.
• Morphological Processing – It deals with tools for extracting
image components that are useful in the representation and
description of shape.
• Segmentation – These procedures partition an image into its
constituent parts or objects.
• Representation and description – It follows the output of a
segmentation stage.
• It uses either the boundary of a region or all the points in the
region itself.
• Description ( also called feature selection) deals with extracting
attributes or are basic for differentiating one class of objects from
another.
• Recognition – It is the process that assigns a label (eg. Vehicle)
to an object based on its descriptors.
Components of an Image
Processing System
Basic components of a general-purpose system
used for digital image processing
• Image sensors – Two elements are needed to
acquire digital images.
• First one is the physical device that is sensitive to
energy radiated by the object that we want to
image.
• The second one, called the digitizer, is a device for
converting the output of the physical sensing
device into digital form.
• (eg) in a digital video camera, the sensors produce
an electrical output proportional to light intensity.
• The digitizer converts these outputs to digital data.
Basic components of a general-purpose
system used for digital image processing
• Specialized Image Processing Hardware -
• It consists of digitizer plus hardware that performs
other primitive operations such as an arithmetic logic
unit (ALU), which performs arithmetic and logical
operations on entire image.
• This type of hardware is also called as front-end
subsystem and its characteristic is speed.
• This unit does things that require fast data throughputs
which main computer cannot handle.
• Computer – In an image processing system it is a
general-purpose computer.
• Software – It consists of specialized modules that does
specific tasks (eg. matlab)
Basic components of a general-purpose
system used for digital image processing
• Mass storage – An image of 1024 X 1024 size, storing the
intensity of each pixel in 8 bits, requires one megabyte of
storage.
• For short-time storage, we can use computer memory.
• Another method is to use a specialized board called frame
buffer, that store one or more images and can be accessed
rapidly.
• They enable us to instantaneously zoom, scroll (vertical shift)
and pan (horizontal shift).
• For on-line storage magnetic disks or optical-media are used.
• The archival storage needs massive capacity but are
accessed infrequently.
• Image Displays – These are mainly color TV monitors.
• Hardcopy – These devices include laser printers, film
cameras, inkjet units, etc.
Brightness Adaptation
• There are 2 phenomena which clearly
demonstrate that the perceived brightness
is not a simple function of intensity.
• The visual system tends to undershoot or
overshoot around the boundary of regions
of different intensities.
• These scalloped bands near the
boundaries are called Mach bands.
Mach Band
250
200
Intensity
150
100
50
0
0 50 100 150 200 250 300
Pixel Position
Simultaneous Contrast
• The simultaneous contrast means a
region’s perceived brightness does not
depend simply on its intensity.
• For example, all centre squares have
exactly same intensity.
• But they appear to the eye to become
darker as the background gets lighter.
Simultaneous Contrast
Chess Board
Exercises
• Write a matlab code to create the Mach bands and
observe the transition of intensities for various pixel
positions in the Mach band.
• Write a matlab code to simulate simultanious contrast -
create a small Square(gray valued) inside a larger(black)
square - change the intensity of black square and
observe the contrast variation.
• Write a matlab code to generate a chessboard consisting
of eight alternating black and white squares.
• Write a matlab code to generate the 1D barcodes (EAN-
13) that are used in ISBN.
• Write a matlab code to generate the 2D barcodes.
• Write a matlab code to generate the visual code for the
given ID (83 bits)
Image Formation Model
Image Formation Model
• When an image is generated from a physical process, its
values are proportional to energy radiated by a physical
source (em waves).
• Hence f(x,y) must be nonzero and finite. That is
0 f ( x, y )
• The function f(x,y) is characterized by 2 components.
• 1) The amount of source illumination incident on the
scene being viewed called illumination component
denoted as i(x,y)
• 2) The amount of illumination reflected by the objects in
the scene called reflectance component denoted as
r(x,y).
Image Formation Model
f ( x, y ) i ( x, y ) r ( x, y )
• where 0 f ( x, y )
0 r ( x, y ) 1
• and
250
200
150
100
50
0 10 20 30 40 50 60 70 80 90 100
Four level intensity quantization of
sampled scan line
260
240
220
200
180
160
140
120
100
80
60
0 10 20 30 40 50 60 70 80 90 100
Representing a Digital Image
Spatial and Gray-Level Resolution
• Sampling determines the spatial resolution
of an image.
• Resolution is the smallest number of
discernible line pairs per unit distance.
• Gray-level resolution is the smallest
discernible change in gray level.
Image to be sub sampled
Size of the image is :512 X 512
Sub sampled images
Image size:256X256
Image Zooming using bilinear interpolation
Image size:256X256
Relationships between Pixels
Neighbors of a Pixel
• A pixel p at coordinates (x,y) has 4 horizontal and
vertical neighbors whose coordinates are given by
• (x+1,y), (x-1,y), (x,y+1), (x,y-1).
• This set of pixels is called the 4-neighbors of p and
is denoted by N4(p). Some of the neighbors of p lie
outside the image if (x,y) is on the border of the
image.
• The four diagonal neighbors of p have coordinates
• (x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
• And are denoted by ND(p). These points, along with
4-neighbors are called 8-neighbors of p, denoted by
N8(p).
Relationships between Pixels
Neighbors of a Pixel
Adjacency and Connectivity
• To establish if 2 pixels are connected, it must be
determined if they are neighbors and if their gray
levels satisfy a specified criterion of similarity.
• (eg) in a binary image, 2 pixels may be 4
neighbors but they are said to be connected only
if they have the same value.
• In a gray scale image, we consider any subset
of allowed gray level values for connectivity.
3 types of adjacency
• 4-adjacency: Two pixels p and q with values
from V are 4 adjacent if q is in the set N 4(q).
• 8-adjacenty: Two pixels p and q with values
from V are 8-adjacent if q is in the set N 8(q).
• m-adjacency: Two pixels p and q with values
from V are m-adjacent if
– q is in N4(p), or
– q is in ND(p) and set N4(p) ∩ N4(q) has no pixels
whose values are from V.
Adjacency
Adjacency