-
Notifications
You must be signed in to change notification settings - Fork 5
/
readme.txt
127 lines (81 loc) · 5.26 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
NIQE Software release.
=======================================================================
-----------COPYRIGHT NOTICE STARTS WITH THIS LINE------------
Copyright (c) 2011 The University of Texas at Austin
All rights reserved.
Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy,
modify, and distribute this code (the source files) and its documentation for
any purpose, provided that the copyright notice in its entirety appear in all copies of this code, and the
original source of this code, Laboratory for Image and Video Engineering (LIVE, http://live.ece.utexas.edu)
and Center for Perceptual Systems (CPS, http://www.cps.utexas.edu) at the University of Texas at Austin (UT Austin,
http://www.utexas.edu), is acknowledged in any publication that reports research using this code. The research
is to be cited in the bibliography as:
1) A. Mittal, R. Soundararajan and A. C. Bovik, "NIQE Software Release",
URL: http://live.ece.utexas.edu/research/quality/niqe.zip, 2012.
2) A. Mittal, R. Soundararajan and A. C. Bovik, "Making a Completely Blind Image Quality Analyzer", submitted to IEEE Signal Processing Letters, 2012.
IN NO EVENT SHALL THE UNIVERSITY OF TEXAS AT AUSTIN BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS DATABASE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF TEXAS
AT AUSTIN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF TEXAS AT AUSTIN SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE DATABASE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
AND THE UNIVERSITY OF TEXAS AT AUSTIN HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-----------COPYRIGHT NOTICE ENDS WITH THIS LINE------------%
Author : Anish Mittal
Version : 1.0
The authors are with the Laboratory for Image and Video Engineering
(LIVE), Department of Electrical and Computer Engineering, The
University of Texas at Austin, Austin, TX.
Kindly report any suggestions or corrections to [email protected]
=======================================================================
This is a demonstration of the Naturalness Image Quality Evaluator(NIQE) index. The algorithm is described in:
A. Mittal, R. Soundararajan and A. C. Bovik, "Making a Completely Blind Image Quality Analyzer", submitted to IEEE Signal Processing Letters, 2012.
You can change this program as you like and use it anywhere, but please
refer to its original source (cite our paper and our web page at
http://live.ece.utexas.edu/research/quality/niqe_release.zip).
=======================================================================
Running on Matlab
Input : A test image loaded in an array
Output: A quality score of the image. Higher value represents a lower quality.
Usage:
1. Load the image, for example
image = imread('testimage1.bmp');
2. Load the parameters of pristine multivariate Gaussian model.
load modelparameters.mat;
The images used for making the current model may be viewed at http://live.ece.utexas.edu/research/quality/pristinedata.zip
3. Initialize different parameters
Height of the block
blocksizerow = 96;
Width of the block
blocksizecol = 96;
Verical overlap between blocks
blocksizerow = 0;
Horizontal overlap between blocks
blocksizecol = 0;
For good performance, it is advisable to divide the distorted image in to same size patched as used for the construction of multivariate Gaussian model.
3. Call this function to calculate the quality score:
qualityscore = computequality(im,blocksizerow,blocksizecol,blockrowoverlap,blockcoloverlap,mu_prisparam,cov_prisparam)
Sample execution is also shown through example.m
=======================================================================
MATLAB files: (provided with release): example.m, computefeature.m, computemean.m, computequality.m, estimateaggdparam.m and estimatemodelparam.m
Image Files: image1.bmp, image2.bmp, image3.bmp and image4.bmp
Dependencies: Mat file: modelparameters.mat provided with release
=======================================================================
Note on training:
This release version of NIQE was trained on 125 pristine images with patch size set to 96X96 and sharpness threshold of 0.75.
Training the model
If the user wants to retrain the model using different set of pristine image or set the patch sizes to different values, he/she can do so
use the following function. The images used for making the current model may be viewed at http://live.ece.utexas.edu/research/quality/pristinedata.zip
Folder containing the pristine images
folderpath = 'pristine'
Height of the block
blocksizerow = 96;
Width of the block
blocksizecol = 96;
Verical overlap between blocks
blocksizerow = 0;
Horizontal overlap between blocks
blocksizecol = 0;
The sharpness threshold level
sh_th = 0.75;
[mu_prisparam cov_prisparam] = estimatemodelparam(folderpath,blocksizerow,blocksizecol,blockrowoverlap,blockcoloverlap,sh_th)
=======================================================================