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

Analysis of Image Quality Using Sobel Filter

Uploaded by

sinchana G S
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)
123 views6 pages

Analysis of Image Quality Using Sobel Filter

Uploaded by

sinchana G S
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

International Conference on Inventive Systems and Control (ICISC 2019)

IEEE Xplore Part Number: CFP19J06-ART; ISBN: 978-1-5386-3950-4

Analysis of Image Quality using Sobel Filter


Chethan K S Sinchana G S
Dept. of ECE, PES University, Bangalore, India Dept. of ECE, GEC, Kushalnagar, India
[email protected] [email protected]

Dr. Nataraj K R Dr. Choodarathnakara A L


Dept. of ECE, SJBIT, Bangalore, India Dept. of ECE, GEC, Kushalnagar, India
[email protected] [email protected]

Abstract—Filters can be used to assign new value to a pixel by The integration between image processing, voice and data
making use of the local neighbors. This will reduce the noise by are main core for video. The field of Electronic Imaging
smoothing operation by retaining the edges. The method of edge includes; image capture, image rendering, image compression,
detection is to study the changes in image pixels using the media capture, digitize display process digital video, real-time
variations of the edge neighboring pixels. In computing changes MPEG encoder, print quality enhancement, feature extraction
in these pixel values, selection of the proper window size is and the use of image processing techniques in remote sensing
essential. In this paper, an attempt is made to implement Sobel are a notable area of research. The integration between image
filtering technique over Landsat 7 ETM+ satellite data product in processing field and communication field will provide high
order to analyze the impact of bandwidth. The recommendation
performance and quality of service. Results from this area
of window is performed based on the analysis of statistics which
best enhances the image while preserving the edges. For satellite
impact how we communicate with cellular phones, faxes,
image with spatial resolution around 30m, window size 3X3 for internet, intelligent highways and electronic commerce.
SD = 33.527, Mean = 63.265 and SNR = 1.887 is recommended. If Gradient operators can be applied to identify the edges or
results in blurred image, the largest window size 9x9 was boundaries. The gradient is computed by performing
recommended to obtain improvement in results. convolution between two windows and image. One window
providing the component ‘g’, of the gradient, and the other
Keywords—Edge Detection; Landsat 7 ETM+; Bandwidth;
giving the ‘y’ component ‘g’. This process can be
Sobel Filter.
mathematically expressed as: g[x(i,j)] = mask*f(i,j), and
g[y(i,j)] = mask*f(i,j). The design of the filter in this paper
I. INTRODUCTION utilizes the above representation using the Sobel operator [2].
Filtering is a usual process in spatial domain to attain The image is convolved with the 3 x 3 mask to measure the
enhancement and denoising in images. Median filter can be intensity difference in vertical, horizontal, right and left
used to suppress the noise in the images. The quality of directions. The Sobel Operator [3] is a discrete type of
resulting image depends on the size of the mask. Higher the differentiator operator that can be utilized to identify the edges
size of the mask creates the blurring effect. Filters can be by using gradient realization. At each pixel location in an
either linear or nonlinear. Edges always has an important role image, the resultant of Sobel operator corresponds to the
to play in the field of image enhancement, recognition, gradient vector or normal to this vector. This operator
morphing, registration, compression, etc. Detection of edges calculates the gradient of image intensity at each point,
aims at identifying the sudden changes in the gray level values realizing the direction of variation in the intensity and the
in an image. In the ideal case, edges are the connected set of direction. First order partial differentiation is used by Sobel
points. However, edges extracted from non-trivial images are operator .
often hampered because of fragmentation and also by false
 = mag () = [Gx2 + Gy2]1/2 (1)
edges. This increases the complication in interpretation of
correct edges. Sobel algorithm [4], [5] uses the first order differential.
This method combines local average and partial differential. It
To analyze the quality of identification of edges there is no
is multi-directional differential operator. The partial derivative
proper performance index. It is usually done subjectively
for f (x, y ) is given as [6],
based on the application. In general, the edge detection process
involves three stages; noise reduction, high-pass filter and edge
localization. Noise is identified as sudden change in gray level
and hence reduction of noise is must to avoid false edges. The (2)
edges are identified as high frequency components in an image
and hence high-pass filter suits well to identify the edges in an
image. Finally, the edge localization is a process of identifying
genuine edges. (3)

978-1-5386-3950-4/19/$31.00 ©2019 IEEE 526


International Conference on Inventive Systems and Control (ICISC 2019)
IEEE Xplore Part Number: CFP19J06-ART; ISBN: 978-1-5386-3950-4

The equations 2, 3 realizes the weighted sum of the Intensity variation of Sobel operators, E(H), E(V), E(DL)
neighborhood of f (x, y). From these equations, it can be and E(DR) are realized as per the equations represented below:
identified that the gradient of f (x, y) increases along the way
of the largest change rate. Sobel operator provides certain Horizontal: E(H ) (a0 + 2a1 + a2) - (a4 + 2a5 + a6) (5)
amount of smoothing effect that avoids edges, but, because of Vertical : E(V ) (a2 + 2a3 + a4) -(a0 + 2a7 + a6) (6)
local averaging, many a times it may lead to false edges. If the
requirement is not much about the accuracy, then this is the Left diagonal : E(DL) (a1+ 2a2+a3) - (a7 + 2a6 + a5) (7)
best selection. Sobel uses two masks, one for horizontal and Right-diagonal:E(DR)(a1 + 2a0 + a7) - (a3 + 2a4 + a5) (8)
one for vertical. Fig. 1 represents the Sobel masks [7].

The gradient magnitude is given below:


(9)

In several cases, calculation of the term K depends on type


of the applications. Optimizations are done mathematically
using fully merged arithmetic [13]. This allows to simplify the
Fig. 1. The Sobel operators
overall architecture of Sobel operator implementation. Sobel
operator depends on central differences, but provides weights
The above masks are applied to image in 𝑥 direction Gx and
to the pixels while averaging. The partial derivate of the Sobel
also in 𝑦 direction Gy. The gradient of an image (𝑥,) at location
operator is calculated as,
(𝑥,𝑦) is defined as the vector. Where, Gx is partial derivative of
𝑓 along 𝑥 direction and Gy is partial derivative of 𝑓 along the 𝑦 Gx = (a2 + 2a2 + a4) – (a0 + 2a7 + a6) (10)
direction. Calculation of magnitude uses the squaring the Gx
and Gy , add them and apply the square root [8]. The Gy = (a6 + 2a5 + a4) – (a0 + 2a1 + a2) (11)
magnitude includes the information about the strength of edge
at the location (𝑥,) but the details about the direction of edge is
not available [9], [10]. In order to locate the direction, the In the mask format, the Sobel is represented as,
following realization can be used. Gx = (-1 -2 -1; 0 0 0; 1 2 1) (12)
Gy = (-1 0 1; -2 0 2; -1 0 1) (13)
 (x,y) = tan (Gy/Gx)
-1
(4)
This paper is organized as follows: Section II provides the
where, 𝛼(𝑥,𝑦) is the direction angle. Most of the Sobel study area and satellite data products used in this study. In
operator implementation are of software and only few are section III the proposed methodology was described. In
hardware. Kanopoulos et al. in [11] defined a hardware base section IV the experimental results are presented to analyze
Sobel operator for image. The design was complicated and has the impact of bandwidth for different standard deviation.
irregular structures. Sobel processor described in [12] was Section V presents some concluding remarks.
interesting and clear implementations, and was used as a
model. II. STUDY AREA AND DATA PRODUCTS
For the purpose of study, Mysore, Karnataka region is
considered. The city is situated located 12.30°N 74.65°E with
an altitude of approximately 770meters. It 146km from the
capital city of Karnataka (i.e., Bengaluru). The area of Mysore
is 128.42 km2. Mysore shares close border with neighboring
states such as Tamilnadu and Kerala. The city consists of
several lakes, that includes Karanji, Kukkarahalli and
Fig. 2. Representation of Sobel edge detection kernels Lingambudi. It has Krishna raja Sagara (KRS) dam in the
nearby place and also has flow of river also. As per the survey
done in the year 2001, the city was having 39.9% residential
area, road covered 16.1%, 13.74% contributed for parks and
open spaces, an industrial area of about 13.48%, 8.96% public
Fig. 2. The Sobel operators property, commercial area of 3.02%, 2.27% agricultural region
and a 2.02% of water shaded area. As per the national census
of India 2011, the population of the city is 8,87,446.

978-1-5386-3950-4/19/$31.00 ©2019 IEEE 527


International Conference on Inventive Systems and Control (ICISC 2019)
IEEE Xplore Part Number: CFP19J06-ART; ISBN: 978-1-5386-3950-4

TABLE III. COMPUTING SYSTEM SPECIFICATIONS UTILIZED

Hardware and
Specification
Software Used
System Intel Core i3
Operating System Windows 8
RAM 4 GB
Hard Disk Space 1 TB
Super VGA 800×600×256 colors
Display (1024×768×64K colors
recommended)
Microsoft Windows compatible CD-
Install Media
ROM drive
Microsoft Windows compatible
Mouse
mouse
Parallel Port Centronics Parallel Port

Fig. 3. Google Earth Snapshot of Mysore Study Area


III. METHODOLOGY
The methodology proposed is as shown in Fig. 4 to assess
Table I indicates the details of the satellite image data the impact of bandwidth on satellite image using Sobel filter.
products for Mysore study area considered in this paper. All During the first phase of the experiment, the data was
the Landsat 7 ETM + data used in this work is downloaded procured and preprocessed. Sobel filter was applied with
from the USGS web (http://glovis.usgs.gov). Table II varying window sizes 3x3, 5x5, 7x7, 9x9 respectively.
indicates the ETM+ bands used with specific ground features. Finally, proper window size is selected based on statistical
Table III tabulates the computing requirements for the analysis viz Mean, SD and SNR.
experimentation.

TABLE I. DETAILS OF SATELLITE DATA PRODUCT FOR MYSORE STUDY AREA START

RAW LANDSAT 7
ETM + IMAGE

SOBEL FILTER WITH


VARYING WINDOW SIZES

STATISTICAL ANALYSIS

SELECTING PROPER
TABLE II. LANDSAT 7 ETM+ BANDS USED WITH GROUND FEATURES WINDOW SIZE WITH STD
DEVIATION

Ground feature Bands Used


Water 1,2,3; 1,2,4; 1,4,5
END
Urban 1,2,3; 1,4,5
Farmland 1,2,3; 1,4,5
Fig. 4. Methodology to Assess the Impact of Bandwidth using Sobel Filter
Forest 1,2,3; 1,4,5
Salt scald 1,2,3
Scrub 1,4,5
Vegetation 1,4,7

978-1-5386-3950-4/19/$31.00 ©2019 IEEE 528


International Conference on Inventive Systems and Control (ICISC 2019)
IEEE Xplore Part Number: CFP19J06-ART; ISBN: 978-1-5386-3950-4

IV. RESULT ANALYSIS

A. Matlab Window for Sobel Filter

Fig. 8. 3x3 Size Window with Vertical edges

Fig. 5. Sobel code for edge detection using MATLAB

Fig. 9. 3x3 Size Window with Horizontal edges

Fig. 6. Landsat 7 ETM+ Image

Fig. 10. 3x3 Size Window with Combined edges

Fig. 6 and Fig. 7 depict the Landsat 7 ETM+ Image and


Fig. 7. Gray scale conversion of Landsat 7 ETM+ Image conversion of Landsat 7 ETM+ Image into gray scale image
considered during this experiment.
Fig. 5 shows Sobel code in MATLAB for edge detection
using Sobel operator, which was written for analyzing various Fig. 8, Fig. 9 and Fig. 10 shows the Sobel filter responses
bandwidths such as 3 x 3, 5 x 5, 7 x 7, 9 x 9. for 3x3 size window with vertical image, horizontal image and
combined image respectively. This size window produces
mean value of 63.265, standard deviation of 33.527 and SNR
value of 1.887.

978-1-5386-3950-4/19/$31.00 ©2019 IEEE 529


International Conference on Inventive Systems and Control (ICISC 2019)
IEEE Xplore Part Number: CFP19J06-ART; ISBN: 978-1-5386-3950-4

Fig. 11, Fig. 12 and Fig. 13 shows the Sobel filter Fig. 14, Fig. 15 and Fig. 16 shows the Sobel filter
responses for 5 x 5size window with vertical image, horizontal responses for 7 x 7size window with vertical image, horizontal
image and combined image respectively. This size window image and combined image respectively. This size window
produces mean value of 48.159, standard deviation of 34.609 produces mean value of 44.522, standard deviation of 32.096
and SNR value of 1.392. and SNR value of 1.387.

Fig. 11. 5x5 Size Window with Vertical edges Fig. 14. 7x7 Size Window with Vertical edges

Fig. 12. 5x5 Size Window with Horizontal edges Fig. 15. 7x7 Size Window with Horizontal edges

Fig. 13. 5x5 Size Window with Combined edges Fig. 16. 7x7 Size Window with Combined edges

978-1-5386-3950-4/19/$31.00 ©2019 IEEE 530


International Conference on Inventive Systems and Control (ICISC 2019)
IEEE Xplore Part Number: CFP19J06-ART; ISBN: 978-1-5386-3950-4

Fig. 17, Fig. 18 and Fig. 19 shows the Sobel filter TABLE IV. STATISTICAL MEASURES OF SOBEL FILTER WITH SIZE & SD
responses for 9 x 9 size window with vertical image, Filter
horizontal image and combined image respectively. This size Standard
Window Min Max Mean SNR
Deviation
window produces mean value of 43.098, standard deviation of Size
32.633 and SNR value of 1.321. Original
0 255 146.928 67.332 2.182
Image
Grayscale 3x3 0 255 146.928 67.332 2.182
Edge
3x3 0 255 63.265 33.527 1.887
Detection
Edge
5x5 0 255 48.159 34.609 1.392
Detection
Edge
7x7 0 255 44.522 32.096 1.387
Detection
Edge
9x9 0 255 43.098 32.633 1.321
Detection

V. CONCLUSION
The recommendation of window is performed based on the
statistics which best improves the quality of image while
retaining the edges. The Sobel filtering approach to preserve
the image quality of satellite image with spatial resolution
around 30m, window size 3x3 for mean value of 63.265,
Fig. 17. 9x9 Size Window with Vertical edges
standard deviation value of 33.527 and SNR value of 1.887
was recommended. Resulting in unclear image, the largest
window 9x9 was recommended to obtain finer results. The
Sobel filtering technique can be implemented further for
different satellite data products of interest. The Sobel filtering
technique can be developed in future for more than 9x9
window sizes to analyze the impact of bandwidth as well.

REFERENCES
[1] Hyder Ali, Sukanesh and Fellow "An Edge Preserving Denoising
Technique for MR Images using Curvelet Transform", Interdisciplinary
Journal, Vol. 91, pp. 3-8, May 2010.
[2] W. K. Pratt, “Digital Image Processing”, New York, NY: Wiley, 1978.
[3] T. A. Abbasi and M. U. Abbasi, “A Novel FPGA based Architecture for
Sobel Edge Detection Operator”, International Journal of Electronics,
Taylor and Francis, pp. 889–896, 2007.
[4] Kanopoulos, N. Vasanthavada and L. Robert Baker, “Design of an
Image Edge Detection Filter using Sobel Operator”, IEEE Journal of
Solid State Circuits, Vol. 23, Issue. 2, April 1988.
Fig. 18. 9x9 Size Window with Horizontal edges
[5] Caixia Deng, Weifeng Ma and Yin Yin, “An Edge Detection Approach
of Image Fusion based on Improved Sobel Operator”, IEEE Conference
Publications, Vol. 3, pp. 1189-1193, 2011.
[6] Bai Jun-jiang and HONG Chun-yong, “Edge Detect Based on Sobel”,
Computer Knowledge and Technology ISSN 1009-3044 Vol. 5, No. 21,
pp. 5847-5849, July 2009.
[7] Gonzalez, Rafael C, “Digital Image Processing”, Pearson Education
Inc., publishing as Prentice Hall, 2008.
[8] Zhengyang Guo, Wenbo Xu and Zhilei Chai, “Image Edge Detection
Based on FPGA”, IEEE, pp. 169, 2010.
[9] Prof. V. B. Baru and Chetan S. Deokar, “VLSI Implementation of Real-
time Image Segmentation”, IEEE, pp. 211, 2010.
[10] I. Yasri, N. H. Hamid and V. V. Yap, “Performance Analysis of FPGA
Based Sobel Edge Detection Operator”, IEEE, 2008.
[11] Kanopoulos N, Yasanthavada N and Baker R, “Design of an Image Edge
Detection Filter Using the Sobel Operator”, IEEE Journal of Solid State
Circuits, Vol. 23, No. 2, pp. 358-367, April 1988.
[12] Armstrong J R and Gray G F, “VHDL Design: Representation and
Synthesis”, Prentice Hall, 2000.
Fig. 19. 9x9 Size Window with Combined edges [13] Feiste K A and Swartzlander EE, “Merged Arithmetic Revisited”, IEEE
Workshop on Signal Processing Systems, SiPS 97 Design and
Implementation, Formerly VLSI Signal Processing, pp. 212-221, 1997.

978-1-5386-3950-4/19/$31.00 ©2019 IEEE 531

You might also like