Development and Analysis of Enhanced Image Inpainting Approach

You might also like

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

International Journal of Trend in Scientific Research and Development (IJTSRD)

Volume 6 Issue 4, May-June 2022 Available Online: www.ijtsrd.com e-ISSN: 2456 – 6470

Development and Analysis of


Enhanced Image Inpainting Approach
Yogita1, Shalini Bhadola2, Kirti Bhatia2, Rohini Sharma3*
1
Student, Sat Kabir Institute of Technology and Management, Bahadurgarh, Haryana, India
2
Assistant Professor, Sat Kabir Institute of Technology and Management, Bahadurgarh, Haryana, India
3
Assistant Professor, GPGCW, Rohtak, Haryana, India

ABSTRACT How to cite this paper: Yogita | Shalini


Inpainting is a restoration technique that involves filling in damaged, Bhadola | Kirti Bhatia | Rohini Sharma
degraded, or missing areas of artwork to create a full image. Oil or "Development and Analysis of
acrylic paints, biochemical photography prints, sculptors, and digital Enhanced Image Inpainting Approach"
photos and video are all examples of physical and digital art mediums Published in
International Journal
that can be used in this process. We have developed a model which
of Trend in
in-paint a corrupted image using three different sparse representation- Scientific Research
based approaches. We have used K-SVD (Singular Value and Development
Decomposition, ORTHOGONAL MATCHING PURSUIT (OMP), (ijtsrd), ISSN: 2456-
and Delaunay Triangulation based Interpolation. It has also become 6470, Volume-6 | IJTSRD50366
apparent from the results that inpainting on natural images appears Issue-4, June 2022,
decent when not requiring too big patch size. As the patch sizes pp.1731-1737, URL:
increase, to be able to cover large masked areas, the reconstruction www.ijtsrd.com/papers/ijtsrd50366.pdf
will be smoother. There might be useful at times to have an algorithm
like this that could be used for smoothing and inpainting Copyright © 2022 by author(s) and
simultaneously. However, if the contrast of the image is to be International Journal of Trend in
Scientific Research and Development
unharmed some other method should be considered. It is therefore
Journal. This is an
concluded that even though sparse reconstructive methods appear Open Access article
impressive at first glance they are lacking when it comes to using distributed under the
large image patches, which is required when it comes to inpainting terms of the Creative Commons
phase maps. Attribution License (CC BY 4.0)
(http://creativecommons.org/licenses/by/4.0)
KEYWORDS: Image Inpainting, Sparse Representation

INTRODUCTION
The technique of calculating the clear, original image microscope is already poor. To retrieve the item,
from a damaged image is termed image regeneration. more sophisticated methodologies must be used. A
Corruption can be seen in the form of motion blur, restoration process called inpainting includes filling
noise, and misfocus of camera. Image regeneration is in damaged, deteriorated, or missing sections of
achieved by correcting the blurring phenomenon, artwork to complete the picture [10]. The approaches
which is conducted by imaging a point source and used in inpainting are determined by the required
recovering the visual features missed during the outcome and the sort of image being processed.
blurring process using the point source picture, Physical and digital art have completely different
commonly known as the Point Spread Function. approaches to filling up the voids.
Image enhancement differs from image restoration in
Related Work
that the second is intended to highlight characteristics
Image processing is a very popular field of research.
of the image that make it more attractive to the
A plenty of research has been accomplished in
spectator, rather than inevitably producing true data
different aspects of this area, such as recognition of
from a scientific standpoint. Image processing
face from a collection of faces [1], sentiments
algorithms given by imaging packages do not use an a
identification[2-3] removal of noise form the
priori description of the method that formed the
picture[4-8]. Many tools are now available that can
image. Noise can be efficiently eliminated with
restore lost or broken parts of digital pictures and
picture enhancement by surrendering some resolution,
films. Adobe Photoshop is the most well-known
but this is not adequate in various situations.
software for working with digital photos. Because
Resolution in the z-direction of a fluorescent

@ IJTSRD | Unique Paper ID – IJTSRD50366 | Volume – 6 | Issue – 4 | May-June 2022 Page 1731
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
digital files may be replicated, any necessary changes there are three primary classes of 2D picture
should be performed to the replica file, while the inpainting methods. The first is structural (or
initial files should be archived. Inpainting has become geometric) inpainting, followed by texture inpainting,
an involuntary procedure that can be carried out on and finally a mixture of the two. All of these
digital photographs, thanks to the varied capabilities inpainting techniques are similar: they fill in the gaps
of the digital camera and the digitization of historical using information from recognized or correct image
photos. Inpainting techniques can be used for more portions, analogous to how real photographs are
than only scratch removal; they can also be used for repaired. The practice of inpainting has its origins in
object expulsion, word withdrawal, and other the renovation of painted images. "The phrase
automated picture and video alterations. In addition, inpainting pertains to the reparation of paint losses—
they can be seen in picture compression and super focusing at the recompositing of the missing
resolution applications. It is used to reverse, repair, or components of a picture in terms of improving its
alleviate deterioration in film in cinematography and viewpoint by creating reparations less noticeable [11].
filmmaking. It can also be employed to remove Also, inpainting tries to enhance the overall
damage signs, the obsolete date from photos, and appearance of artwork by replacing missing or
items for artistic purposes. This method can be used spoiled areas with systems and materials that are
to substitute any missing blocks in picture encoding comparable to the original artist's work. It is critical
and communication, such as in a video streaming. It's to retain complete records of the primary condition of
also useful for removing branding from videos. the photos, treatments performed and justifications
Inpainting based on deep learning neural networks for treatments, as well as original copies when
can be employed to decensor images. In the literature, applicable, including all applications of inpainting.
ELEMENTARY PROCEDURE OF IMAGE INPAINTING
The process of region filling in digital photographs after information loss is an important part of image
processing. Image inpainting pertains to rebuilding techniques that are used to eliminate damaged or undesired
objects from a picture in such a genuine way that an indistinct spectator would not detect any differences and
mistake the outcome for the original. Structural inpainting techniques, textural inpainting methods, and hybrid
approaches are the three basic categories of restoration procedures. Regardless of these 3 groups, methods can be
classified as PDE-centered methods, semiautomatic inpainting procedures, surface amalgamation approaches,
procedures based on prototypes, and amalgam systems. In this paper, we have used three approaches of image
inpainting (K-SVD, OMP and Interpolation) and have compared their results. The complete process of image
inpainting has ben revealed in figure 1.

Fig 1: A Complete Inpainting Procedure


SPARSE RECONSTRUCTION
Sparse reconstruction is a series of strategies for reconstructing MR pictures from significantly under-sampled k-
space data using image attributes that are known a priori. Several applications necessitate the recovery of image
missing portions. For example, image and video communications across error-prone networks utilising block-
based coders may result in block losses. In an image processing system, flaws in the capture, storage, or other
processes cause mistakes, necessitating the usage of restoration methods to estimate missing portions. Without
any mistake repair data transmitted by the encoder, decoder side recovery algorithms function on the received
data, fig 2.

@ IJTSRD | Unique Paper ID – IJTSRD50366 | Volume – 6 | Issue – 4 | May-June 2022 Page 1732
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470

Fig 2: Sparse Method based Image Inpainting


K-SVD (Singular Value Decomposition)
K-SVD is a dictionary learning method that uses a singular value decomposition technique to produce a
dictionary for sparse representations. Iteratively switching between sparse coding the input data using the
existing dictionary and changing the dictionary's atoms to suit better the data., K-SVD is a generalisation of the
k-means clustering approach. The expectation-maximization (EM) algorithm is structurally related to it [12-13].
As follows, K-SVD is a generalization of K-means. K-means clustering can also be thought of as a sparse
representation method. That is, a nearest neighbor finds the best potential codebook to describe the data samples.
The K-means algorithm begins by making an educated estimate about certain items that best define the data. K-
SVD imitates this step by asking for an initial guess of the dictionary, meaning that the starting point is any
matrix such that,

Fig 3, [14] shows the working of K-SVD algorithm and Fig 4 shows the use of K-SVD in our proposed
method.

Fig 3: Workflow of K-SVD algorithm

@ IJTSRD | Unique Paper ID – IJTSRD50366 | Volume – 6 | Issue – 4 | May-June 2022 Page 1733
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
ORTHOGONAL MATCHING PURSUIT (OMP)
K-SVD relies on a pursuit algorithm. There are several examples of such algorithms. One of the most commonly
used pursuit algorithms is called Orthogonal Matching Pursuit [15].
INTERPOLATION
Interpolation is a technique for predicting the values of pixels at unknown positions using pixels with known
values. The division of the image into overlapping patches and treatment of each patch based on the natural
image patches is a standard method for achieving interpolation.

Fig 4: Use of K-SVD in Inpainting


PROPOSED METHOD
Step 1: Get the dimensions of the image.
Step 2: Calculate block size of the image. Provide a number of atoms in the dictionary and of pixels
between consecutive patches.
Step 3: Take a picture with missing components.
Step 4: Apply any of the method (Interpolation, OMP or K-SVD) for inpainting of the image.
Interpolation: Use Delaunay triangulation.
OMP: Compute the mask and extract the patches of the image. Extract the noisy image patch.
K-SVD: Extract the patches of the image and compute its mask. Apply discrete transformations.
Step 5: Recover the Image.
Step 6: Compute PSNR (Peak Signal to Noise ration).
A novel approach (sparse-based image inpainting methodology) is used to determine if the image can be
reconstructed properly or not. The adaptive sparse presentation appears to be better than other image restoration
methods. In comparison to the traditional image reconstruction, a minor alteration is made. This article uses
three techniques for image inpainting and then compares the results of these methods
RESULTS
The implementation of the proposed method has several parts. We have provided an image with missing
components (See figure 5). Then three different techniques, Interpolation, OMP and K-SVD are applied
separately to recover the image.

@ IJTSRD | Unique Paper ID – IJTSRD50366 | Volume – 6 | Issue – 4 | May-June 2022 Page 1734
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470

Fig 5: Image with Missing Components


In painted Image after applying K-SVD method (figure 6).

Fig 6: Restored image after applying K-SVD


Image restoration after applying Interpolation (fig 7).

Fig 7: Image restoration after applying Interpolation

@ IJTSRD | Unique Paper ID – IJTSRD50366 | Volume – 6 | Issue – 4 | May-June 2022 Page 1735
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470

Fig 8: Image restoration after applying ORTHOGONAL MATCHING PURSUIT


From the results, it has been observed that K-SVD and OMP techniques are better than the Interpolation method.
Conclusion Engineering, Volume 6 Issue 4 - April 2019,
We suggested a novel method that uses a sparse pp. 19-24.
representation method for image inpainting. This
[3] Ankit Jain, Kirti Bhatia , Rohini Sharma,
approach computes the dimensions and bloc size of
Shalini Bhadola, An emotion recognition
the image. It creates a dictionary of atoms, and
framework through local binary patterns,
computes pixels between consecutive patches.
Journal of Emerging Technologies and
Afterward, it computes the mask and extracts the
Innovative Research, Vol -6, Issue-5, May
patches of the image. Then, it extracts the noisy
2019.
image patch. It recovers the missing parts of the
image. Through the outcomes, it is evident that K- [4] Deepak Dahiya, Kirti Bhatia, Rohini Sharma,
SVD algorithm is better than other two. Although Shalini Bhadola, Development and Analysis of
deep learning is quickly evolving, it is not always a Enhanced Window Median Filter Approach of
viable solution to inpainting challenge. The Image Denoising, International Journal Of
fundamental reason for this is the absence of image Multidisciplinary Research In Science,
pairings for training in real-world inpainting Engineering and Technology, Volume 4, Issue
operations. All existing inpainting methods, to our 8, August 2021.
awareness, are trained on replicated noisy data [5] Deepak Kumar Shrivastava, Kirti Bhatia,
acquired by toting AWGN to spotless photographs. Shivkant, Rohini Sharma Development and
Nonetheless, we discovered that CNNs trained on analysis of mean shift based Video object
simulated data are ineffective for the inpainting tracking tool, International journal of
operation in the actual world. Innovative Research in computer and
REFERENCES communication engineering, Vol-08, Issue-07,
[1] Sanju, K. Bhatia, Rohini Sharma, Pca and july 2020.
Eigen Face Based Face Recognition Method, [6] Deepak Dahiya, Kirti Bhatia, Rohini Sharma,
Journal of Emerging Technologies and Shalini Bhadola, A Deep Overview on Image
Innovative Research, June 2018, Volume 5, Denoising Approaches, International Journal of
Issue 6, pp. 491-496. Innovative Research in Computer and
[2] Ankit Jain, Kirti Bhatia , Rohini Sharma, Communication Engineering, Volume 9, Issue
Shalini Bhadola, An Overview on Facial 7, July 2021.
Expression Perception Mechanisms, SSRG [7] Jyoti, Kirti Bhatia, Rohini Sharma,
International Journal of Computer Science and Development of Wavelet Based Image

@ IJTSRD | Unique Paper ID – IJTSRD50366 | Volume – 6 | Issue – 4 | May-June 2022 Page 1736
International Journal of Trend in Scientific Research and Development @ www.ijtsrd.com eISSN: 2456-6470
Denoising, International Journal of Trend in [11] Idelson, Antonio; Severini, Leonardo (28 June
Scientific Research and Development, Volume 2018). "Inpainting". The Encyclopedia of
4 Issue 5, July-August 2020. Archeological Sciences: 1–4, October 30, 2019.
[8] Jyoti, Kirti Bhatia, Shalini Bhadola, Rohini [12] Michal Aharon; Michael Elad; Alfred
Sharma, An Analysis of Facsimile Bruckstein (2006), "K-SVD: An Algorithm for
Demosaicing Procedures, International journal Designing Over complete Dictionaries for
of Innovative Research in computer and Sparse Representation" (PDF), IEEE
communication engineering, Vol-08, Issue- Transactions on Signal Processing, 54 (11):
07,july 2020. 4311–4322.
[9] Jonathan, M. (2005) Black Ledge. Digital [13] Rubinstein, R., Bruckstein, A.M., and Elad, M.
Image Processing Mathematical and (2010), "Dictionaries for Sparse Representation
Computational Methods Coll House, Modeling", Proceedings of the IEEE, 98 (6):
Watergate, Chic Ester, West Sussex, PO20 1045–1057.
3QL, England.
[14] Etienam, Clement, 4D Seismic History
[10] Newman, Richard (2011). Conservation and Matching Incorporating Unsupervised
care of museum collections (1st ed.). MFA Learning, 2019.
publications. p. 29. ISBN 978-0-87846-729-7.
[15] G. David, S. Mallat, and Z. Zhang, \Adaptive
greedy approximations," J. CONSTRUCT.
APPROX, VOL.13, 1997

@ IJTSRD | Unique Paper ID – IJTSRD50366 | Volume – 6 | Issue – 4 | May-June 2022 Page 1737

You might also like