Ijaeast 0013052024

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

ISSN: 2583-7346

DOI https://doi-ds.org/doilink/05.2024-91224819/IJAEAST.2024.05.0001, May 2024, Volume-2, Issue-5, pp.144 - 147


International Journal of Advances in Engineering Architecture Science and Technology

Evaluation of Different Kernels for Spatial Filtering Techniques


Under Image Processing
Neha Sharma
Assistant Professor, Department of CSE, SRMSCET, Bareilly, Uttar Pradesh, India
[email protected]
Received: 21-03-2024 Accepted: 10-05-2024 Published: 11-05-2024
Abstract
Background: Digital Image Processing is one of the most emerging techniques that are widely
expanding and evolving. It is a process of converting an image in to a digital format and
performing various operations on it, such as enhancing the image or extracting valuable features
out of it.
Objectives: The main motive of image processing and analysis is to use kernels for sharpening
and smoothing of a digital image for getting better results.
Methods: A filter can be characterized as a kernel, which can be defined as a small array applied
to every pixel and on their adjacent neighbours in the given image. The image filtering algorithm
provides us with smoothness and better resolution from the noisy version. Here, in this paper we
have briefly explained about the image filtering.
Statistical Analysis: Digital image processing in this paper is done by using open cv with the help
of python language and jupyter notebook is used as a tool evaluate the whole process.
Findings: Image filtering is a technique for altering the size, shape, colour, depth, smoothness,
and other image properties. The final outcomes that are shown here includes processed images as
harped images, smooth images, edge detected images etc.
Applications: Image filtering is one of the fascinating applications of image processing. Filtering
is a versatile method that is used in many ways and in a wide range of engineering and scientific
problems, including signal processing, electronic, physics, chemistry, and image
analysis/processing.
Improvements: In future the same work can be carried forward and can be applied in different
domain to get processed images and used for further research work.
Keywords: Sharpening, Smoothing, Kernel, Filtering.
1. Introduction
The conversion of an image into a digital format uses a series of operations and the process to
extract relevant data out of it is known as image processing. The fundamental steps in image
processing include image acquisition, enhancement, restoration, colour processing, wavelets and
multi resolution processing, compression, morphological processing, segmentation,
representation and description, and recognition. Image acquisition is the first step, followed by
enhancement to highlight features of interest. Restoration uses mathematical or probabilistic
models to improve image appearance. Colour processing includes various techniques for digital
colour modelling. Wavelets are used for data compression and pyramidal representation.
Compression reduces storage or bandwidth requirements. Morphological processing morphs
images based on their shapes. Segmentation partitions images into constituent parts or objects.
Representation and description prepare segmented regions for further computer processing.
Recognition assigns labels to objects based on their descriptions. In image processing, filters are

www.ijaeast.com The Palm Series Impact Factor: 4.67 144


ISSN: 2583-7346
DOI https://doi-ds.org/doilink/05.2024-91224819/IJAEAST.2024.05.0001, May 2024, Volume-2, Issue-5, pp.144 - 147
International Journal of Advances in Engineering Architecture Science and Technology

used for sharpening and smoothing such as- Spatial filtering, when implementing the Spatial
Filtering technique on an image, a mask is typically applied with a specific centre pixel [2], and
it is often resized for optimal usage. The mask is then shifted across all pixels in the image so that
the centre of the mask covers each pixel in turn.
There are two types of spatial filtering:
➢ Smoothing Spatial Filter: The Smoothing Spatial Filter is a useful tool in image editing
that helps to blur and reduce noise [1]. Blurring [3] is applied to eliminate small details,
while noise reduction is achieved through blurring. It is further divided into various filters
which are linear filter [1], averaging filter, weighted averaging filter, median filter,
maximum filter etc.
➢ Sharpening Spatial Filter: This type of filter is used to enhance the details and edges in
an image, making it appear sharper and more defined. It is further divided into two filters
which are Laplacian filter and unsharp mask filter.

2. Proposed Work
Here in this research work we are evaluating different kernels effects on same digital image that
also known as image enhancement, for this jupyter notebook is used where the image can be
imported and with the help of open cv, image can be read and displayed, python is also used here.
For this evaluation different kernels with different mask are used and their evaluation is done. For
convolving the filter with image filter2D() function is used in OpenCV with python the syntax is
as:

Figure 1. Snap Shot of Applying filter2D() Function for Convolution


➢ OpenCV: OpenCV, which stands for Open-Source Computer Vision Library, is an open-
source computer vision and machine learning software library designed to facilitate
computer vision tasks and image processing.
➢ Python: Python is a high-level, versatile programming language known for its simplicity
and readability. Widely used in diverse fields, Python is ideal for web development, data
analysis, artificial intelligence, scientific computing, and more.
➢ Kernel: A "kernel" in digital image processing is a small matrix used for operations like
filtering and convolution. It plays a crucial role in tasks such as blurring, sharpening, and
edge detection, enhancing and extracting features in images. Different kernels yield
various effects, making them fundamental for image manipulation and enhancement.

3. Applications
Kernels can serve various purposes, such as:
➢ Blurring: Kernels with equal values are used to reduce noise and create a smooth effect.
➢ Sharpening: Kernels designed to enhance edges and fine details make images appear
sharper.

www.ijaeast.com The Palm Series Impact Factor: 4.67 145


ISSN: 2583-7346
DOI https://doi-ds.org/doilink/05.2024-91224819/IJAEAST.2024.05.0001, May 2024, Volume-2, Issue-5, pp.144 - 147
International Journal of Advances in Engineering Architecture Science and Technology

➢ Edge Detection: Specialized kernels are employed to identify edges or boundaries


between objects.

4. Methodology
To understand the methodology of this research paper a flow chart is shown below with displaying
the simplest steps to go through step wise procedures. First of all, the image is imported in jupyter
notebook and then with the help of open cv “imread” command it is read, now the python tool is
all set to apply different methods on that digital image. For this research work different kernels is
applied on the imported image and results are saved for evaluation to see how different mask of
kernels effect the original image and how it is used for further work.

Figure 2. Digital Image Enhancement Process Using OpenCV

5. Result
Results and their evaluation are mentioned below with the help of snap shots of work, a table is
mentioned below which consist images of results then their kernel is mentioned and then
evaluation description is mentioned.

Table 1. Evaluation Table of Different Results of Image Enhancement Using Different


Kernels
Kernel Enhanced
Result Original Image Evaluations
(convolved onto Image
No. (input) (Description)
image) (output)

[-1,-1,-1],
1. [-1,9,-1], Sharpened Image
[-1,-1,-1]

www.ijaeast.com The Palm Series Impact Factor: 4.67 146


ISSN: 2583-7346
DOI https://doi-ds.org/doilink/05.2024-91224819/IJAEAST.2024.05.0001, May 2024, Volume-2, Issue-5, pp.144 - 147
International Journal of Advances in Engineering Architecture Science and Technology

[0,-1,0],
2. [-1,5,-1], Brightened Image
[0,-1,0]

[1,1,1],
3. [1,1,1], Blurred Image
[1,1,1]

[-1,-1,-1],
4. [-1,8,-1], Edge Detection
[-1,-1,-1]

In this we take original image as a input on that we apply kernel with size [-1,-1,-1], [-1,9,-1], [-
1,-1,-1] then it gives a sharpened image. Then we apply kernel with size [0,-1,0], [-1,5,-1], [0,-
1,0] which is increasing the center pixel value after 3X3 mask convolution with image therefore
we get more bright image. After that, kernel with size [-1,-1,-1], [-1,8,-1], [-1,-1,-1] is applied in
which the centre value of each 3X3 mask is decreased by one due to which we get the edge
detected. After this, apply kernel on original image with size [1,1,1], [1,1,1], [1,1,1] to get the
blurred image.

6. Conclusion
Analysing a digital image using various spatial filtering techniques in image processing allows us
to enhance or extract specific features from the image. These techniques are essential for various
applications, including image enhancement, noise reduction, edge detection, and object
recognition.

References
1. Bhishman Desai, Manish Paliwal and Kapil Kumar Nagwanshi, “Study on Image Filtering –
Techniques, Algorithm and Applications”, “arXiv:2207.06481v1 [cs.CV]”,4 Jun 2022.
2. Dongping Wang, Tiegang Gao, and Yuan Zhang, “Image Sharpening Detection Based on
Difference Sets”, “IEEE Access”, 2020, Digital Object Identifier,
10.1109/ACCESS.2020.2980774.
3. Mirpouya Mirmozaffari, “Filtering in Image Processing”, “ENG Transactions”, 2020, hal-
03213844.
4. P. Janani, J. Premaladha and K. S. Ravichandran, Image Enhancement Techniques: A Study,
Indian Journal of Science and Technology, vol 8(22), September 2015
5. Sargu, Shashi B., Rana, A Review of Medical Image Enhancement Techniques for Image,
International Journal of Current Engineering and Technology, Vol.5, No.2, pages 1282-1286,
April 2015.

www.ijaeast.com The Palm Series Impact Factor: 4.67 147

You might also like