SlideShare a Scribd company logo
1 of 38
18ECE340T- MACHINE PERCEPTION WITH COGNITION
UNIT-2
Topics Covered: Binary Image Analysis,
Connectedness, Object labeling and counting and Size
filtering
Reference Book
Computer and Machine Vision
by E.R.Davies
Prepared by
Dr. S.UMA MAHESWARI,
Assistant Professor/ ECE
1.Binary Image Analysis
•While binary images contain much less information than
their grayscale counterparts, they embody shape and size
information that is highly relevant for object recognition.
•However, this information resides in a digital lattice of pixels,
and this results in intricacies appearing in the geometry.
Binary Images
Examples of Binary Images
4
• consists of a set of image analysis operations
that are used to produce or process binary
images, usually images of 0’s and 1’s.
0 represents the background
1 represents the foreground
00010010001000
00011110001000
00010010001000
Binary Image Analysis
5
• Some practical applications are
• part inspection
• riveting
• fish counting
• document processing
Binary Image Analysis
6
 Separate objects from background
and from one another
 Aggregate pixels for each object
 Compute features for each object
What kinds of operations?
7
• Many blood cells are
separate objects
• Salt and pepper noise
from thresholding
Example: red blood cell image
8
• 63 separate
objects detected
• Single cells have
area about 50
• Noise spots
• Gobs of cells
Results Analysis
9
1. Thresholding a gray-tone image
2. Determining good thresholds
3. Connected components analysis
4. Binary mathematical morphology
5. All sorts of feature extractors
(area, centroid, circularity, …)
Useful Operations
10
• Background is black
• Healthy cherry is bright
• Bruise is medium dark
• Histogram shows two cherry
regions (black background
has been removed)
gray-tone values
pixel
counts
0 256
Thresholding
11
original gray tone image binary thresholded image
Thresholding Example
2.CONNECTEDNESS IN BINARY
IMAGES
•Consider the colored shapes as foreground objects on a white
background.
CONNECTEDNESS IN BINARY IMAGES
After Thersholding
CONNECTEDNESS IN BINARY IMAGES
• Here, we created a mask that only highlights the parts of the image that we
find interesting, the objects.
• All objects have pixel value of True while the background pixels are False.
• By looking at the mask image, one can count the objects that are present in the
image.
15
Once you have a binary image, you can identify and
then analyze each connected set of pixels.
The connected components operation takes in a binary image
and produces a labeled image in which each pixel has the
integer label of either the background (0) or a component.
binary image after morphology connected components
Connected Components Labeling
16
0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1
0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1
0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1
0 0 0 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1
0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1
0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1
0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1
Original Binary Image
Connected Components Labeling
17
0 0 0 1 1 1 0 0 0 0 2 2 2 2 0 0 0 0 3
0 0 0 1 1 1 1 0 0 0 2 2 2 2 0 0 0 3 3
0 0 0 1 1 1 1 1 0 0 2 2 2 2 0 0 3 3 3
0 0 0 1 1 1 1 1 1 0 2 2 2 2 0 0 3 3 3
0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 3 3 3
0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 3 3 3
0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1
The Labeling Process
1  2
1  3
Equivalent Labels
Pixel Neighbhourhood
• In order to decide which pixels belong to the same object, one can exploit their
neighbourhood: pixels that are directly next to each other and belong to the
foreground class can be considered to belong to the same object.
• Let’s consider the following mask “image” with 8 rows, and 8 columns. Note
that for brevity, 0 is used to represent False (background) and 1 to represent
True (foreground).
0 0 0 0 0 0 0 0
0 1 1 0 0 0 0 0
0 1 1 0 0 0 0 0
0 0 0 1 1 1 0 0
0 0 0 1 1 1 1 0
0 0 0 0 0 0 0 0
• The pixels are organized in a rectangular grid. In order to understand pixel
neighborhoods
3.OBJECT LABELING
AND COUNTING
OBJECT LABELING AND COUNTING
• Labeling may be achieved by scanning the image sequentially until a 1 is encountered on
the first object; a note is then made of the scanning position, and a “propagation” routine
is initiated to label the whole of the object with a 1.
• since the original image space is already in use, a separate image space has to be allocated
for labeling.
• Next, the scan is resumed, ignoring all points already labeled, until another object is
found; this is labeled with a 2 in the separate image space.
• This procedure is continued until the whole image has been scanned and all the objects
have been labeled
A process in which all binary objects are labeled
ALGORITHM FOR OBJECT LABELING
• the for forward scan over image do {…..} notation denotes a sequential forward raster
scan over the image.
ALGORITHM FOR OBJECT LABELING
• Object counting and labeling routine requires a minimum of 2N+1 passes
over the image space, and in practice the number will be closer to NW/2,
where W is the average width of the objects.
• Hence, the algorithm is inherently rather inefficient.
• This prompts us to consider how the number of passes over the image could
be reduced to save computation.
• One possibility would be to scan forward through the image, propagating
new labels through objects as they are discovered.
A Simple Algorithm for Object Labeling
Labeling U-shaped objects
• The least computationally intensive
procedures for propagation involve a
different approach: objects and parts of
objects are labeled on a single sequential
pass through the image, at the same time
noting which labels coexist on objects.
• Then the labels are sorted separately, in a
stage of abstract information processing,
to determine how the initially rather ad
hoc labels should be interpreted.
• Finally, the objects are relabeled
appropriately in a second pass over the
image.
Improved Algorithm for Object Labeling
Clearly this algorithm with its single sequential scan is intrinsically far
more efficient than the previous one
Improved Algorithm for Object Labeling
• The improved above algorithms permit the areas and perimeters of
objects to be determined: thus, objects may be labeled by their areas
or perimeters instead of by numbers representing their order of
appearance in the image.
• More important, the availability of propagation routines means that
objects can be considered in turn in their entirety—if necessary by
transferring them individually to separate image spaces or storage areas
ready for unencumbered independent analysis.
• Evidently, if objects appear in individual binary spaces, maximum and
minimum spatial coordinates are trivially measurable, centroids can
readily be found and more detailed calculations of moments and other
parameters can easily be undertaken.
3.1 Solving the Labeling
Problem in a More Complex
Case
Solving the Labeling Problem in a More Complex Case
• Sequential labeling has been carried out in line with the improved algorithm.
• However, one variation has been adopted—of using a minimum rather than a
maximum labeling convention, so that the values are in general slightly closer to the
eventual ideal labels.
Fig 9.3
Step 1
• However, the whole process of calculating ideal labels can be made more efficient by
inserting numbers instead of ticks, and also adding the right numbers along the leading
diagonal
Step 2
The next step is to minimize the entries
along the individual rows of the table
Step 3
Then we minimize along the individual columns
Step 4
Then we minimize along rows again
4. Size Filtering
Size Filtering
• The 8- connected and 4-connected definitions of connectedness lead to
the following measures of distance (or “metrics”) that apply to pairs of
pixels, labeled i and j, in a digital lattice:
• While the use of the d4 and d8 metrics is bound to lead to certain
inaccuracies, there is a need to see what can be achieved with the use
of local operations in binary images.
Size Filtering
• The basic idea is that small objects may be eliminated by applying a
series of shrink operations.
• In N shrink operations will eliminate an object (or those parts of an
object) that are 2N or fewer pixels across their narrowest dimension.
• This process shrinks all the objects in the image, but in principle a
subsequent N expand operations will restore the larger objects to their
former size.
Algorithm for Recovering Original Forms of
Shrunken Objects
Explanation
• Whole (connected) objects can be removed that are everywhere
narrower than a specified width, it is possible to devise algorithms for
removing any subset of objects that are characterized by a given range
of widths: large objects may be filtered out by first removing lesser-
sized objects and then performing a logical masking operation with the
original image, while intermediate size objects may be filtered out by
removing a larger subset and then restoring small objects that have
previously been stored in a separate image space.
• Finally, note that expand operations followed by shrink operations may
be useful for joining nearby objects, filling in holes, and so on.
• Numerous refinements and additions to these simple techniques are
possible.
Separation of touching objects by shrink
operations.
Figure Shown is the objects (chocolates) in (a) are
shrunk and (b) in order to separate them so that they
may be counted reliably.

More Related Content

What's hot

Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersKuppusamy P
 
Threshold Selection for Image segmentation
Threshold Selection for Image segmentationThreshold Selection for Image segmentation
Threshold Selection for Image segmentationParijat Sinha
 
Sign Language Recognition Using Image Processing For Mute People
Sign Language Recognition Using Image Processing For Mute PeopleSign Language Recognition Using Image Processing For Mute People
Sign Language Recognition Using Image Processing For Mute Peoplepaperpublications3
 
Texture based feature extraction and object tracking
Texture based feature extraction and object trackingTexture based feature extraction and object tracking
Texture based feature extraction and object trackingPriyanka Goswami
 
Object detection technique using bounding box algorithm for
Object detection technique using bounding box algorithm forObject detection technique using bounding box algorithm for
Object detection technique using bounding box algorithm forVESIT,Chembur,Mumbai
 
NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...
NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...
NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...idescitation
 
Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes  Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes ijcga
 
Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes  Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes ijcga
 
An improved hdr image processing using fast global tone mapping
An improved hdr image processing using fast global tone mappingAn improved hdr image processing using fast global tone mapping
An improved hdr image processing using fast global tone mappingeSAT Journals
 
An improved hdr image processing using fast global
An improved hdr image processing using fast globalAn improved hdr image processing using fast global
An improved hdr image processing using fast globaleSAT Publishing House
 
Object detection in images based on homogeneous region segmentation
Object detection in images based on homogeneous region segmentationObject detection in images based on homogeneous region segmentation
Object detection in images based on homogeneous region segmentationAbdeslamAmrane2
 
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLIMETHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLIijcsit
 

What's hot (19)

Image processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filtersImage processing, Noise, Noise Removal filters
Image processing, Noise, Noise Removal filters
 
Final ppt
Final pptFinal ppt
Final ppt
 
Threshold Selection for Image segmentation
Threshold Selection for Image segmentationThreshold Selection for Image segmentation
Threshold Selection for Image segmentation
 
Image segmentation based on color
Image segmentation based on colorImage segmentation based on color
Image segmentation based on color
 
Sign Language Recognition Using Image Processing For Mute People
Sign Language Recognition Using Image Processing For Mute PeopleSign Language Recognition Using Image Processing For Mute People
Sign Language Recognition Using Image Processing For Mute People
 
Texture based feature extraction and object tracking
Texture based feature extraction and object trackingTexture based feature extraction and object tracking
Texture based feature extraction and object tracking
 
Object detection technique using bounding box algorithm for
Object detection technique using bounding box algorithm forObject detection technique using bounding box algorithm for
Object detection technique using bounding box algorithm for
 
PPT s10-machine vision-s2
PPT s10-machine vision-s2PPT s10-machine vision-s2
PPT s10-machine vision-s2
 
PPT s06-machine vision-s2
PPT s06-machine vision-s2PPT s06-machine vision-s2
PPT s06-machine vision-s2
 
NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...
NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...
NMS and Thresholding Architecture used for FPGA based Canny Edge Detector for...
 
Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes  Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes
 
Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes  Visual Hull Construction from Semitransparent Coloured Silhouettes
Visual Hull Construction from Semitransparent Coloured Silhouettes
 
Graphics
GraphicsGraphics
Graphics
 
PPT s08-machine vision-s2
PPT s08-machine vision-s2PPT s08-machine vision-s2
PPT s08-machine vision-s2
 
An improved hdr image processing using fast global tone mapping
An improved hdr image processing using fast global tone mappingAn improved hdr image processing using fast global tone mapping
An improved hdr image processing using fast global tone mapping
 
An improved hdr image processing using fast global
An improved hdr image processing using fast globalAn improved hdr image processing using fast global
An improved hdr image processing using fast global
 
Object detection in images based on homogeneous region segmentation
Object detection in images based on homogeneous region segmentationObject detection in images based on homogeneous region segmentation
Object detection in images based on homogeneous region segmentation
 
PPT s07-machine vision-s2
PPT s07-machine vision-s2PPT s07-machine vision-s2
PPT s07-machine vision-s2
 
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLIMETHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
METHOD FOR A SIMPLE ENCRYPTION OF IMAGES BASED ON THE CHAOTIC MAP OF BERNOULLI
 

Similar to Machine Perception with cognition

Machine Learning - Introduction to Convolutional Neural Networks
Machine Learning - Introduction to Convolutional Neural NetworksMachine Learning - Introduction to Convolutional Neural Networks
Machine Learning - Introduction to Convolutional Neural NetworksAndrew Ferlitsch
 
IRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation PrincipleIRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation PrincipleIRJET Journal
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern PresentationDaniel Cahall
 
Object detection at night
Object detection at nightObject detection at night
Object detection at nightSanjay Crúzé
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfDrAhmedElngar
 
Image processing
Image processingImage processing
Image processingkamal330
 
1 [Autosaved].pptx
1 [Autosaved].pptx1 [Autosaved].pptx
1 [Autosaved].pptxSsdSsd5
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural networkFerdous ahmed
 
Computer Vision: Visual Extent of an Object
Computer Vision: Visual Extent of an ObjectComputer Vision: Visual Extent of an Object
Computer Vision: Visual Extent of an ObjectIOSR Journals
 
People counting in low density video sequences2
People counting in low density video sequences2People counting in low density video sequences2
People counting in low density video sequences2Ahmed Tememe
 
IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...
IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...
IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...IRJET Journal
 
06 image features
06 image features06 image features
06 image featuresankit_ppt
 
00463517b1e90c1e63000000
00463517b1e90c1e6300000000463517b1e90c1e63000000
00463517b1e90c1e63000000Ivonne Liu
 
Handwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPTHandwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPTRishabhTyagi48
 
IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...
IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...
IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...IRJET Journal
 
Implementation of high performance feature extraction method using oriented f...
Implementation of high performance feature extraction method using oriented f...Implementation of high performance feature extraction method using oriented f...
Implementation of high performance feature extraction method using oriented f...eSAT Journals
 
Chap_1_Digital_Image_Fundamentals_DD (2).pdf
Chap_1_Digital_Image_Fundamentals_DD (2).pdfChap_1_Digital_Image_Fundamentals_DD (2).pdf
Chap_1_Digital_Image_Fundamentals_DD (2).pdfMrNeon5
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Simplilearn
 

Similar to Machine Perception with cognition (20)

Machine Learning - Introduction to Convolutional Neural Networks
Machine Learning - Introduction to Convolutional Neural NetworksMachine Learning - Introduction to Convolutional Neural Networks
Machine Learning - Introduction to Convolutional Neural Networks
 
IRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation PrincipleIRJET- Image Feature Extraction using Hough Transformation Principle
IRJET- Image Feature Extraction using Hough Transformation Principle
 
Cahall Final Intern Presentation
Cahall Final Intern PresentationCahall Final Intern Presentation
Cahall Final Intern Presentation
 
Object detection at night
Object detection at nightObject detection at night
Object detection at night
 
OpenCV.pdf
OpenCV.pdfOpenCV.pdf
OpenCV.pdf
 
SIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdfSIRG-BSU_3_used-important.pdf
SIRG-BSU_3_used-important.pdf
 
Image processing
Image processingImage processing
Image processing
 
1 [Autosaved].pptx
1 [Autosaved].pptx1 [Autosaved].pptx
1 [Autosaved].pptx
 
Convolutional neural network
Convolutional neural networkConvolutional neural network
Convolutional neural network
 
L0816166
L0816166L0816166
L0816166
 
Computer Vision: Visual Extent of an Object
Computer Vision: Visual Extent of an ObjectComputer Vision: Visual Extent of an Object
Computer Vision: Visual Extent of an Object
 
People counting in low density video sequences2
People counting in low density video sequences2People counting in low density video sequences2
People counting in low density video sequences2
 
IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...
IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...
IRJET- Extract Circular Object by Tracing Region Boundary and using Circulari...
 
06 image features
06 image features06 image features
06 image features
 
00463517b1e90c1e63000000
00463517b1e90c1e6300000000463517b1e90c1e63000000
00463517b1e90c1e63000000
 
Handwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPTHandwritten Digit Recognition(Convolutional Neural Network) PPT
Handwritten Digit Recognition(Convolutional Neural Network) PPT
 
IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...
IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...
IRJET- Extract Circular Object By Tracing Region Boundary and using Circulari...
 
Implementation of high performance feature extraction method using oriented f...
Implementation of high performance feature extraction method using oriented f...Implementation of high performance feature extraction method using oriented f...
Implementation of high performance feature extraction method using oriented f...
 
Chap_1_Digital_Image_Fundamentals_DD (2).pdf
Chap_1_Digital_Image_Fundamentals_DD (2).pdfChap_1_Digital_Image_Fundamentals_DD (2).pdf
Chap_1_Digital_Image_Fundamentals_DD (2).pdf
 
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
Convolutional Neural Network - CNN | How CNN Works | Deep Learning Course | S...
 

Recently uploaded

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)Suman Mia
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 

Recently uploaded (20)

main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)Software Development Life Cycle By  Team Orange (Dept. of Pharmacy)
Software Development Life Cycle By Team Orange (Dept. of Pharmacy)
 
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINEDJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
DJARUM4D - SLOT GACOR ONLINE | SLOT DEMO ONLINE
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 

Machine Perception with cognition

  • 1. 18ECE340T- MACHINE PERCEPTION WITH COGNITION UNIT-2 Topics Covered: Binary Image Analysis, Connectedness, Object labeling and counting and Size filtering Reference Book Computer and Machine Vision by E.R.Davies Prepared by Dr. S.UMA MAHESWARI, Assistant Professor/ ECE
  • 3. •While binary images contain much less information than their grayscale counterparts, they embody shape and size information that is highly relevant for object recognition. •However, this information resides in a digital lattice of pixels, and this results in intricacies appearing in the geometry. Binary Images Examples of Binary Images
  • 4. 4 • consists of a set of image analysis operations that are used to produce or process binary images, usually images of 0’s and 1’s. 0 represents the background 1 represents the foreground 00010010001000 00011110001000 00010010001000 Binary Image Analysis
  • 5. 5 • Some practical applications are • part inspection • riveting • fish counting • document processing Binary Image Analysis
  • 6. 6  Separate objects from background and from one another  Aggregate pixels for each object  Compute features for each object What kinds of operations?
  • 7. 7 • Many blood cells are separate objects • Salt and pepper noise from thresholding Example: red blood cell image
  • 8. 8 • 63 separate objects detected • Single cells have area about 50 • Noise spots • Gobs of cells Results Analysis
  • 9. 9 1. Thresholding a gray-tone image 2. Determining good thresholds 3. Connected components analysis 4. Binary mathematical morphology 5. All sorts of feature extractors (area, centroid, circularity, …) Useful Operations
  • 10. 10 • Background is black • Healthy cherry is bright • Bruise is medium dark • Histogram shows two cherry regions (black background has been removed) gray-tone values pixel counts 0 256 Thresholding
  • 11. 11 original gray tone image binary thresholded image Thresholding Example
  • 13. •Consider the colored shapes as foreground objects on a white background. CONNECTEDNESS IN BINARY IMAGES
  • 14. After Thersholding CONNECTEDNESS IN BINARY IMAGES • Here, we created a mask that only highlights the parts of the image that we find interesting, the objects. • All objects have pixel value of True while the background pixels are False. • By looking at the mask image, one can count the objects that are present in the image.
  • 15. 15 Once you have a binary image, you can identify and then analyze each connected set of pixels. The connected components operation takes in a binary image and produces a labeled image in which each pixel has the integer label of either the background (0) or a component. binary image after morphology connected components Connected Components Labeling
  • 16. 16 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1 0 0 0 1 1 1 1 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 1 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 0 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 Original Binary Image Connected Components Labeling
  • 17. 17 0 0 0 1 1 1 0 0 0 0 2 2 2 2 0 0 0 0 3 0 0 0 1 1 1 1 0 0 0 2 2 2 2 0 0 0 3 3 0 0 0 1 1 1 1 1 0 0 2 2 2 2 0 0 3 3 3 0 0 0 1 1 1 1 1 1 0 2 2 2 2 0 0 3 3 3 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 3 3 3 0 0 0 1 1 1 1 1 1 1 1 1 1 1 0 0 3 3 3 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 1 1 1 1 0 0 0 0 0 1 1 1 1 1 The Labeling Process 1  2 1  3 Equivalent Labels
  • 18. Pixel Neighbhourhood • In order to decide which pixels belong to the same object, one can exploit their neighbourhood: pixels that are directly next to each other and belong to the foreground class can be considered to belong to the same object. • Let’s consider the following mask “image” with 8 rows, and 8 columns. Note that for brevity, 0 is used to represent False (background) and 1 to represent True (foreground). 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 • The pixels are organized in a rectangular grid. In order to understand pixel neighborhoods
  • 20. OBJECT LABELING AND COUNTING • Labeling may be achieved by scanning the image sequentially until a 1 is encountered on the first object; a note is then made of the scanning position, and a “propagation” routine is initiated to label the whole of the object with a 1. • since the original image space is already in use, a separate image space has to be allocated for labeling. • Next, the scan is resumed, ignoring all points already labeled, until another object is found; this is labeled with a 2 in the separate image space. • This procedure is continued until the whole image has been scanned and all the objects have been labeled A process in which all binary objects are labeled
  • 21. ALGORITHM FOR OBJECT LABELING • the for forward scan over image do {…..} notation denotes a sequential forward raster scan over the image.
  • 22. ALGORITHM FOR OBJECT LABELING • Object counting and labeling routine requires a minimum of 2N+1 passes over the image space, and in practice the number will be closer to NW/2, where W is the average width of the objects. • Hence, the algorithm is inherently rather inefficient. • This prompts us to consider how the number of passes over the image could be reduced to save computation. • One possibility would be to scan forward through the image, propagating new labels through objects as they are discovered.
  • 23. A Simple Algorithm for Object Labeling
  • 24. Labeling U-shaped objects • The least computationally intensive procedures for propagation involve a different approach: objects and parts of objects are labeled on a single sequential pass through the image, at the same time noting which labels coexist on objects. • Then the labels are sorted separately, in a stage of abstract information processing, to determine how the initially rather ad hoc labels should be interpreted. • Finally, the objects are relabeled appropriately in a second pass over the image.
  • 25. Improved Algorithm for Object Labeling Clearly this algorithm with its single sequential scan is intrinsically far more efficient than the previous one
  • 26. Improved Algorithm for Object Labeling • The improved above algorithms permit the areas and perimeters of objects to be determined: thus, objects may be labeled by their areas or perimeters instead of by numbers representing their order of appearance in the image. • More important, the availability of propagation routines means that objects can be considered in turn in their entirety—if necessary by transferring them individually to separate image spaces or storage areas ready for unencumbered independent analysis. • Evidently, if objects appear in individual binary spaces, maximum and minimum spatial coordinates are trivially measurable, centroids can readily be found and more detailed calculations of moments and other parameters can easily be undertaken.
  • 27. 3.1 Solving the Labeling Problem in a More Complex Case
  • 28. Solving the Labeling Problem in a More Complex Case • Sequential labeling has been carried out in line with the improved algorithm. • However, one variation has been adopted—of using a minimum rather than a maximum labeling convention, so that the values are in general slightly closer to the eventual ideal labels. Fig 9.3
  • 29. Step 1 • However, the whole process of calculating ideal labels can be made more efficient by inserting numbers instead of ticks, and also adding the right numbers along the leading diagonal
  • 30. Step 2 The next step is to minimize the entries along the individual rows of the table
  • 31. Step 3 Then we minimize along the individual columns
  • 32. Step 4 Then we minimize along rows again
  • 34. Size Filtering • The 8- connected and 4-connected definitions of connectedness lead to the following measures of distance (or “metrics”) that apply to pairs of pixels, labeled i and j, in a digital lattice: • While the use of the d4 and d8 metrics is bound to lead to certain inaccuracies, there is a need to see what can be achieved with the use of local operations in binary images.
  • 35. Size Filtering • The basic idea is that small objects may be eliminated by applying a series of shrink operations. • In N shrink operations will eliminate an object (or those parts of an object) that are 2N or fewer pixels across their narrowest dimension. • This process shrinks all the objects in the image, but in principle a subsequent N expand operations will restore the larger objects to their former size.
  • 36. Algorithm for Recovering Original Forms of Shrunken Objects
  • 37. Explanation • Whole (connected) objects can be removed that are everywhere narrower than a specified width, it is possible to devise algorithms for removing any subset of objects that are characterized by a given range of widths: large objects may be filtered out by first removing lesser- sized objects and then performing a logical masking operation with the original image, while intermediate size objects may be filtered out by removing a larger subset and then restoring small objects that have previously been stored in a separate image space. • Finally, note that expand operations followed by shrink operations may be useful for joining nearby objects, filling in holes, and so on. • Numerous refinements and additions to these simple techniques are possible.
  • 38. Separation of touching objects by shrink operations. Figure Shown is the objects (chocolates) in (a) are shrunk and (b) in order to separate them so that they may be counted reliably.