0% found this document useful (0 votes)
18 views

Digital Image Processing and Recognition Using Pyt

Uploaded by

9920102030
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Digital Image Processing and Recognition Using Pyt

Uploaded by

9920102030
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

International Journal of Engineering Applied Sciences and Technology, 2021

Vol. 5, Issue 10, ISSN No. 2455-2143, Pages 319-322


Published Online February 2021 in IJEAST (http://www.ijeast.com)

DIGITAL IMAGE PROCESSING AND


RECOGNITION USING PYTHON
D. Sri Shreya
Department of Electronics and Communication
Vellore institute of Technology, Chennai, Tamil Nadu, India

Abstract— In this project, the primary aim will be the These processed images can now either be directly used or we
conversion of images into Grayscale in which conversion of can use them further for developing higher-order models used
pixels to array takes place and apply Blur effect using The in Artificial Intelligence and Deep Learning. Image Recognition
Gaussian blur which is a type of image-blurring filter that is one such concept that will be applied to differentiate and
uses a Gaussian function which also expresses the normal recognize faces in digital images that can be taken use of in
distribution in statistics for calculating the transformation various technical fields like user entry security systems, face
to apply to each pixel in the image. The above two unlock system, blind people support, etc. Moreover, this can be
processesare applied to the input images. used in digital camera images, digital cameras generally include
These two above mentioned processes can be achieved by specialized digital image processing hardware – either dedicated
utilizing the most relevant python libraries and functions, chips or added circuitry on other chips – to convert the raw data
followed by conversion of the digital image to numerical from their image sensor into a color-corrected image in a
data and then, applying the effects to the image to get back standard image file format. A film like “Westworld (1973)” was
the image with applied effects in it. the first feature film to use digital image processing to pixelate
Face recognition refers to matching a face present in an photography to simulate an android's point of view.
input image from the training/pre-saved dataset and by
applying Deep Learning Concept. This will be achieved by The proposed model uses conversion images to grayscale and
defining a function to read and convert images to data, apply face recognition to lessen the time complexity of face
apply the python function, and then, recreating the image detection and recognition. Hence, it detects faces faster and with
with results. an accuracy of more than 90%.
Keywords— Gray Scale, Blur effect, Gaussian blur, Python
1) THE GAUSSIAN BLUR
I. INTRODUCTION
The Gaussian blur is a type of image-blurring filter that uses a
Digital image processing is the method of a digital computer to Gaussian function (which also expresses the normal
process digital images through the use of a relevant algorithm. distribution in statistics) for calculating the transformation to
It is a subcategory or field of digital signal processing, digital apply to each pixel in the image. The formula of a Gaussian
image processing contains a lot of advantages over analog image function in one dimension is
processing but digital image processing allows the use of
much more complex algorithms, and hence, can offer both more
sophisticated performance at simple tasks, and the
implementation of methods which would be impossible by
analog means. It provides a much wider range of algorithms
that can be applied to the input data and can avoid problems In two dimensions, it is the product of two such Gaussian
such as the build-up of noise and distortion during processing. functions, one in each dimension:
Since images are defined over two dimensions or more than just
2-dimensions digital image processing may be modeled in the
form of multidimensional systems. The generation and
development of digital image processing are mainly affected by
three factors: the development of computers, the development
of mathematics especially the creation and improvement of where x is the distance from the origin in the horizontal axis, y
discrete mathematics theory, and lastly the demand for a wider is the distance from the origin in the vertical axis, and σ is the
range of applications in environmental, agricultural, military, standard deviation of the Gaussian distribution.
industry and medical science increasing over-time.
When applied in two dimensions, this formula produces a
Digital image processing deals with the manipulation of digital surface whose contours are concentric circles with a Gaussian
images through a digital computer. It is also a subfield of distribution from the center point. Values from this
signals and systems but it majorly focuses on images. The distribution are used to build a convolution matrix that is
input of this system processing is a digital image and the applied to the original image.
system process that image using efficient algorithms, and gives
an image as an output with its corresponding description. Open CV provides faster in-built libraries to compute these
319
International Journal of Engineering Applied Sciences and Technology, 2021
Vol. 5, Issue 10, ISSN No. 2455-2143, Pages 319-322
Published Online February 2021 in IJEAST (http://www.ijeast.com)

equations and apply them to the image pixels. Pixel.Blue = Gray


Recognition Using CNN and Face Recognition:

Construct Sequential Convolution Neural Network Layer for


extracting key features from the pixels and learn the
2) GRAYSCALE characteristics for recognition. Use feature extractor and apply
max pooling to each pixel group to determine the position of key
feature extractor. Use Keras weight as well as 64 layered
For grayscale images, the result is a two-dimensional ImageNet CNN for training the images. This trained model will
array with the number of rows and columns equal to the give accuracy between 75% to 96% depending on the data set
number of pixel rows and columns in the image. Low size used for training. Alternatively use a face recognition
numeric values indicate darker shades and higher values of library to obtain the same neural network result with 80%
lighter shades. The range of pixel values is often 0 to 255. We accuracy and almost 1/5th of the time compared to the standard
divide by 255 to get a range of 0 to 1. CNN model.

Color images are represented as three-dimensional Image Reconstruction:


NumPy arrays - a collection of three two-dimensional Use cv2 to rebuild the image with all RGB pixels with Grayscale
arrays, one each for red, green, and blue channels. Each one, values. Find the region of the image with the face and its
like grayscale arrays, has one value per pixel and their corresponding name and accuracy. Print the image and change
ranges are identical. pixels near the face with a box to plot the name prediction
obtained. If the prediction value doesn't cross the threshold, it
doesn't contain any recognizable face.

Deep Neural Network

To undo the effects of gamma compression before


calculating the grayscale luminance, it's necessary to apply the
inverse operation, gamma expansion

II. PROPOSED ALGORITHM


READING IMAGE:
Input image
FLOWCHART
Read image using cv2
Convert image to NumPy array
Each array element represents the pixel and its color in RED,
BLUE, and GREEN

GRAY SCALE:
Gray=0.299R + 0.587G + 0.114B
(OR)
Gray = (Red + Green + Blue) / 3
For each pixel:
Red = Pixel.Red III. EXPERIMENT AND RESULT
Green = Pixel.Green
Input 1
Blue = Pixel.Blue
Gray = (Red + Green + Blue) / 3 The input image has the face of Kobe Bryant.
Pixel.Red = Gray
The model is trained to identify Kobe Bryant
Pixel.Green = Gray

320
International Journal of Engineering Applied Sciences and Technology, 2021
Vol. 5, Issue 10, ISSN No. 2455-2143, Pages 319-322
Published Online February 2021 in IJEAST (http://www.ijeast.com)

(a) Original image

(b) Gray scale image Output:

Output: Final recognition

IV. CONCLUSION
Hence, the Image Processing and Recognition model was
Input 2: implemented by the deep learning concept and implemented. It
The input image has the faces of Messi and Griezmann. successfully converts the images into grayscale and then uses it
The model was trained to recognize Messi and not identify for detection. By converting the image into grayscale, we
Griezmann. reduce the magnitude of pixel values, and then images are used
for face recognition. This process made the face recognition
faster as compared to the traditional model and detects faces

321
International Journal of Engineering Applied Sciences and Technology, 2021
Vol. 5, Issue 10, ISSN No. 2455-2143, Pages 319-322
Published Online February 2021 in IJEAST (http://www.ijeast.com)

with high accuracy, as evident from the output. The accuracy


achieved was 80% using libraries and up to 97% using the
CNN model from Deep Learning. This can be used in the same
way to detect faces as used in modern security systems, face
unlocksmonitoring systems, etc.

V. REFERENCE

1. C. Chang and P. J. Chou. Taipei, Taiwan - Face Detection


in Real Time Based on HOG. N. J. Wang,S.: IEEE,
DOI:10.1109/ISPACS.2012.6473506, 2012. International
Symposium on Intelligent Signal Processing and
Communications Systems. pp. 333- 337. (ISBN: 978-1-
4673- 5081-5)
2. S.V.Viraktamath, Mukund Katti, Aditya Khatawkar,
Pavan Kulkarni. 3- Face Detection and Tracking using
OpenCV., s.l.: SIJ, July-August 2013, The Standard
International Journals (The SIJ) , (Vol. 1, pp. 45-50.
ISSN: 2321 – 2403)
3. https://www.irjet.net/archives/V7/i10/IRJET-
V7I10219.pdf

322

You might also like