Lab 11
Lab 11
Lab
CEL-445
Lab Journal 11
In this lab we will learn about binary-image operations with hit and trial can be helpful in separating
out the text and graphics and classifying a range of similar graphics as a single class. We will know
about segment graphics and text in a document and to find if it is possible to classify a range of
similar graphics into one class.
Tools:
Jupyter Notebook (Anaconda)
Introduction:
Image Segmentation
Image segmentation is a key building block of computer vision technologies and algorithms. It is used
for many practical applications including medical image analysis, computer vision for autonomous
vehicles, face recognition and detection, video surveillance, and satellite image analysis.
A common use of image segmentation is in object detection. Instead of processing the entire image, a
common practice is to first use an image segmentation algorithm to find objects of interest in the
image. Then, the object detector can operate on a bounding box already defined by the segmentation
algorithm. This prevents the detector from processing the entire image, improving accuracy and
reducing inference time.
Tasks
Task:1
Read the image ‘Paper.jpg’. Write a program to determine the width and eight of connected
components in the image and based on that identify if it is possible to segment text and graphics,
and how? Draw a bounding box on all components identified as graphics as illustrated in Figure 1
Solution:
Output:
Task:2
Read the image ‘objects.png’ (provided in the LAB). Write a program to apply following operations:
• Binarize the image
• If objects are not well segmented, apply morphological operators to merge the broken objects.
• Extract each row of the image into another image. The smaller image will have different shapes of
the same object.
• Label each image and get width and height of each of the labeled components.
• Plot width and height of each component and state your findings ‘is it possible to identify classes
of objects based on these features?’
• Compute the aspect ratio (AR) and area of each object and plot the objects in AR/Area space. State
your findings on these features.
• Sample output in the width-height space is illustrated in Figure 2.
Solution:
Code:
Output:
Conclusion:
In this lab we have learned about applying different Image segmentation techniques
and came to know about segmentation using clustering and region growing, and we learned
about Image segmentation applications.
We came to know about primitive binary-image operations with hit and trial can be
helpful in separating out the text and graphics and classifying a range of similar graphics as a
single class. We came to know about segment graphics and text in a document and to find if
it is possible to classify a range of similar graphics into one class. This lab was very helpful
regarding segmentation using clustering and region growing as it involved new concepts and
implementation.
----------------------------------------------------------------------------------