0% found this document useful (0 votes)
66 views54 pages

Image Processing: Dept - of Instrumentation Science University of Pune

The document discusses image processing and provides details about: 1) It defines what an image is and describes how images can be divided into regions of interest. 2) It explains the three main types of image operations - image analysis, image transformation, and image understanding. Examples of each type are provided. 3) It covers basic image processing techniques like half-toning, dithering, and various mathematical operations that can be performed on images like addition, subtraction, and adjustments to brightness and contrast.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views54 pages

Image Processing: Dept - of Instrumentation Science University of Pune

The document discusses image processing and provides details about: 1) It defines what an image is and describes how images can be divided into regions of interest. 2) It explains the three main types of image operations - image analysis, image transformation, and image understanding. Examples of each type are provided. 3) It covers basic image processing techniques like half-toning, dithering, and various mathematical operations that can be performed on images like addition, subtraction, and adjustments to brightness and contrast.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 54

IMAGE PROCESSING

Bhupendra P.Karandikar
Dept.of Instrumentation Science
University of Pune
INTRODUCTION
• Image:
An image is defined in “real world” as a
function of two variables, a(x,y)

Where, a = amplitude(brightness)
x,y= co-ordinate position

• An image frequently contains collections of


sub-images called as “regions-of-interest
(ROIs)”.
Image operations
• Digital technology has made it possible to
manipulate multi-dimensional signals with
computer systems that can be divided into:

 Image Analysis
 Image Transformation
 Image understanding
Image operations
Image analysis
Input : Image
Output : Measurement results
Process: Comparison in under test sample with standard
gauge or best fit circle.

Example: a online inspection Detection & measurement of


diameter of a rubber ‘O’ rings manufactured.

Advantages:
• Non-contact measurements.
• Human being not involved.
Image operations
Image Transformation
Input : Image
Output : Image
Process: Image morphing comparing each pixel of the
image.

Example: Digital image mixing, animation tool.

Advantages:
• No series of picture frames are required.
• any type of image can be produced.
Image operations
Image Understanding
Input : Image
Output : High level description
Process: Collecting & arranging the Image information
which can be compared with another image.

Example: Finger print matching, Human Face recognition


Optical character recognition.

Advantages:
•Machine generated support to results by human being.
Objective of the seminar
• Featuring the mathematical operations
used for these three operations to the
image

Operated
Image Image
Image/
Grabbing Processing image
tool tool/s information
Digital images
• Image representation:
f(x,y) with origin as the upper left corner.

• Sampling :
- measuring value of image at discrete intervals in space.
- sampling rate
- spatial resolution

• Quantization:
- Grey scale image
- Colour image, f(x,y) is a vector with three components R,G,B. This
can be represented in RGB Colour cube.
Grey scale image
• Human tendency to average brightness over
small areas, so that black dots and their white
background merge and perceived as grey
shade.
• Use of this in black & white printing technology
• Half toning:
The process of generating a binary pattern of
black and white dots from an image.

Patterning Dithering
Digital Half toning technique

• Patterning:
- replacing each pixel by a binary font
- each grey level is assigned a value of
binary font
Dithering
• thresholding the image against a dither
matrix.
• Each pixel is compared with dither matrix
• The pixel becomes white if value exceeds
the threshold or black otherwise.
0 128
D1= example for operations on 8 bit
192 64 images
The Colour cube

1 BLUE CYAN

MAGENTA WHITE

BLACK
1
0 GREEN

1
RED YELLOW
Simple image operations

I. Addition & averaging:


- addition of two images pixel by pixel
- two images of identical dimensions
- Noise removal by averaging no.of images
- ‘alpha blending’, g(x,y) = α f1(x,y)+(1- α) f2(x,y)

- α=0.5 gives evenly weighted average


Simple image operations
Examples:
Simple image operations
• Subtraction:
- subtraction of two images
- change detection in two images
- g(x,y) = I f1(x,y) - f2(x,y)I

• Division:
- division of two images for meaningful results
- ratio image can be formed featuring illumination &
surface topography
- remote sensing applications
Simple image operations
• Adjustments of brightness & contrast:

- converting an image into interpretable form

- image brightness, g(x,y) = f(x,y) + b


- image contrast, g(x,y) = a f(x,y)
where, [f1,f2] are grey levels
‘g’ is the range(0-255).
Simple image operations
Linear mapping

• Map a particular range of grey levels [f1,f2] onto a


new range [g1,g2].
g(x,y) = g1 +(g2-g1 / f2-f1)[f(x,y)]
Simple image operations
Linear mapping
• f1 , here acts as a threshold up to and including which
grey levels are mapped as ‘0’ and values higher are
mapped onto 255, hence this technique is called as
‘Thresholding’.

• This technique is used for image enhancement.


Simple image operations
Non-linear mapping
• Disadvantage of linear mapping: single valued
function is necessary.
• Logarithmic mapping solves this problem, by
logarithmic mapping of input grey level onto output
grey level.
• Effective to enhance detail in the darker region of
image
Simple image operations
Non-linear mapping

Example:
Image histograms
• The histogram of an image records the
frequency distribution of grey levels in that
image.
• In bin 0, we record the number of times a grey
level of 0 occurs & similarly for other grey levels.
• Useful indication of relative importance of
different grey levels in the image and judging the
requirements of contrast & brightness
Histogram equalization

• Redistributes grey levels in an attempt to flatten


the frequency distribution

• More grey levels are allocated where there are


most pixels, fewer grey levels where there are
fewer pixels.
Presentation for Seminar 3

• Morphological Image processing


- Basic Concepts
- Fundamental operations
- Compound operations
- Filtering
Review of 2 seminar
nd

• Digital images
• Image operations
- Half toning, Dithering, addition,
subtraction, division
- Linear and non-linear mapping
- Histogram and histogram equalization
Histogram equalization
Morphological operations
Introduction
• Describes range of non-linear image
processing techniques dealing with shape
of image

• Removal of imperfections caused by


noise, texture or inaccurate thresholding to
binary images
Morphological operations
Fundamental binary operations
• Basic concept:
typically to probe an image with a small
shape or template known as ‘structuring
element’.

The structuring element is positioned at


various positions in the image and compared
with the corresponding neighborhood pixels.
Morphological operations
Fundamental binary operations
• Structuring elements
A matrix of known dimension and with pre-
defined elements.
• Types of structuring elements:
- Square shaped
- Diamond shaped
- Cross shaped etc.
• Advantage & disadvantages of structuring
elements- for erosion / dilation.
Morphological operations
Structuring elements
• Examples:
Morphological operations
Fundamental binary operations
• Fitting & hitting:
Checking whether the element ‘hits’ the
image or ‘fits’ the image.

Hitting of an image:

Fitting of an image:
Morphological operations
Fundamental binary operations
• Erosion:
Pixels are eroded from both the inner and outer
boundaries of regions, so the erosion will enlarge
the holes enclosed by a single region as well as
making the gap between different regions larger.
This is ‘fitting of image’.
• Erosion of an image ‘ f ’ by a structuring element ‘ s ’
is given by,
fθs
g (x,y) = 1 if ‘s’ fits ‘f’
= 0 otherwise.
Morphological operations
Erosion operations
• Example of erosion:

• Advantages:
Removal of unwanted, small scale features.
• Disadvantage:
Side-effect on image as reduction in size of features
Morphological operations
Applications of erosion
• Boundary detection:
Eroded image lacks boundary pixels, hence we
can subtract the eroded image from the original
image to get the boundary.

g = f - (f θ s)
Morphological operations
Applications of erosion
Example: Boundary detection
Morphological operations
Dilation operation
• Dilation:
the structuring element ‘hits’ the boundary region
and source image is enlarged, known as ‘hitting
to image’.

Dilation of an image ‘ f ’ by a structuring element


‘ s ’ is given by,
fΘs
g (x,y) = 1 if ‘s’ hits ‘f’
= 0 otherwise.
Morphological operations
Dilation operation
• Dilation operation will shrink the holes
enclosed by a single region and make the
gaps between different regions smaller.

• To fill in any small intrusions into a regions


boundaries.

• Opposite effect of erosion.


Morphological operations
Applications of erosion
Disadvantage:
Boundary finding is highly dependent on the ratio
of structuring element to image resolution.
Morphological operations
Application of Dilation

• Enlarging or enhancing the ‘regions of


interest’ (ROI)
• Smoothening of the boundary regions

Limitations:
• Exhibits unnecessary alteration to the
sharp edges
Morphological operations
Dilation operations
Example:
Morphological operations
Compound operations
• Combinations of erosion, dilation & various
other operations
- Inversion
- opening of an image
- Closing of an image
Presentation for Seminar 4
• Morphological filtering
• Neighborhood operations
- Convolution
- Correlation
• Segmentation
Review of 3 seminar
rd

• Structuring elements & its types


• Erosion
• Applications of erosion
• Dilation
• Applications of dilation
• Introduction of Opening & closing of image
Morphological filtering
• Opening of image: erosion is followed by
dilation.
f s = (f 0 s) 0 s

• Closing of image: dilation is followed by


erosion.
f s = (f 0 s) 0 s
Morphological filtering
• Filtering is removal of noise and
unnecessary information from image.
Example: a biscuit inspection system.
Objective is to measure / monitor size &
shape.

The noise is the image capturing element


noise or the biscuit crumbs.
Morphological filtering
Example:
Segmentation
Low level Image processing

Segmentation

High level Image processing


• Partitioning of the image into distinct regions
• Applications as Image analysis & interpretation
- Industrial inspection
- tracking of objects
- detection and measurement of objects
Segmentation
• Classification:
- Non-contextual: these techniques ignore
the relationships between the two features
of an image

- Contextual: exploit the relationships


between the two features in an image
Segmentation
Non-contextual techniques

• Regions are treated as independent


images
• Thresholding: Classification of pixels in
two distinct categories.
• The strength of an edge-typically grey
level is detected by assigning value ‘0’ if
the gradient falls below the threshold or a
non-zero (usually ‘1’) is assigned.
Non-contextual techniques
Thresholding
Classification of pixels into two categories.
0 f(x,y) < T
g(x,y) =
1 , f(x,y) ≥ T.

For the brighter feature.

This shows that this technique is feature


dependent and cannot be used for automatic
detection.
Example, a robot camera to view its cards in hand.
Non-contextual techniques
Thresholding
Example:
Non-contextual techniques
Thresholding

• Thresholding by a pair:

0 f(x,y) < T1
g(x,y) = 1 T1 ≤ f(x,y) ≤ T2
0 f(x,y) > T2.
Contextual techniques

• Thresholding groups together according to


their global attribute, such as grey level.
• This can be more successful as it takes into
account that pixels belonging to a single
object are close to one another.
• It can be based on concept of similarity or
concept of discontinuity.
Contextual techniques
Pixel connectivity

• This is a central concept of both edge and


region based approaches.
• Types: 4-neighbourhood
8-neighbourhood
Convolution

You might also like