You are on page 1of 7

International Journal of Advanced Science and Technology

Vol. 29, No. 4s, (2020), pp. 1471-1477

Image Restoration Using a Fuzzy-Based Median Filter and Modified Firefly


Optimization Algorithm
Narendra Kumar1# , Anil Kumar Dahiya2# Krishna Kumar 3
# Department of Information Technology, D.I.T. University , Dehradun, Uttarakhand, INDIA1
3
UJVN Ltd., Uttarakhand, India

Abstract
This paper presented an object restoration approach in which images are influenced by the salt & pepper
noise replaced by a median filter based on fuzzy logic. A Modified Firefly Optimization Algorithm (MFOA)
is used to restore the images based on the Richardson-Lucy algorithm. Denoising, as well as restoring the
image, is effectively demonstrated. Compared to current denoising filtered, PSO (Particle swarm
optimization) and Adaptive PSO methods.
Keywords: Image Denoising, Image Restoration, PSO, MFOA, APSO and Richardson-Lucy algorithm.
1. Introduction:
Denoising and photo recovery are a very important task of image processing. In many applications,
optimization is important, such as networking, chemistry, physics, and image processing, etc. Several
mathematical models were suggested to mathematicians and engineering scientists to solve the problems
of optimization. Nature-inspired algorithms can solve many complex problems of optimization. Several
scientists have suggested a number of new optimization algorithms over the past few years. Proposed
method is used to accurately and effectively obtain the Support Vector Regression (SVR) parameters. The
results obtained were contrasted with many methods already in place [1]. PSO is an algorithm that is
inspired by nature to solve many real problems. Selectively informed PSO (SIPSO), a densely connected
hub particle gets full information from all its neighbors while a non-hub particle with few connections can
only follow a single yet best performed neighbor [2]. We may divide the optimization algorithm into two
groups according to nature: deterministic algorithms and stochastic algorithms. Deterministic algorithms
obey the difficult procedure; its values of both functions and variables of layout are repeatable [3]. Hill
climbing is an example of an algorithm of determinism [4]. There is always some randomness in stochastic
algorithms in the second classes. The genetic algorithm, for example. There is a third type of algorithm that
combines deterministic algorithms as well as stochastic algorithms. For starters, climbing a hill with a
random restart is a good example. The gradient information used by some deterministic algorithms of
optimization [5] is called an algorithm based on gradients. The Newton–Raphson algorithm, for example.
Nonetheless, it does not operate well due to objective discontinuity of function. A nongradient algorithm is
used in this case. Two types of algorithms stochastic: heuristic and metaheuristic. It is possible to classify
the metaheuristic algorithms in many ways. We may describe them in terms of population and trajectory
[6]. For example, a population-based algorithm is a generic algorithm. Firefly Algorithm [7] is a naturally
inspired technique of optimization; it is inspired by fireflies ' social behavior [8].

Firefly optimization algorithm: It is a metaheuristic optimization algorithm inspired by nature [9],


suggested by Yang [10]. This algorithm is inspired by tropical fireflies ' blinking light [11]. Three idealized
rules are in place:
a. One firefly will be attracted to other fireflies irrespective of sex, as all fireflies are unisex.
b. For any two, the blinking fireflies switch toward the brighter one, the less bright one. The attraction
is proportional to the luminosity. If there is no brighter than a single firefly, they can pass randomly.
c. A firefly brightness is affected by the landscape of the objective function.

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1471
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1471-1477

We know that Light obeys the inverse square law from a particular distance ‘r’ from the source. I decrease
the light intensity [8] as the distance r increases in terms of I α 1/r^2. Light is absorbed by the air as the
distance increases [12-15]. Formulation of the flashing light so that it can be programmed in accordance
with the objective function.

2. Proposed Technique:
Image denoising (FMF) and restoration (MFOA) technique with RL is proposed for the images. This
technique is comprises of two steps (a) Noise removal by fuzzy-based median filter and (b) Image
Restoration using MFOA techniques with RL.

Fig 1. Proposed Algorithm by using FMF and MFOA


Image Denoising using Fuzzy base Median Filter:
Object image I(i, j) processed by a (FMF) and a mask is created to identify the pixels in the initial phase.
FMF denoising steps are as below.
Step 1: Create binary mask MASK(i,j):

(1)
Where, p(i,j) is the pixel at location (i,j) with intensity p.
Step 2: Adaptive filtering window with dimensions (2d+1)×(2d+1) is taken:

(2)

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1472
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1471-1477

Step 3: FR(i,j) is number of noise free pixels in the image is calculated by counting the number of 1’s in
MASK(i,j) :

(3)
Step 4: When, FR(i,j)<1, denotes window does not have a minimum number of one's.
Step 5: Repeat steps 3 and step 4 until FR(i,j)>1) is satisfied.
Step 6: A median value obtained by:

(4)
Step 7: Local information from a win(i,j) is taken by:

(5)
Step 8: Extraction of the local information.

(6)
T1 and T2 are predefined threshold values.
Step 9: Final denoised image I’(i, j):

(7)
Fitness: Every particle’s fitness value is calculated as,

(8)
3. Results and Discussion
The proposed technique is implemented on MATLAB. In the proposed method, Fuzzy-based median
filter and MFOA with RL, the sample images from the database are taken for the image denoising and
restoration process. Fig 2, is given the sample images from the server. Noise is applied and used in the
object denoising process in these server images. The images that have been added to the database are shown
in Fig. 3.

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1473
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1471-1477

Fig. 2: Sample images

Fig. 3: Noisy Image

Fig 4: Denoised result images from Fuzzy based median filter

Fig 5: Restored result images from MFOA with RL


The noise-free images are forwarded to the image recovery process in order to enhance the image quality
and restore the pixels.
4. Performance Analysis
The results of the proposed method is measured using the variance of noise as 0.02, 0.04, 0.06 and 0.08.
The performance of the proposed Fuzzy-based Median Filter is evaluated and compared to existing
denoising filters. Table 1 and Fig.6 shows the performance results. The second stage uses the MFOA with
RL algorithm to restore images on the noise-free frames. Performance of the proposed algorithm is
evaluated and compared with other optimization methods such as GA, PSO, and various noise reduction
methods such as bilateral, wiener, and median filters.

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1474
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1471-1477

Table 1. Performance comparison of proposed FMF with Impulse Noise Variance levels 0.02, 0.04,
0.06and 0.08

Fuzzy Based Wiener Filter Median Filter (in


Noise Variance Bilateral Filter
Images median Filter (in (in dB) dB)
(σ2) (in dB)
dB)

1 77.0010 67.6669 71.7240 69.8711


0.02
2 79.7139 69.3385 71.3172 70.6879
1 76.4389 67.5795 70.2744 69.6664
0.04
2 78.8971 69.2571 69.9906 70.4853
1 75.8496 67.4946 69.4270 69.4714
0.06
2 78.2927 69.1259 69.1517 70.4512
4 75.5013 67.4246 68.6999 69.4460
0.08
10 77.4154 69.0196 68.5314 70.3796
Table 2. Results of proposed APSO-RL and PSO-RL

MFOA Modified PSO PSO


Noise
Proposed

Proposed

Proposed
Bilateral

Bilateral

Bilateral
Variance Images
Median

Median

Median

Median
Wiener

Wiener

Wiener
Fuzzy
based
Filter

Filter

Filter

Filter

Filter

Filter

Filter

Filter

Filter

Filter
FMF

FMF
(σ2)

1 42.81 32.15 39.77 41.30 40.91 31.05 37.73 32.03 39.37 24.17 46.65 34.80
35.87 31.60 38.32 37.51
0.02 2 34.10 29.62 34.30 23.36 35.48 23.44 47.22 24.44

1 33.31 22.81 30.81 27.14 31.35 21.82 28.95 25.04 42.67 32.68 32.94 29.73
0.04
2 31.21 27.22 41.81 29.41 29.27 25.24 39.91 37.82 27.47 17.35 38.42 30.12
1 30.21 24.22 41.60 29.39 28.36 22.25 39.61 27.40 33.84 23.74 32.90 21.05
0.06
2 34.12 30.21 36.22 29.12 32.04 28.45 34.32 27.06 27.02 14.42 34.46 26.09
1 36.11 32.27 42.23 19.65 34.18 30.38 41.93 17.07 42.30 24.88 38.91 26.62
0.08
2 37.12 26.56 31.22 20.12 36.80 24.72 29.01 18.26 32.22 17.25 11.37 18.61

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1475
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1471-1477

Noise removal performance


85
80

PSNR
75
70
65
60
(σ2) 0.02 0.04 0.06 0.08
Noise Variance

Fuzzy Based median Filter (in dB) Bilateral Filter (in dB)
Wiener Filter (in dB) Median Filter (in dB)

Fig. 6: Comparison of Proposed Fuzzy Based Median Filter with Existing Filtering Methods

50

40
SDME

30

20

10

0
Fuzzy based Bilateral Filter Wiener Filter Median Filter
Median Filter
Filtering Methods

MFOA Modified PSO PSO

Fig 7: Performance of Proposed MFOA with RL and Existing Filtering Methods


5. Conclusion
Using Fuzzy-based Median Filter and MFOA with RL algorithm, noise-free image was restored. The
proposed method gave high performance in denoising and restoration. The results show the better
performance of FMF and MFOA than restore process with RL methods and have higher value in SDME
and PSNR compared to other filtering methods. In addition, when we consider figures (6) and (7), the noise
extraction characteristics of the proposed method is better than current techniques and the quality of restore
image is better than PSO-RL.
References
[1] Kavousi-Fard A., Samet H., Marzbani F. A new hybrid modified firefly algorithm and support vector
regression model for accurate short term load forecasting. Expert systems with applications. Vol.
41(No. 13) (2014) pages. 6047–6056.

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1476
International Journal of Advanced Science and Technology
Vol. 29, No. 4s, (2020), pp. 1471-1477

[2] Kumar N., Tripathi R.P., Shukla H.S. Image Restoration in Noisy Free Images Using Fuzzy Based
Median Filtering and Adaptive Particle Swarm Optimization - Richardson-Lucy Algorithm.
International Journal of Intelligent Engineering and Systems. Vol.10 (No. 4) (2017) pages. 50-59.
[3] Kumar A., Ghos M.K. Overview of information security using genetic algorithm and chaos.
Information Security Journal: A Global Perspective. Vol. 18(No. 6) (2009) pages. 306-315.
[4] Gothwal R., Gupta S., Gupta D., Dahiya A.K. Color image segmentation algorithm based on RGB
channels. Proceedings of 3rd International Conference on Reliability, Infocom Technologies and
Optimization, IEEE, 2014 pages. 1-5.
[5] Tripathi R.P., Shukla H.S, Kumar N., Image Restoration using modified binary particle Swarm
Optimization Richardson-Lucy (MBSO-RL) algorithm. International Journal of Applied
Engineering Research , Vol. 10(No. 22)(2015) pages. 43077-43081.
[6] Shukla H.S, Tripathi R.P, Kumar N., Median filter based wavelet transform for multilevel noise.
International Journal of Computer Applications. Vol. 107(No. 14)(2014) pages 11-14.
[7] Bacanin N.,Tuba M., Firefly Algorithm for Cardinality Constrained Mean-Variance Portfolio
Optimization Problem with Entropy Diversity Constraint. The Scientific World Journal.Vol.
2014(2014) pages 1-16.
[8] Yang X. S., Firefly algorithms for multimodal optimization. Stochastic Algorithms: Foundations
and Applications, Vol. 5792 (2009) pages. 169–178.
[9] Cura T., Particle swarm optimization approach to portfolio optimization, Nonlinear Analysis: Real
World Applications, Vol. 10(No. 4) (2009) pages. 2396-2406.
[10] Yang X. S., Nature-Inspired Metaheuristic Algorithms, Luniver Press, 2008.
[11] Yang X. S. Firefly algorithms for multimodal optimization. in Stochastic Algorithms: Foundations
and Applications SAGA 2009, Lecture Notes in Computer Sciences, Vol. 5792 (2009) pages. 169-
178.
[12] Ali N. ,Othman M. A., Husain M. N. ,Misran M. H. A review of firefly algorithm. ARPN Journal
of Engineering and Applied Sciences. Vol. 9 (No. 10) (2014) pages. 1732-1736.
[13] Rizk-Allah R., Zaki E. and El-Sawy A. Hybridizing ant colony optimization with firefly algorithm
for unconstrained optimization problems. Applied Mathematics and Computation. Vol.224
(No.3)(2013) pages.473-483.
[14] Kumbharana S. and Pandey G. 2013. Solving Travelling Salesman Problem using Firefly Algorithm.
International Journal for Research in Science and Advanced Technologies. Vol.2(No. 2)(2013)
pages. 53-57.
[15] Horn M. Vector quantization using the firefly algorithm for image compression. Expert Systems
with Applications. Vol. 39(No.1)( 2012.) pages.1078-1091.
[16] Shraddha Tripathi, Krishna Kumar, B.K.Singh and R.P.Singh “Image Segmentation: A Review”,
International Journal of Computer Science and Management Research, Vol:1(6), November
2012,pp. 838-843.
[17] N. Lal, S. Qamar “Power Efficient Data Collection in Wireless Sensor Networks” International
Journal of Innovative Technology and Exploring Engineering (IJITEE), Volume-8 Issue-6C, pp.
133-137, April 2019.
[18] N. Lal, M. Singh, S. Yadav “Rule-Based Wrappers for a Dataspace System” IJITEE, Volume-8
Issue-6C, pp. 80-90, 2019.
[19] Partibha, Niranjan Lal, Manoj Diwakar “Text Security using 2D Cellular Automata Rules”
Presented in World Conference on Advances in Communication & Control System (CACCS) at DIT
University on 6th – 8th April 2013, pp. 363-368, Published by Atlantis Press

ISSN: 2005-4238 IJAST


Copyright ⓒ 2020 SERSC 1477

You might also like