0% found this document useful (0 votes)
26 views

1 - UNIT DIP

Uploaded by

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

1 - UNIT DIP

Uploaded by

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

Dr. Srinath.

S
Associate Professor and HoD
Department of Computer Science and
Engineering
JSS Science and Technology University
Mysore
Digital Image Processing and
Analysis (22SCE161)
Course Outcomes
Study Materials:
Contents of this PPT are extracted from the
below listed books and web sites
About my place : Mysore

• A city of palaces, gardens, shady avenues and sacred temples.


• A historical place.
• Retains some of the charm of the old world with its many institutions
that propagate Carnatic Classical music and dance.

• It is called a beautiful and cultured daughter city of mother India.

Palace

St. Philominas Church Holy Temples


Brindavan Garden National Park

Falls Mysore Zoo Bird Sanctuary


•“One picture is worth more than ten
thousand words”
•Anonymous
Unit – 1
Fundamentals of Image Processing
What is an Image?
• A two dimensional function f(x,y), where x
and y are spatial coordinates, and ‘f’ at
any pair of coordinates (x,y) is called the
intensity or gray level of the image at that
point.
Image?
x
O

f(x,y)

y
Two Dimensional Representation of an Image

Memory Requirement?
Types of Images
• Analog Image :
– In f(x,y), where x,y and f all have continuous
range of values, representing position and
intensity image then it is called Analog Image.

• Digital Image
– In f(x,y), whre x,y and f all have discrite
quqntities, representing position and intensity
image, then it is called Digital Image.
Example: Analog and Digital
Image
PIXEL
• Digital image which contains finite number
of elements each of which has a particular
location and value. These elements are
called “Picture Element”, “Image element”,
“pels” or “Pixel”
What is Digital Image
Processing
• The analysis and manipulation of a
digitized image especially in order to
improve its quality.
What is done in Digital Image
Processing?

•Digital image processing focuses on three major


tasks
– Improvement of pictorial information for human
interpretation

– Image processing for Extracting the attributes for


process like object recognition, segmentation etc.

– Processing of image data for storage, transmission


and representation
Comparison between different
type of images
•Common image formats include:
- Black and White image : 1 bit per pixel
– Gray scale (256 level) image : 1 Byte per pixel
–- RGB color image : 3 Bytes per pixel
–-RGB color image with opacity : 4 Bytes per pixel
Levels of Processing in DIP
•The continuum from image processing to
computer vision can be broken up into low-,
mid- and high-level processes
Low Level Process Mid Level Process High Level Process
Input: Image Input: Image Input: Attributes
Output: Image Output: Attributes Output: Understanding
Examples: Noise Examples: Object Examples: Scene
removal, image recognition, understanding,
sharpening segmentation autonomous navigation

In this course we will


stop here
Image Sharpening

(a) Original Image (b) After sharpening


Removing Noise

(a) Original Image (b) After removing noise


Image Deblurring

(a) Original Image (b) After removing the blur


Examples: Image Enhancement
•One of the most common uses of DIP
techniques: improve quality, remove noise
etc
Examples: Industrial Inspection
•Human operators are
expensive, slow and
unreliable
•Make machines do the
job instead
•Industrial vision
systems
are used in all kinds of
industries
Examples: Law Enforcement
•Image processing
techniques are used
extensively by law
enforcers
– Number plate
recognition for speed
cameras/automated
toll systems
– Fingerprint recognition
– Enhancement of CCTV
images
History of Digital Image Processing
•Early 1920s: One of the first applications of
digital imaging was in the news-
paper industry

– The Bartlane cable picture Early digital image

transmission service
– Images were transferred by submarine cable
between London and New York
– Pictures were coded for cable transfer and
reconstructed at the receiving end on a
History of DIP (cont…)
•Mid to late 1920s: Improvements to the
Bartlane system resulted in higher quality
images
– New reproduction
processes based
on photographic
techniques
– Increased number
of tones in Improved
Early 15 tone digital
reproduced images. digital image
image
– Summary is faster transmission of digital data
achieved
History of DIP (cont…)
•1960s: Improvements in computing
technology and the onset of the space race
led to a surge of work in digital image
processing

•1964: Computers used to


improve the quality of
images of the moon taken
by the Ranger 7 probe A picture of the moon taken
by the Ranger 7 probe
minutes before landing
History of DIP (cont…)
•1970s: Digital image processing begins to be
used in medical applications

•1979: Sir Godfrey N.


Hounsfield & Prof. Allan M.
Cormack share the Nobel
Prize in medicine for the
invention of tomography,
the technology behind Typical head slice CAT
image
Computerised Axial
Tomography (CAT) scans
History of DIP (cont…)
•1980s - Today: The use of digital image
processing techniques has exploded and they
are now used for all kinds of tasks in all kinds
of areas
– Image enhancement/restoration
– Artistic effects
– Medical visualisation
– Industrial inspection
– Law enforcement
– Human computer interfaces
Fundamental Steps in Digital Image
Processing
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in Digital Image
Processing: Image Acquisition
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Image Acquisition
• Image will be acquired from a source that
is usually a hardware.
• For example capture or acquire a image
using digital camera.
Fundamental Steps in Digital Image
Processing: Image Enhancement
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Image Enhancement
• It is the process of adjusting the digital
image, so that results are more suitable for
display.
• Example: Sharpening, Brightness and
contrast adjustment and removal of noise
ect.
• Here images are modified so that it is
more pleasing for visibility.


Fundamental Steps in Digital Image
Processing: Image Restoration
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Image Restoration
• It is the process of recovering an image
which is degraded.
• Image restoration is objective in nature,
which means it depends on the amount of
degradation.
Fundamental Steps in Digital Image
Processing: Morphological Processing
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Morphological Processing
• It deals with extracting image components
that are useful in representation and
description of shapes.

• It includes Erosion and dilation.


Fundamental Steps in Digital Image
Processing: Segmentation
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Segmentation
• It is the process of partitioning of image
into multiple segments.

• It is used locate the objects and


boundaries of the objects.
Image segmentation
Cheque validation
Fundamental Steps in Digital Image
Processing: Object Recognition
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Object Recognition
• It is the process of assigning a label to an
object in an image.
• If the image is consisting of car, this stage
should process an image assigns the label
as car.
Fundamental Steps in Digital Image
Processing: Representation & Description
Image Morphological
Restoration Processing

Image
Segmentation
Enhancement

Image Object
Acquisition Recognition

Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Representation and description
• It deals with converting the data into a suitable
form for the computer processing
• Boundary representation. This is followed when
the shape is important
• Regional representation when the focus is on
the internal properties like texture of an image
• Description deals with extracting some
attributes.
• These attributes are the results of quantitative
information of the image. They are used to
classify one class of object with another
Fundamental Steps 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
Fundamental Steps 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
Image Sub-Sampling
• Image sub-sampling. The key idea in
image sub-sampling is to throw away
every other row and column to create a
half-size image.
Image Resampling
• Changing the pixel dimensions of an
image is called resampling. Resampling
can degrade image quality.

• Down sampling decreases the number of


pixels in the image, while up-sampling
increases the number.

• Down – Resampling shown in next slide


Grey level representation
• Grey level image can be of different levels.
• Example shown in next two slides
Some of the image
enhancement techniques and
also applications
Image Enhancement

High
Low Contrast Image

It’s Histogram
Stretched Histogram
Images after processing
Low quality images
Equalization
Star treck team
Encrypted Image Decrypted Image

Water
marking
application Enhanced to a
color image
Autonomous Machine Perception

A Robot

Region to be inspected
(Picture of a tunnel)

Close lookup Identified Defective Region


Automation of Tile inspection

In a continuous production
process, all dried roof tiles
are automatically inspected
for cracks, deformations,
dimensional correctness, and
color.

The inspection speed is


about 40 tiles per minute.
Defective tiles are eliminated
from the production process
before further refinement
takes place.

Courtesy: Thuringian research program "Image Processing, Pattern


Recognition and Engineering Vision Systems" (Germany)

Quality Assurance
Medical Diagnosis

X-ray Image Binary Image Noise eliminated

Skeletonization Angle Measurement


Thresholding
operation

Deciphered Image

Oblitered Image
Median Filtering

Forensic
Application

Enhanced Image
Number plate identification

The vehicle approached the secured area, and starts the cycle
by stepping over a magnetic loop detector (which is the most
popular vehicle sensor). The loop detector senses the car and
its presence is signaled to the LPR unit.
The LPR unit activates the illumination (invisible Infra-
red in most cases) and takes pictures of the front or rear
plates from the LPR camera (shown at the left side of
the gate). The images of the vehicle include the plate
and the pixel information is read by the LPR unit's
image processing hardware (the frame grabber).
The LPR unit analyzes the image with different image
processing software algorithms, enhances the image, detects
the plate position, extracts the plate string, and identifies the
fonts using special artificial intelligence methods (such as
Neural Networks)
The LPR unit checks if the vehicle appears on a predefined
list of authorized cars, and if found - it signals to open the
gate by activating its relay. The unit can also switch on a
green "go-ahead" light or red "stop" light. The unit can also
display a Welcome! message with personalized data.
The authorized vehicle enters into the secured
area. After passing the gate its detector closes the
gate. Now the system waits for the next vehicle to
approach the secured area
A Number Plate Recognition
system
The plate number is used to produce a violation
fine on speed or red-light systems The manual
process of preparing a violation fine is replaced by
an automated process which reduces the time. The
fines can be viewed and paid on-line.
Image Formats
• Image capturing formats: the format in which image is
created

• Image storage format: the format in which images are


stored (often transmitted)
– In bit maps, the values are binary numbers
– In color images, the values correspond to RGB components
– While storing images, additional information may be stored along
with pixels, like width, height, author, etc.
Image Formats
• RIFF: Resource Interchange File Format
• GIF: Graphics Interchange Format
• TIFF: Tagged Image File Format
• JPEG: Joint Photographic Experts Group
• PostScript:
• PBM: Portable BitMap
• BMP: Bitamp
Standard Color spaces:
• RGB
• CMYK
• Grayscale
The RGB Color Model
• The Primary colors:

• R (red) G (green) B (blue)

• 0 --- off – lowest intensity

• 1 --- on – highest intensity

• A linear combination of all three colors with different


intensity levels
CMYK Color Model
• Short for Cyan-Magenta-Yellow-Black.
• A color model in which all colors are
described as a mixture of these four
Process colors.
• CMYK is the standard color model used in
offset printing for full-color documents
• Because such printing uses inks of these
four basic colors, it is often called four-
color printing.
Some Basic Relationships
between Pixels
4,Diagonal, 8 Neighbors
Pixels’ Relationships

x-1, y-1 x, y-1 x+1, y-1

x-1, y pi (x, y) x+1, y

x-1, y+1 x, y+1 x+1, y+1

Neighbors of pixel pi
1. Four Neighbors : N4(pi) = {(x, y-1), (x+1, y), (x, y+1), (x-1, y)}
2. Diagonal Neighbors : ND(pi) = {(x+1, y-1), (x+1, y+1), (x-1, y+1),
(x-1, y-1)}
3. Eight Neighbors : N8(pi) = N4(pi)  ND(pi)
Adjacency or connectivity
• Two pixels that are neighbors that have
the same gray level are adjacent.
When v={1}, where V is the value under
consideration, 4 and 8 adjacency can be:
4 and 8 adjacency in Gray scale
Mixed Adjacency
M-adjacency
• Answer : Only 8 and m- adjacent
Path and Length
Pixel Connectivity: Summary

4-Connectivity : Pixels p and q are four connected if

1. p and q bear values in V 2. p N4(q)

D-Connectivity : Pixels p and q are diagonally connected if

1. p and q bear values in V 2. p ND(q)

8-Connectivity : Pixels p and q are eight connected if

1. p and q bear values in V 2. p N8(q)


m-connectivity: Pixels p and q are mixed connected if

1. p and q bear values in V


2. p N4(q) or p ND(q) and N4(p) ∩ N4(q) = Ø

0 1 1 0 1 1 0 1 1

0 1 0 0 1 0 0 1 0

0 0 1 0 0 1 0 0 1
Components of Digital Image
Processing System
Image Sensor
• Image sensor : It senses the energy
reflected from the object which is to be
picturized. (Camera).

Image Processing Hardware
• Special Hardware for processing the
captured image.
• Normal computer will not have this.
Computer and Image
processing software
• Digital Computer is an essential part of
Digital image processing
• Image processing software is the next
block where we can develop some
algorithms to process the data obtained
from the image sensor.
Mass Storage
• After the processing of data, we need
space for storing the data.
• Ex: Hard disk, SSD
Image Display and Hardcopy
• Image will be displayed using Monitor
• We can print the image on the paper or
film.
Network
• If the image is to be transferred to a
remote place, network is the component to
be used with suitable bandwidth.
Elements of visual Perception
Structure of Human Eye
• The lens focuses the light reflected from
different objects onto the retina which is
composed of photoreceptors-rods and
cones.

• Nerves containing the retina leave the


eyeball through the optic nerve bundle.

• The place where the optic nerve leave is


called blind spot. This is because it does
not have retina.
Image Formation model
• Function f(x,y) may be characterized by
two components:
– The amount of source illumination incident on
the scene being viewed denoted by i(x,y)and

– The amount of illumination reflected by


objects in the scene denoted by r(x,y)

– The two function combine as a product to


form f(x,y)
Simple Image formation model
• Simple image formation model is as
shown in the previous slide.
• Bottom left corner is the object /scene to
be picturized.
• There should be illumination (light) from
external source.
Active and Passive illumination
• Based on to the source with which the
object is illuminated, it is classified as active
and passive

• If image sensor is having its own


illumination to get object having certain
reflector and capture it back it is called
active method of illumination

• If the external source is used then it is


• Illumination on the scene object, some portion will be
observed and some are reflected from the object.

• So the reflected potion will be provided to the imaging


system

• Imaging system will have image sensor (example digital


camera will have array type of image sensor), will projected
to the plane. This will convert 3-D object into 2-D plane.

• Digital and analogy circuitry sweep these outputs and


convert them to an analogy signal, which is then digitized by
another section of the imaging section.
Digital image formed
• i(x,y) can be in the
range 0 to infi.
Indicates that the light
source can vary in
any range.
• r(x,y) can be either 0
or 1, indicates that it
will observe (0) or
reflect (1).
Sampling and Quantization
• In order to become suitable for digital
processing image function must be
digitized both spatially and in amplitude.
• This digitization process has two main
process called:
– Sampling : Digitizing the coordinate value is
called sampling
– Quantization : Digitizing the amplitude value is
called quantization
Digitalization : Representation
of intensity value of line AB
Sampling : Dividing the spatial
coordinates
Quantization: Intensity
representation by some value
Analog to Digital : with sampling
and quantization
Digital Image representation
• A digital image can be define as a 2D
signal that varies over the spatial
coordinates x and y, and can be written
mathematically as f(x,y)
Digital representation
Analog to digital ..
Resolution
• It is the ability of imaging system to
produce the smallest discernable details.
• Resolution is the smallest number of line
pairs per unit distance.

• The number of rows in the digital image is


called vertical resolution.
• The number of columns in the digital
image is called horizontal resolution
Zooming and Shrinking Digital
Image
• What is Zooming?
– Increasing the number of pixels in an image
so that the image appears larger.
– Zooming has two steps:
• Creation of new pixel locations
• Assignment of gray level to those new locations

• Zooming: Two methods


– Nearest Neighbor Interpolation (Replication)
– Bilinear Interpolation
Nearest Neighbor Interpolation
Bilinear Interpolation
Shrinking
• Decreasing the resolution of an image
• Shrinking can be done by deleting some of
the rows and columns of the image.
Zooming vs. Shrinking
Distance measure between
pixel
• Consider an image and 3 pixels: p,q and z
Distance function D
Distance measures
Euclidean and city block distance
Chess Board Distance
End of UNIT-1

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy