You are on page 1of 13

Improvisation in image quality metrics for image recognition using data

wavelet transformation compared with discrete cosine transformation.

B.Vamsi Krishna1, T.P.Anitha ashri2

B. Vamsi Krishna1

Research Scholar,

Department of Computer Science and Engineering,

Saveetha School of Engineering,

Saveetha Institute of Medical and Technical Sciences,

Saveetha University, Chennai, Tamilnadu. India. Pincode: 602105.

bendalamvamsikrishna17@saveetha.com

T.P.Anithaa shri2

Project Guide, Corresponding Author,

Department of Computer Science and Engineering,

Saveetha School of Engineering,

Saveetha Institute of Medical and Technical Sciences,

Saveetha University, Chennai, Tamilnadu. India. Pincode: 602105.

anithaashritp.sse@saveetha.com

Keywords : Image Quality, Data wavelet transformation, Discrete cosine transformation,


Tensorflow, Keras, Image enrichment, Image processing.
ABSTRACT

Aim: To analyse image quality metrics and improve quality of the image using data wavelet
transformation algorithm and comparing over discrete cosine transformation algorithm
Materials and methods: Data wavelet transformation algorithm uses numerical and
functional analysis to transform the data and obtain the image quality metrics. The
implementation has been carried out with the help of python libraries such as Tensorflow and
Keras. The algorithms tested over 90 sets of various images which converts into grayscale
and delivers compressed images which can be utilized for test and train dataset images
respectively, that are classified for enhancement of image quality .Result: The analysis on the
data set and test cases has been performed successfully and acquired 91% accuracy for the
Data wavelet transformation algorithm(DWT) and compared to the Discrete cosine
transformation algorithm(DCT), which gave 72% accuracy. With the level of significance
(p<0.005), the resultant data depicts the reliability in independent sample t tests. Conclusion:
On the whole process of prediction of accuracy for the image quality metrics, the Discrete
cosine transformation algorithm gives significantly better performance when compared to
Discrete cosine transformation algorithm.

Keywords : Image Quality, Data wavelet transformation, Discrete cosine transformation,


Tensorflow, Keras, Image enrichment, Image processing.

1. INTRODUCTION

The analysis of images can be tricky when there are too many patterns and
compressing those images would lead to the loss of clarity on the data. A.I. algorithms such
as data wavelet transformation(Sang-Heun Oh, Sung 2020) helps to transform the image
using multiple levels of compressions which helps to get the complete image on
reconstruction. This process can be done multiple times as the data has a perfect pattern to
reconstruct. The processing speed of image compression and cost to comply is very less when
compared to DCT techniques(F. Arab, S. M. Daud 2013). Image quality assessment is
probably faster and accurate results are obtained.

A method to decrease the cost of compression was implemented by many researchers


to secure the flexible data sharing. Around 12 articles published in IEEE and 10 papers in
google scholar(Gopichand G, Vijayakumar, Pasupuleti N.S. 2021)(Sang-Heun Oh,
Sung 2020). The most cited article was (Wang et al. 2019) focused on reducing the
compression time and size with higher image quality .

In this existing model using AI techniques, Image is compressed using Discrete


cosine transformation technique with the accuracy of 72%. But, in the DWT algorithm, the
model transforms the image and to compressed output(Padmaja, B., Myneni, M.B. &
Krishna Rao Patro, E 2020). This may be efficient with respect to time with less efficiency
of 70%accuracy.

2. MATERIALS AND METHODS

The study setting of the proposed work is done in Saveetha University. The number of
groups identified are two. Group 1 is a Data wavelet transformation algorithm and group 2 is
Discrete cosine transformation. Data wavelet transformation algorithm was iterated various
number of times with the sample size of 90.

Data wavelet transformation algorithm

Calculate the high pass filter from the given low pass filter by doing g =
h.*power(-1*ones(1,length(h)),(0:length(h)-1)); Perform low pass row-wise filtering to the
image and store the result in m1 matrix. Perform high pass row-wise filtering to the image
and store the result in m2 matrix.(Gopichand G, Vijayakumar, Pasupuleti N.S. 2021)
Now we will do downsampling for both m1 and m2 matrices on columns and concatenate the
downsampled matrices in a new matrix rm. For the next level, we will perform column-wise
low pass filtering on the results above matrix rm and then store the results on a new matrix
m1 again. perform column-wise high pass filtering on the results above matrix rm and store
the results on a new matrix m2. We will do downsampling again for both new m1 and m2
matrices on rows and concatenate the downsampled matrices in a new matrix cm. This is the
final result matrix which consists of three coefficients as horizontal, vertical and diagonal.
STEPS:

● · 1.level to select the wavelet transform


● · 2.Wavelet Transform Decomposition
● · 3.Wavelet Transform Reconstruction
● · 4.Wavelet for image noise reduction
● · 5.Add white noise to the image
● · 6.Select the levels
● · 7.Estimation of the noise level
● · 8.hard-thresholding
● · 9.Soft-thresholding
● · 10.reconstruction for hard thresholding
● · 11.reconstruction for Soft thresholding.
● · 12.End the Program

Discrete Cosine Transformation algorithm

DCT has some finite sequence of data points where cosine functions oscillates at different
frequencies.(T. Sung, Y. Shieh, C. Yu 2006)Let us have a 2-D variable named matrix of
dimension 8 X 8 which contains image information and a 2-D variable named dct of same
dimension which contains the information after applying discrete cosine transform. So, we
have the formula

“#dctmatrix - dct[i][j] = ci * cj (sum(k=0 to m-1) sum(l=0 to n-1) #matrixpart matrix[k][l] *


cos((2*k+1) *i*pi/2*m) * cos((2*l+1) *j*pi/2*n)’’

where ci= 1/sqrt(m) if i=0 else ci= sqrt(2)/sqrt(m) and cj= 1/sqrt(n) if j=0 else cj=
sqrt(2)/sqrt(n) and we have to apply this formula to all the value, i.e., from i=0 to m-1 and j=0
to n-1, Here, sum(k=0 to m-1) denotes summation of values from k=0 to k=m-1. In this code,
both m and n are equal to 8 and pi is defined as 3.142857.

Anaconda navigator is used for execution of the project code. It helps to manage and
access notebook files and any kind of python files. By giving the python environment a
command prompt can provide easy access to the code and execution. Main tools that need to
be installed in the python environment are keras and tensorflow. Minimum of 4GB RAM is
required to compile and execute the project code. Preferred operating systems are windows
and ubuntu. The above mentioned method is for users using windows OS.

Using anaconda navigator software and anaconda prompt that install the necessary
modules and tools. By testing 700 compressed images for classification, with the number of
epochs given as 60, it has increased the efficiency but, the time of execution and
classification is more.

By reducing to 90 images for classification, it helped to get the improved accuracy with
increased efficiency in terms of taking less time by using the image quality metrics
enhancement system. To check with the data and accuracy reliability SPSS is used. With a
default alpha value of 0.05.

3. RESULTS

The quality analysis model is trained for 60 epochs and a total of 90 image datasets.
The total epochs of 60 and with a batch size of 45 are used in the model and tabulated with
epoch stages as shown in the Table 1 below. Thus, training with 60 epochs and the specified
batches gave us an accuracy of 91% in quality analysis by the model.

In Table 1, the process of data training will be carried out and after the classification
of training data, the model will be trained by categorizing different levels of compression. In
Fig 2, the classification was carried out to categorize the type of compression , cost of other
images.

Fig 3 depicts us by representing epochs on the x-axis and the range of accuracy on the
y-axis. As a gradual observation and analysis, the number of epochs increased, training
accuracy increased ups and downs at 20 to 40 epochs, but in the case of validation accuracy,
there are gradual ups and downs in the accuracy.

Fig 4 depicts the representing epochs on the x-axis and the range of accuracy on the
y-axis. As a gradual observation and analysis, the number of epochs increased, training loss
decreased. Whereas, a little bit fluctuates at 0 to 60 epochs. In the case of validation accuracy,
there is a gradual increase in the loss.

4. DISCUSSION

The quality metrics are considered for classification by training data. After the
classification of these images and training the data, testing and validation of images was
carried out with 60 epochs and obtained train and validation results. Graphical representation
of the loss and accuracy for Data wavelet transformation algorithm gives 92% of accuracy
with the assumed variance 0.29 with the help of SPSS analysis, the reliability of data with
respect to the DWT with the mean difference for assumed variances and not assumed
variances of 0.01 which coverage to more accuracy than the DCT with their mean accuracies
and thus obtained the high accuracy in extraction of images.
5. CONCLUSION

It is inferred that the Image quality analysis that is obtained by compressing images
using Data wavelet transformation algorithm which is the uppermost algorithm when
compared to DCT with accuracy of 81%.By using Data wavelet transformation algorithm, the
connection between each layer held to acquire more accuracy of 92% from classification of
data.The grouping of grayscale images helped to classify and train models to depict the image
quality through the image enhancement in the significant manner.It turns out to be an
effective proposed system when compared to DCT algorithm.

DECLARATIONS

Conflict of interests:

No conflict of interest in this manuscript.

Author Contribution:

Author BVK was involved in data collection, data analysis, manuscript writing.
Author TPA was involved in conceptualization, data validation and critical review of
manuscript.

Acknowledgement:

The authors would like to express their gratitude towards Saveetha School of
Engineering, Saveetha Institute of Medical and Technical Sciences (Formerly known as
Saveetha University) for providing necessary infrastructure to carry out this work
successfully.

Funding :

We thank the following organizations for providing financial support that enabled us
to complete this study :

1. Saveetha University
2. Saveetha School of Engineering, Chennai.
3. Saveetha Institute of Medical Technical Sciences
REFERENCES

Gopichand G, Vijayakumar, Pasupuleti N.S. (2021) On-Road Crime Detection


Using Artificial Intelligence. In: Favorskaya M.N., Mekhilef S., Pandey
R.K., Singh N. (eds) Innovations in Electrical and Electronic Engineering.
Lecture Notes in Electrical Engineering, vol 661. Springer, Singapore.
https://doi.org/10.1007/978-981-15-4692-1_32

Sang-Heun Oh, Sung-Wook Park and Byung-Jun Kim, "DWT (discrete wavelet
transform) based watermark system," 2002 Digest of Technical Papers.
International Conference on Consumer Electronics (IEEE Cat.
No.02CH37300), 2002, pp. 192-193, doi: 10.1109/ICCE.2002.1013987.
F. Arab, S. M. Daud and S. Z. Hashim, "Discrete Wavelet Transform Domain
Techniques," 2013 International Conference on Informatics and Creative
Multimedia, 2013, pp. 340-345, doi: 10.1109/ICICM.2013.73.

Y. Wang, Z. Li, C. Wang, L. Feng and Z. Zhang, "Implementation of discrete


wavelet transform," 2014 12th IEEE International Conference on
Solid-State and Integrated Circuit Technology (ICSICT), 2014, pp. 1-3, doi:
10.1109/ICSICT.2014.7021561.

T. Sung, Y. Shieh, C. Yu and H. Hsin, "Low-Power Multiplierless 2-D DWT and


IDWT Architectures Using 4-tap Daubechies Filters," 2006 Seventh
International Conference on Parallel and Distributed Computing,
Applications and Technologies (PDCAT'06), 2006, pp. 185-190, doi:
10.1109/PDCAT.2006.78.

Padmaja, B., Myneni, M.B. & Krishna Rao Patro, E. A comparison on visual
prediction models for MAMO (multi activity-multi object) recognition using
deep learning. J Big Data 7, 24 (2020).
https://doi.org/10.1186/s40537-020-00296-8

H. Kanagaraj and V. Muneeswaran, "Image compression using HAAR discrete


wavelet transform," 2020 5th International Conference on Devices, Circuits
and Systems (ICDCS), 2020, pp. 271-274, doi:
10.1109/ICDCS48716.2020.243596.

Anithaashri, T. P., and G. Ravichandran. 2020. “Security Enhancement for the


Network Amalgamation Using Machine Learning Algorithm.” 2020
International Conference on Smart Electronics and Communication
(ICOSEC). https://doi.org/10.1109/icosec49089.2020.9215452.

W. Wang, Q. Lai, H. Fu, J. Shen, H. Ling and R. Yang, "Salient Object Detection
in the Deep Learning Era: An In-depth Survey," in IEEE Transactions on
Pattern Analysis and Machine Intelligence,doi:
10.1109/TPAMI.2021.3051099.
Tables and Figures

Table 1: Analysis on Accuracy(0.9156) of train and loss (0.5799) data of images for different
epochs stages(60) with the model trained by various categorization of compressed images

Epoch Stage Training Training Loss Validation Validation loss


accuracy Accuracy

10 0.7255 0.3411 0.7583 0.4587

20 0.7588 0.2970 0.8144 0.7255

30 0.8122 0.1231 0.8798 0.5796

40 0.8574 0.4211 0.9087 0.2578

50 0.9146 0.3011 0.9159 0.6506

60 0.9173 0.2244 0.9188 0.2489

Table 2: Comparison of accuracy and loss values of Data wavelet transformation


algorithm(1) with high accuracy of 91% and Discrete Cosine Transformation algorithm(2)
with 72% accuracy

Algorithms Accuracy Loss

1 0.73 0.56

1 0.77 0.48

1 0.79 0.21

1 0.81 0.15

1 0.88 0.24

1 0.90 0.19

1 0.91 0.28

1 0.89 0.23
1 0.91 0.22

1 0.91 0.21

2 0.88 0.28

2 0.48 10.92

2 0.58 1.39

2 0.59 1.40

2 0.68 0.79

2 0.66 0.86

2 0.69 0.87

2 0.68 0.91

2 0.65 1.04

Table 3: SPSS statistics depicts data reliability for Data wavelet transformation algorithm
and DCT independently sample T- test Result is applied for dataset fixing confidence interval
as 95 % and level of significance as 0.05 (DWT appears to perform significantly better than
DCT)

F sig t df Sig Mean Std.erro 95% 95%


(2-ta Differen r Confiden Confiden
iled) ce Differen ce ce
ce Interval Interval
of the of the
differenc differenc
e e

Lower Upper

Accura Equal .05 0.82 10.0 78 0.00 7.8182 0.7747 6.275 9.360
cy varianc 1 3 92 0 5 2
es
assume
d
Accura Equal 10.0 77. 0.00 7.8182 0.7747 6.275 9.360
cy varianc 92 98 0 5 2
es not 2
assume
d

Loss Equal 0.1 0.66 -9.9 78 0.00 -7.750 0.7823 -9.308 -6.193
varianc 92 3 07 0 75 6
e
assume
d

Loss Equal -9.9 77. 0.00 -7.750 0.7823 -9.308 -6.193


varianc 07 90 0 75 6
e not 7
assume
d

Fig1: Wavelet decomposition for Women image, From Left: Original Image, Level 1 wavelet
decomposition and Level 2 wavelet decomposition.
Fig2: Wavelet decomposition for Cameraman image, From Left: Original Image, Level 1
wavelet decomposition and Level 3 wavelet decomposition.

Fig 3: Accuracy scores image extraction based on the different stages of epochs on the major
axis with the range of minor axis for the accuracy(0.91) and validation accuracy(0.72)
respectively
Fig 4: Gradual observation and analysis of test loss(31) and validation loss(21) within range
of 0 to 60 epochs as the number of epochs increased, training loss decreased

Fig 5: Comparison of Data wavelet transformation algorithm and Discrete Cosine


Transformation algorithm in terms of mean accuracy. The mean accuracy of RL is better than
Discrete Cosine Transformation algorithm and the standard deviation of Data wavelet
transformation algorithm is significantly better than DCT. X Axis: Data wavelet
transformation algorithm vs DCT Algorithm Y Axis: Mean accuracy of detection ± 1 SD.

You might also like