SlideShare uma empresa Scribd logo
1 de 57
Baixar para ler offline
Image Processing (KCS-062):
Unit-5: Image compression, Representation, Pattern
classes and Matching
Dr. Radhey Shyam
Professor
Department of Computer Science and Engineering
BIET Lucknow
(Affiliated to Dr. A.P.J. Abdul Kalam Technical University
Unit-5 have been compiled/prepared by Dr. Radhey Shyam, with grateful acknowledgment who made their
course contents freely available. Feel free to use this study material for your own academic purposes. For
any query, the communication can be made through my mail shyam0058@gmail.com.
Course Outcome of Unit-5, the students will be able to explain the basic concepts of Image
compression,Representation, and Pattern classes and Matching.
Date: July 17, 2021
01/12/2020
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Representation & Description
Representation & Description
The results of segmentation is a set of regions. Regions are then
represented (often univocally) and described (often non-univocally)
Two main ways of representing a region:
- external characteristics (its boundary): focus on shape and size
- internal characteristics (its internal pixels): focus on color, textures…
The next step: description
E.g.: a region may be represented by its boundary, and its boundary
described by some features such as length, regularity…
- Features should be insensitive to translation, rotation, and scaling.
- Both boundary and regional descriptors are often used together.
Copyright notice: Most images in these slides are
© Gonzalez and Woods, Digital Image Processing, Prentice-Hall
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Representation of boundaries
Representation of boundaries
Hypotheses: binary images, objects do not touch the image border
(padding if necessary), one object at a time
To represent a boundary, it is useful to compact the raw data (list of
boundary pixels coordinates) 
Boundary following: start at the first boundary position in (e.g.)
lexicographic ordering and build a chain code
Chain codes: list of segments with defined length and direction
• 4-directional chain codes
• 8-directional chain codes
- At each boundary pixel,
circularly inspect the
neighbourhood until a new
boundary pixel is found
- Stop when contour closes
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Representation of boundaries
Representation of boundaries
Simplify
It may be useful to downsample the border image before computing
the chain code
• to reduce the code size
• to remove useless details along the boundary
Can be conveniently done during the boundary following process: at
each step the large-grid node is selected which is closest to a boundary
point
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Representation of boundaries
Representation of boundaries
• To make the code independent of the starting point:
the code is a circular sequence; the starting point is defined as the
one which yields a sequence of numbers that together represent
the smallest possible integer
E.g., 10103322  01033221
• To normalize wrt rotation (in 90 deg. or 45 deg. steps):
first differences (no. of direction changes) can be used
E.g., 10103322  3133030 (counting ccw)
and pre-pending the last transition (circular sequence: 2  1 = 3)
 33133030
(shape number, see later)
01/12/2020
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Representation of a shape
Representation of a shape
Skeletons represent (non-univocally) a shape by reducing it to a graph
Medial axis transform (Blum 1967):
points that have more than one closest boundary points.
Also built using a prairie fire process
• object is a field of dry grass
• fire is simultaneously lit along the boundary
• fire propagates at uniform velocity
• skeleton is the set of quench points, where two independent fire-fronts
meet
Highly sensitive
to small details
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Representation of a shape
Representation of a shape
Skeletons represent (non-univocally) a shape by reducing it to a graph
Digital approaches can simulate the grassfire propagation using
• iterative constrained erosion process
• centers of maximal balls in distance-transform domain (together with
their radii, they permit exact reconstruction of the object)
• centers of the enclosed balls that touch the object boundary at two or
more disjoint locations.
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Boundary descriptors
Boundary descriptors
Simple descriptors:
• length
e.g., for 8-connected chain code:
horiz. components + vert. components + 21/2 diag. components
• order
no. ef elements in the code (same as above without 21/2 factor)
• diameter
length of the major axis: max(D(pi,pj)) where D is a distance and
pi , pj are points on the boundary. The minor axis is orthogonal to
the major axis, and has length [no matter its position] that permits
to determine the
• basic rectangle that minimally encloses the boundary
• eccentricity of the basic rectangle (major/minor axes ratio)
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Boundary descriptors
Boundary descriptors
• shape number: first-difference code of smallest magnitude
(treating the chain code as a circular sequence)
All the shapes of
order 4, 6, 8
The dot is the
starting point
01/12/2020
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Boundary descriptors
Boundary descriptors
Steps in the
generation of a shape
number
It is advisable to
normalize the grid
orientation by aligning
the chain code grid to
the basic rectangle
(note: poor drawing of
the basic rectangle in
this fig., or may indicate
small set of available
discrete orientations)
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Boundary descriptors
Boundary descriptors
• 1-D Fourier descriptors
the sequence of boundary points is treated as a sequence of points in
the complex plane
- It becomes a complex 1-D descriptor
- Can be DFT-transformed
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Boundary descriptors
Boundary descriptors
Different approximated descriptions are obtained by dropping some
DFT coefficients
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Boundary descriptors
Boundary descriptors
01/12/2020
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Boundary descriptors
Boundary descriptors
Fourier descriptors are not insensitive to translation etc.,
but their effects on the transform coefficients are known:
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Boundary descriptors
Boundary descriptors
• Statistical moments
A portion of a boundary can be described as a 1-D function
(stopping when the distance from the origin stops growing)
Then, statistical moments (mean, variance, skewness, kurtosis, …)
can be used to describe it
• Treat g(r) as a discrete r.v. v in the range [0, A-1] (quantized
levels on the g(r) axis above), having a pdf p(vi)
• Its n-th central moment is
mn(v)=Si (vi-m)n p(vi)
where m = Si vi p(vi)
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Regional descriptors
Regional descriptors
Some simple descriptors
• area
• compactness = perimeter2/area
(dimensionless  insensitive to
scale)
- In this figure:
(white area) / (total light area)
gives an idea of relative electrical
energy consumption
(should be normalized by land/sea
fraction in image, or by population
density)
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Regional descriptors
Regional descriptors
Topology (maths) is the study of the region properties which are
unaffected by rubber-sheet deformations (non-Euclidean geometry)
[like in many subway maps]
[http://www.rrb.wayne.edu/topology.html]
• number of holes H
• number of connected components C
• Euler number, E = C - H
01/12/2020
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Regional descriptors
Regional descriptors
Textures can be analyzed by statistical descriptors in terms of
smoothness, coarseness, regularity …
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Regional descriptors:
some statistical descriptors
Regional descriptors:
some statistical descriptors
- Statistical (central) moments mn(z) = Si (zi-m)np(zi)
of the gray-level histogram p(zi)
- Activity index R R = 1 - 1/(1+s 2)
(R=0 in flat areas,  1 in very active ones)
- Uniformity U U = Si p2(zi)
(max. if gray levels are equally distributed)
- Entropy e e = - Si p(zi) log2 p(zi)
(is 0 for a constant image)
[R, U, and e provide approx. the same information]
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Regional descriptors
Regional descriptors
Moments of the image as a 2-D function
Moment: mpq= SxSy xp yq f (x,y)
Central moment: mpq= SxSy (x-x’)p (y-y’)q f(x,y)
with x’= m10 / m00 and y’= m01 / m00
If we define the normalized central moments
hpq = mpq / m00
g with g = (p+q)/2 + 1
seven invariant moments can be defined, e.g.
f1 = h20h02
f2 = (h20-h02)2 + 4h11
2
…
which are invariant to translation, rotation, scaling, and mirroring
(but for a sign change)
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Regional descriptors
Regional descriptors
01/12/2020
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Regional descriptors
Regional descriptors
Fourier spectrum features:
- amplitude of peaks gives principal directions of the patterns
- location of maximum peak(s) gives the fundamental period(s)
- periodic components can be removed via filtering; the remaining
non-periodic image can be analyzed using statistical techniques
The spectrum can be also studied in polar coordinates: S(r,q)
For each pair r,q we can have two descriptors:
S(r) = Sq Sq(r) S(q ) = Sr Sr(q )
see also:
z11_Shape-based image retrieval using generic Fourier descriptor
Matlab Central 2016:
FD = gfd(bw,m,n) - Implementation of the Generic Fourier Descriptors
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Regional descriptors
Regional descriptors
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Next step: use features for segmentation / classification
Next step: use features for segmentation / classification
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
Next step: use features for segmentation / classification
Next step: use features for segmentation / classification
01/12/2020
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
…or use Deep Learning for segmentation / classification
…or use Deep Learning for segmentation / classification
Gianni Ramponi
http://www.units.it/ramponi Digital Image Processing
…or use Deep Learning for segmentation / classification
…or use Deep Learning for segmentation / classification
 Dip11a, b
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5
Ip unit 5

Mais conteúdo relacionado

Mais procurados

09 cie552 image_featuresi
09 cie552 image_featuresi09 cie552 image_featuresi
09 cie552 image_featuresiElsayed Hemayed
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iiiArun Prakash
 
Transform coding
Transform codingTransform coding
Transform codingNancy K
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compressionKadamPawan
 
6.frequency domain image_processing
6.frequency domain image_processing6.frequency domain image_processing
6.frequency domain image_processingNashid Alam
 
Animation Techniques
Animation TechniquesAnimation Techniques
Animation TechniquesMahith
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processingVinayak Narayanan
 
morphological tecnquies in image processing
morphological tecnquies in image processingmorphological tecnquies in image processing
morphological tecnquies in image processingsoma saikiran
 
morphological image processing
morphological image processingmorphological image processing
morphological image processingJohn Williams
 
Practical Digital Image Processing 3
 Practical Digital Image Processing 3 Practical Digital Image Processing 3
Practical Digital Image Processing 3Aly Abdelkareem
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processingRaghu Kumar
 
Chapter 9 morphological image processing
Chapter 9 morphological image processingChapter 9 morphological image processing
Chapter 9 morphological image processingasodariyabhavesh
 
Practical Digital Image Processing 2
Practical Digital Image Processing 2Practical Digital Image Processing 2
Practical Digital Image Processing 2Aly Abdelkareem
 
morphological image processing
morphological image processingmorphological image processing
morphological image processingAnubhav Kumar
 

Mais procurados (20)

09 cie552 image_featuresi
09 cie552 image_featuresi09 cie552 image_featuresi
09 cie552 image_featuresi
 
visual realism Unit iii
 visual realism Unit iii visual realism Unit iii
visual realism Unit iii
 
Transform coding
Transform codingTransform coding
Transform coding
 
Fidelity criteria in image compression
Fidelity criteria in image compressionFidelity criteria in image compression
Fidelity criteria in image compression
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
6.frequency domain image_processing
6.frequency domain image_processing6.frequency domain image_processing
6.frequency domain image_processing
 
Animation Techniques
Animation TechniquesAnimation Techniques
Animation Techniques
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
morphological tecnquies in image processing
morphological tecnquies in image processingmorphological tecnquies in image processing
morphological tecnquies in image processing
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Practical Digital Image Processing 3
 Practical Digital Image Processing 3 Practical Digital Image Processing 3
Practical Digital Image Processing 3
 
Image compression models
Image compression modelsImage compression models
Image compression models
 
Image Quantization
Image QuantizationImage Quantization
Image Quantization
 
Morphological operations
Morphological operationsMorphological operations
Morphological operations
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
Chapter 9 morphological image processing
Chapter 9 morphological image processingChapter 9 morphological image processing
Chapter 9 morphological image processing
 
Line detection algorithms
Line detection algorithmsLine detection algorithms
Line detection algorithms
 
Practical Digital Image Processing 2
Practical Digital Image Processing 2Practical Digital Image Processing 2
Practical Digital Image Processing 2
 
Hit and-miss transform
Hit and-miss transformHit and-miss transform
Hit and-miss transform
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 

Semelhante a Ip unit 5

image segmentation by ppres.pptx
image segmentation by ppres.pptximage segmentation by ppres.pptx
image segmentation by ppres.pptxmohan134666
 
"FingerPrint Recognition Using Principle Component Analysis(PCA)”
"FingerPrint Recognition Using Principle Component Analysis(PCA)”"FingerPrint Recognition Using Principle Component Analysis(PCA)”
"FingerPrint Recognition Using Principle Component Analysis(PCA)”Er. Arpit Sharma
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfvikasmittal92
 
3D Graphics
3D Graphics3D Graphics
3D GraphicsViTAly
 
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...ijcisjournal
 
A Tutorial On Ip 1
A Tutorial On Ip 1A Tutorial On Ip 1
A Tutorial On Ip 1ankuredkie
 
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATIONDEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATIONSelvaLakshmi63
 
License plate recognition
License plate recognitionLicense plate recognition
License plate recognitionrahul bhambri
 
Segmentation and recognition of handwritten digit numeral string using a mult...
Segmentation and recognition of handwritten digit numeral string using a mult...Segmentation and recognition of handwritten digit numeral string using a mult...
Segmentation and recognition of handwritten digit numeral string using a mult...ijfcstjournal
 
Real time-image-processing-applied-to-traffic-queue-detection-algorithm
Real time-image-processing-applied-to-traffic-queue-detection-algorithmReal time-image-processing-applied-to-traffic-queue-detection-algorithm
Real time-image-processing-applied-to-traffic-queue-detection-algorithmajayrampelli
 
Vehicle license plate recognition
Vehicle license plate recognitionVehicle license plate recognition
Vehicle license plate recognitionEng Ansam Hadi
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipeliningAreena Javed
 
Two Dimensional Shape and Texture Quantification - Medical Image Processing
Two Dimensional Shape and Texture Quantification - Medical Image ProcessingTwo Dimensional Shape and Texture Quantification - Medical Image Processing
Two Dimensional Shape and Texture Quantification - Medical Image ProcessingChamod Mune
 
Digital_image_processing_-Vijaya_Raghavan.pdf
Digital_image_processing_-Vijaya_Raghavan.pdfDigital_image_processing_-Vijaya_Raghavan.pdf
Digital_image_processing_-Vijaya_Raghavan.pdfVaideshSiva1
 

Semelhante a Ip unit 5 (20)

image segmentation by ppres.pptx
image segmentation by ppres.pptximage segmentation by ppres.pptx
image segmentation by ppres.pptx
 
"FingerPrint Recognition Using Principle Component Analysis(PCA)”
"FingerPrint Recognition Using Principle Component Analysis(PCA)”"FingerPrint Recognition Using Principle Component Analysis(PCA)”
"FingerPrint Recognition Using Principle Component Analysis(PCA)”
 
Module-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdfModule-5-1_230523_171754 (1).pdf
Module-5-1_230523_171754 (1).pdf
 
3D Graphics
3D Graphics3D Graphics
3D Graphics
 
427lects
427lects427lects
427lects
 
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
Enhanced Optimization of Edge Detection for High Resolution Images Using Veri...
 
A Tutorial On Ip 1
A Tutorial On Ip 1A Tutorial On Ip 1
A Tutorial On Ip 1
 
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATIONDEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
DEEP LEARNING TECHNIQUES POWER POINT PRESENTATION
 
License plate recognition
License plate recognitionLicense plate recognition
License plate recognition
 
mini prjt
mini prjtmini prjt
mini prjt
 
representation.pptx
representation.pptxrepresentation.pptx
representation.pptx
 
Cgm Lab Manual
Cgm Lab ManualCgm Lab Manual
Cgm Lab Manual
 
Segmentation and recognition of handwritten digit numeral string using a mult...
Segmentation and recognition of handwritten digit numeral string using a mult...Segmentation and recognition of handwritten digit numeral string using a mult...
Segmentation and recognition of handwritten digit numeral string using a mult...
 
Real time-image-processing-applied-to-traffic-queue-detection-algorithm
Real time-image-processing-applied-to-traffic-queue-detection-algorithmReal time-image-processing-applied-to-traffic-queue-detection-algorithm
Real time-image-processing-applied-to-traffic-queue-detection-algorithm
 
ACMP340.pptx
ACMP340.pptxACMP340.pptx
ACMP340.pptx
 
project_final
project_finalproject_final
project_final
 
Vehicle license plate recognition
Vehicle license plate recognitionVehicle license plate recognition
Vehicle license plate recognition
 
Graphics pipelining
Graphics pipeliningGraphics pipelining
Graphics pipelining
 
Two Dimensional Shape and Texture Quantification - Medical Image Processing
Two Dimensional Shape and Texture Quantification - Medical Image ProcessingTwo Dimensional Shape and Texture Quantification - Medical Image Processing
Two Dimensional Shape and Texture Quantification - Medical Image Processing
 
Digital_image_processing_-Vijaya_Raghavan.pdf
Digital_image_processing_-Vijaya_Raghavan.pdfDigital_image_processing_-Vijaya_Raghavan.pdf
Digital_image_processing_-Vijaya_Raghavan.pdf
 

Mais de Dr. Radhey Shyam

KIT-601-L-UNIT-1 (Revised) Introduction to Data Analytcs.pdf
KIT-601-L-UNIT-1 (Revised) Introduction to Data Analytcs.pdfKIT-601-L-UNIT-1 (Revised) Introduction to Data Analytcs.pdf
KIT-601-L-UNIT-1 (Revised) Introduction to Data Analytcs.pdfDr. Radhey Shyam
 
SE-UNIT-3-II-Software metrics, numerical and their solutions.pdf
SE-UNIT-3-II-Software metrics, numerical and their solutions.pdfSE-UNIT-3-II-Software metrics, numerical and their solutions.pdf
SE-UNIT-3-II-Software metrics, numerical and their solutions.pdfDr. Radhey Shyam
 
Introduction to Data Analytics and data analytics life cycle
Introduction to Data Analytics and data analytics life cycleIntroduction to Data Analytics and data analytics life cycle
Introduction to Data Analytics and data analytics life cycleDr. Radhey Shyam
 
KIT-601 Lecture Notes-UNIT-2.pdf
KIT-601 Lecture Notes-UNIT-2.pdfKIT-601 Lecture Notes-UNIT-2.pdf
KIT-601 Lecture Notes-UNIT-2.pdfDr. Radhey Shyam
 
KIT-601 Lecture Notes-UNIT-1.pdf
KIT-601 Lecture Notes-UNIT-1.pdfKIT-601 Lecture Notes-UNIT-1.pdf
KIT-601 Lecture Notes-UNIT-1.pdfDr. Radhey Shyam
 
Deep-Learning-2017-Lecture5CNN.pptx
Deep-Learning-2017-Lecture5CNN.pptxDeep-Learning-2017-Lecture5CNN.pptx
Deep-Learning-2017-Lecture5CNN.pptxDr. Radhey Shyam
 
SE UNIT-3 (Software metrics).pdf
SE UNIT-3 (Software metrics).pdfSE UNIT-3 (Software metrics).pdf
SE UNIT-3 (Software metrics).pdfDr. Radhey Shyam
 
Ip unit 4 modified on 22.06.21
Ip unit 4 modified on 22.06.21Ip unit 4 modified on 22.06.21
Ip unit 4 modified on 22.06.21Dr. Radhey Shyam
 
Ip unit 3 modified of 26.06.2021
Ip unit 3 modified of 26.06.2021Ip unit 3 modified of 26.06.2021
Ip unit 3 modified of 26.06.2021Dr. Radhey Shyam
 
Ip unit 2 modified on 8.6.2021
Ip unit 2 modified on 8.6.2021Ip unit 2 modified on 8.6.2021
Ip unit 2 modified on 8.6.2021Dr. Radhey Shyam
 

Mais de Dr. Radhey Shyam (20)

KIT-601-L-UNIT-1 (Revised) Introduction to Data Analytcs.pdf
KIT-601-L-UNIT-1 (Revised) Introduction to Data Analytcs.pdfKIT-601-L-UNIT-1 (Revised) Introduction to Data Analytcs.pdf
KIT-601-L-UNIT-1 (Revised) Introduction to Data Analytcs.pdf
 
SE-UNIT-3-II-Software metrics, numerical and their solutions.pdf
SE-UNIT-3-II-Software metrics, numerical and their solutions.pdfSE-UNIT-3-II-Software metrics, numerical and their solutions.pdf
SE-UNIT-3-II-Software metrics, numerical and their solutions.pdf
 
Introduction to Data Analytics and data analytics life cycle
Introduction to Data Analytics and data analytics life cycleIntroduction to Data Analytics and data analytics life cycle
Introduction to Data Analytics and data analytics life cycle
 
KCS-501-3.pdf
KCS-501-3.pdfKCS-501-3.pdf
KCS-501-3.pdf
 
KIT-601 Lecture Notes-UNIT-2.pdf
KIT-601 Lecture Notes-UNIT-2.pdfKIT-601 Lecture Notes-UNIT-2.pdf
KIT-601 Lecture Notes-UNIT-2.pdf
 
KIT-601 Lecture Notes-UNIT-1.pdf
KIT-601 Lecture Notes-UNIT-1.pdfKIT-601 Lecture Notes-UNIT-1.pdf
KIT-601 Lecture Notes-UNIT-1.pdf
 
KCS-055 U5.pdf
KCS-055 U5.pdfKCS-055 U5.pdf
KCS-055 U5.pdf
 
KCS-055 MLT U4.pdf
KCS-055 MLT U4.pdfKCS-055 MLT U4.pdf
KCS-055 MLT U4.pdf
 
Deep-Learning-2017-Lecture5CNN.pptx
Deep-Learning-2017-Lecture5CNN.pptxDeep-Learning-2017-Lecture5CNN.pptx
Deep-Learning-2017-Lecture5CNN.pptx
 
SE UNIT-3 (Software metrics).pdf
SE UNIT-3 (Software metrics).pdfSE UNIT-3 (Software metrics).pdf
SE UNIT-3 (Software metrics).pdf
 
SE UNIT-2.pdf
SE UNIT-2.pdfSE UNIT-2.pdf
SE UNIT-2.pdf
 
SE UNIT-1 Revised.pdf
SE UNIT-1 Revised.pdfSE UNIT-1 Revised.pdf
SE UNIT-1 Revised.pdf
 
SE UNIT-3.pdf
SE UNIT-3.pdfSE UNIT-3.pdf
SE UNIT-3.pdf
 
Ip unit 4 modified on 22.06.21
Ip unit 4 modified on 22.06.21Ip unit 4 modified on 22.06.21
Ip unit 4 modified on 22.06.21
 
Ip unit 3 modified of 26.06.2021
Ip unit 3 modified of 26.06.2021Ip unit 3 modified of 26.06.2021
Ip unit 3 modified of 26.06.2021
 
Ip unit 2 modified on 8.6.2021
Ip unit 2 modified on 8.6.2021Ip unit 2 modified on 8.6.2021
Ip unit 2 modified on 8.6.2021
 
Ip unit 1
Ip unit 1Ip unit 1
Ip unit 1
 
Cc unit 5
Cc unit 5Cc unit 5
Cc unit 5
 
Cc unit 4 updated version
Cc unit 4 updated versionCc unit 4 updated version
Cc unit 4 updated version
 
Cc unit 3 updated version
Cc unit 3 updated versionCc unit 3 updated version
Cc unit 3 updated version
 

Último

CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncssuser2ae721
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxVelmuruganTECE
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptMadan Karki
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating SystemRashmi Bhat
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESNarmatha D
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substationstephanwindworld
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingBootNeck1
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...Amil Baba Dawood bangali
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm Systemirfanmechengr
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionMebane Rash
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...VICTOR MAESTRE RAMIREZ
 

Último (20)

CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsyncWhy does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
Why does (not) Kafka need fsync: Eliminating tail latency spikes caused by fsync
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Internet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptxInternet of things -Arshdeep Bahga .pptx
Internet of things -Arshdeep Bahga .pptx
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
Indian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.pptIndian Dairy Industry Present Status and.ppt
Indian Dairy Industry Present Status and.ppt
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Virtual memory management in Operating System
Virtual memory management in Operating SystemVirtual memory management in Operating System
Virtual memory management in Operating System
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Industrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIESIndustrial Safety Unit-I SAFETY TERMINOLOGIES
Industrial Safety Unit-I SAFETY TERMINOLOGIES
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
Earthing details of Electrical Substation
Earthing details of Electrical SubstationEarthing details of Electrical Substation
Earthing details of Electrical Substation
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
 
Class 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm SystemClass 1 | NFPA 72 | Overview Fire Alarm System
Class 1 | NFPA 72 | Overview Fire Alarm System
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
US Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of ActionUS Department of Education FAFSA Week of Action
US Department of Education FAFSA Week of Action
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
 

Ip unit 5

  • 1. Image Processing (KCS-062): Unit-5: Image compression, Representation, Pattern classes and Matching Dr. Radhey Shyam Professor Department of Computer Science and Engineering BIET Lucknow (Affiliated to Dr. A.P.J. Abdul Kalam Technical University Unit-5 have been compiled/prepared by Dr. Radhey Shyam, with grateful acknowledgment who made their course contents freely available. Feel free to use this study material for your own academic purposes. For any query, the communication can be made through my mail shyam0058@gmail.com. Course Outcome of Unit-5, the students will be able to explain the basic concepts of Image compression,Representation, and Pattern classes and Matching. Date: July 17, 2021
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. 01/12/2020 Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Representation & Description Representation & Description The results of segmentation is a set of regions. Regions are then represented (often univocally) and described (often non-univocally) Two main ways of representing a region: - external characteristics (its boundary): focus on shape and size - internal characteristics (its internal pixels): focus on color, textures… The next step: description E.g.: a region may be represented by its boundary, and its boundary described by some features such as length, regularity… - Features should be insensitive to translation, rotation, and scaling. - Both boundary and regional descriptors are often used together. Copyright notice: Most images in these slides are © Gonzalez and Woods, Digital Image Processing, Prentice-Hall Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Representation of boundaries Representation of boundaries Hypotheses: binary images, objects do not touch the image border (padding if necessary), one object at a time To represent a boundary, it is useful to compact the raw data (list of boundary pixels coordinates)  Boundary following: start at the first boundary position in (e.g.) lexicographic ordering and build a chain code Chain codes: list of segments with defined length and direction • 4-directional chain codes • 8-directional chain codes - At each boundary pixel, circularly inspect the neighbourhood until a new boundary pixel is found - Stop when contour closes Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Representation of boundaries Representation of boundaries Simplify It may be useful to downsample the border image before computing the chain code • to reduce the code size • to remove useless details along the boundary Can be conveniently done during the boundary following process: at each step the large-grid node is selected which is closest to a boundary point Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Representation of boundaries Representation of boundaries • To make the code independent of the starting point: the code is a circular sequence; the starting point is defined as the one which yields a sequence of numbers that together represent the smallest possible integer E.g., 10103322  01033221 • To normalize wrt rotation (in 90 deg. or 45 deg. steps): first differences (no. of direction changes) can be used E.g., 10103322  3133030 (counting ccw) and pre-pending the last transition (circular sequence: 2  1 = 3)  33133030 (shape number, see later)
  • 17. 01/12/2020 Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Representation of a shape Representation of a shape Skeletons represent (non-univocally) a shape by reducing it to a graph Medial axis transform (Blum 1967): points that have more than one closest boundary points. Also built using a prairie fire process • object is a field of dry grass • fire is simultaneously lit along the boundary • fire propagates at uniform velocity • skeleton is the set of quench points, where two independent fire-fronts meet Highly sensitive to small details Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Representation of a shape Representation of a shape Skeletons represent (non-univocally) a shape by reducing it to a graph Digital approaches can simulate the grassfire propagation using • iterative constrained erosion process • centers of maximal balls in distance-transform domain (together with their radii, they permit exact reconstruction of the object) • centers of the enclosed balls that touch the object boundary at two or more disjoint locations. Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Boundary descriptors Boundary descriptors Simple descriptors: • length e.g., for 8-connected chain code: horiz. components + vert. components + 21/2 diag. components • order no. ef elements in the code (same as above without 21/2 factor) • diameter length of the major axis: max(D(pi,pj)) where D is a distance and pi , pj are points on the boundary. The minor axis is orthogonal to the major axis, and has length [no matter its position] that permits to determine the • basic rectangle that minimally encloses the boundary • eccentricity of the basic rectangle (major/minor axes ratio) Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Boundary descriptors Boundary descriptors • shape number: first-difference code of smallest magnitude (treating the chain code as a circular sequence) All the shapes of order 4, 6, 8 The dot is the starting point
  • 18. 01/12/2020 Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Boundary descriptors Boundary descriptors Steps in the generation of a shape number It is advisable to normalize the grid orientation by aligning the chain code grid to the basic rectangle (note: poor drawing of the basic rectangle in this fig., or may indicate small set of available discrete orientations) Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Boundary descriptors Boundary descriptors • 1-D Fourier descriptors the sequence of boundary points is treated as a sequence of points in the complex plane - It becomes a complex 1-D descriptor - Can be DFT-transformed Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Boundary descriptors Boundary descriptors Different approximated descriptions are obtained by dropping some DFT coefficients Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Boundary descriptors Boundary descriptors
  • 19. 01/12/2020 Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Boundary descriptors Boundary descriptors Fourier descriptors are not insensitive to translation etc., but their effects on the transform coefficients are known: Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Boundary descriptors Boundary descriptors • Statistical moments A portion of a boundary can be described as a 1-D function (stopping when the distance from the origin stops growing) Then, statistical moments (mean, variance, skewness, kurtosis, …) can be used to describe it • Treat g(r) as a discrete r.v. v in the range [0, A-1] (quantized levels on the g(r) axis above), having a pdf p(vi) • Its n-th central moment is mn(v)=Si (vi-m)n p(vi) where m = Si vi p(vi) Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Regional descriptors Regional descriptors Some simple descriptors • area • compactness = perimeter2/area (dimensionless  insensitive to scale) - In this figure: (white area) / (total light area) gives an idea of relative electrical energy consumption (should be normalized by land/sea fraction in image, or by population density) Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Regional descriptors Regional descriptors Topology (maths) is the study of the region properties which are unaffected by rubber-sheet deformations (non-Euclidean geometry) [like in many subway maps] [http://www.rrb.wayne.edu/topology.html] • number of holes H • number of connected components C • Euler number, E = C - H
  • 20. 01/12/2020 Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Regional descriptors Regional descriptors Textures can be analyzed by statistical descriptors in terms of smoothness, coarseness, regularity … Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Regional descriptors: some statistical descriptors Regional descriptors: some statistical descriptors - Statistical (central) moments mn(z) = Si (zi-m)np(zi) of the gray-level histogram p(zi) - Activity index R R = 1 - 1/(1+s 2) (R=0 in flat areas,  1 in very active ones) - Uniformity U U = Si p2(zi) (max. if gray levels are equally distributed) - Entropy e e = - Si p(zi) log2 p(zi) (is 0 for a constant image) [R, U, and e provide approx. the same information] Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Regional descriptors Regional descriptors Moments of the image as a 2-D function Moment: mpq= SxSy xp yq f (x,y) Central moment: mpq= SxSy (x-x’)p (y-y’)q f(x,y) with x’= m10 / m00 and y’= m01 / m00 If we define the normalized central moments hpq = mpq / m00 g with g = (p+q)/2 + 1 seven invariant moments can be defined, e.g. f1 = h20h02 f2 = (h20-h02)2 + 4h11 2 … which are invariant to translation, rotation, scaling, and mirroring (but for a sign change) Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Regional descriptors Regional descriptors
  • 21. 01/12/2020 Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Regional descriptors Regional descriptors Fourier spectrum features: - amplitude of peaks gives principal directions of the patterns - location of maximum peak(s) gives the fundamental period(s) - periodic components can be removed via filtering; the remaining non-periodic image can be analyzed using statistical techniques The spectrum can be also studied in polar coordinates: S(r,q) For each pair r,q we can have two descriptors: S(r) = Sq Sq(r) S(q ) = Sr Sr(q ) see also: z11_Shape-based image retrieval using generic Fourier descriptor Matlab Central 2016: FD = gfd(bw,m,n) - Implementation of the Generic Fourier Descriptors Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Regional descriptors Regional descriptors Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Next step: use features for segmentation / classification Next step: use features for segmentation / classification Gianni Ramponi http://www.units.it/ramponi Digital Image Processing Next step: use features for segmentation / classification Next step: use features for segmentation / classification
  • 22. 01/12/2020 Gianni Ramponi http://www.units.it/ramponi Digital Image Processing …or use Deep Learning for segmentation / classification …or use Deep Learning for segmentation / classification Gianni Ramponi http://www.units.it/ramponi Digital Image Processing …or use Deep Learning for segmentation / classification …or use Deep Learning for segmentation / classification  Dip11a, b