Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
30 views6 pages

SWE1010

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)
30 views6 pages

SWE1010

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/ 6

SWE1010 – DIGITAL IMAGE PROCESSING

Digital Assignment – 02

A Report

By

Sreevallabh 22MIS1170
1. Exploration of Image Processing
Techniques Using OpenCV

This report provides an analysis of image processing techniques using


two widely used Python libraries: Pillow and Mahotas. The objective
is to explore their effectiveness in tackling the challenges of multiple
object detection, with a particular focus on addressing issues like size
invariance and occlusion.
Pillow (Python Imaging Library) is a user-friendly tool designed for
basic image processing tasks. It offers a range of capabilities such as
image enhancement, filtering, and transformation, making it an
accessible choice for beginners and for tasks requiring quick image
manipulation. Despite its simplicity, Pillow is highly effective for
small-scale image processing tasks where speed and ease of use are
priorities.
Mahotas, on the other hand, is an optimized library that excels in
morphological operations, feature extraction, and image
segmentation. Known for its performance and speed, Mahotas is
designed for more complex image processing applications. It provides
a robust set of tools for operations such as noise removal, dilation,
erosion, and edge detection, making it particularly suitable for tasks
involving multiple object detection.
In this report, both Mahotas and Pillow were applied to a sample
image with the goal of assessing their performance in image
enhancement and detection of multiple objects. Various pre-
processing and post-processing techniques were used to evaluate
their handling of size invariance and occlusion challenges.
The following sections offer an in-depth evaluation of both libraries,
highlighting their strengths and limitations when applied to complex
image processing tasks.
2. RESULTS: MAHOTAS

Input Image Sharp Image Bright Image

Smoothed Image Eroded Image Dilated Image

Edges Image
2B. RESULTS: PILLOW
3. Discussion

The Pillow-based approach involved a series of simple yet effective


image processing techniques. First, the image was loaded and
enhanced using the sharpness filter to improve the visibility of finer
details. This sharpening made object boundaries more distinct,
facilitating easier detection. Following this, a median filter was
applied to reduce noise, helping to clean the image from minor
artifacts that might obstruct object detection.

To address the morphological aspect, the edge enhancement filter


was used to highlight object edges, akin to basic dilation. While these
operations improved the overall quality of the image, Pillow’s limited
morphological capabilities restricted its ability to handle more
complex tasks like addressing size invariance or occlusion. The
library's simplicity makes it suitable for quick, light-weight operations
but highlights its limitations when applied to more advanced
scenarios involving overlapping objects or varying object sizes.

Mahotas, in contrast, provided a more comprehensive suite of tools,


particularly excelling in advanced morphological operations. After
converting the image to grayscale, Gaussian smoothing was applied
to reduce noise. Mahotas' dilation and erosion functions were then
used to refine object boundaries, removing smaller artifacts and
noise while emphasizing larger objects.

Although Mahotas handled noise and object boundary refinement


effectively, challenges remained in tackling occlusion and size
invariance. The library performed well in detecting distinct objects
but struggled when objects overlapped or varied significantly in size.
Despite these limitations, Mahotas' advanced morphological
operations make it a more powerful option for handling complex
image processing tasks when compared to Pillow.
4. Results
The exploration of Pillow and Mahotas provided key insights into
their capabilities:
Pillow Results:
1. Sharpness Enhancement:
o Improved object boundaries but with limited control.
2. Noise Removal:
o Reduced minor artifacts, but basic filtering.
3. Edge Enhancement:
o Highlighted object edges but lacked advanced
morphological capabilities.
Mahotas Results:
1. Grayscale Conversion & Smoothing:
o Simplified and clarified the image.
2. Morphological Operations:
o Enhanced object boundaries and reduced noise effectively
but struggled with overlapping objects and varying sizes.
While both tools improved image clarity, Mahotas was more effective
for advanced object refinement, though challenges with size
invariance and occlusion persisted in both cases.

You might also like