Package gov.nih.mipav.model.algorithms
Class ImageQuality
- java.lang.Object
-
- java.lang.Thread
-
- gov.nih.mipav.model.algorithms.AlgorithmBase
-
- gov.nih.mipav.model.algorithms.ImageQuality
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.awt.event.WindowListener
,java.lang.Runnable
,java.util.EventListener
public class ImageQuality extends AlgorithmBase
- Author:
- aailb
MIT License
imageQualityIndex.m by Zhou Wang ported with his kind permission.
The original source code for imageQualityIndex.m is Copyright (c) 2001 The University of Texas at Austin
ssim_index.m and ssim.m by Zhou Wang ported with his kind permission.
The original source code for ssim.index.m is Copyright(c) 2003 Zhou Wang
The original source code for ssim.m is Copyright(c) 2009 Zhou Wang
msssim.m and ssim_index.new.m by Zhou Wang ported with his kind permission.
For VISUAL_INFORMATION_FIDELITY:
% -----------COPYRIGHT NOTICE STARTS WITH THIS LINE------------
% Copyright (c) 2005 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)
% 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:
%
% H. R. Sheikh and A. C. Bovik, "Image Information and Visual Quality", IEEE Transactions on
% Image Processing, (to appear).
%
% 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------------
%
%This is an implementation of the algorithm for calculating the
%Visual Information Fidelity (VIF) measure (may also be known as the Sheikh
%-Bovik Index) between two images. Please refer
%to the following paper:
%
%H. R. Sheikh and A. C. Bovik "Image Information and Visual Quality"
%IEEE Transactios on Image Processing, in publication, May 2005.
%Download manuscript draft from http://live.ece.utexas.edu in the
%Publications link
%
%This implementation is slightly differnet from the one used to report
%results in the paper above. The modification have to do with using more
%subands than those used in the paper, better handling of image boundaries,
%and a window that automatically resizes itself based on the scale.
%
%Report bugfixes and comments to hamid.sheikh@ieee.org
%
%----------------------------------------------------------------------
% Prerequisites: The Steerable Pyramid toolbox. Available at
% http://www.cns.nyu.edu/~lcv/software.html
%
%Input : (1) img1: The reference image
% (2) img2: The distorted image (order is important)
%
%Output: (1) VIF te visual information fidelity measure between the two images
%Default Usage:
% Given 2 test images img1 and img2, whose dynamic range is 0-255
%
% vif = vifvec(img1, img2);
%
%Advanced Usage:
% Users may want to modify the parameters in the code.
% (1) Modify sigma_nsq to find tune for your image dataset.
% (2) MxM is the block size that denotes the size of a vector used in the
% GSM model.
% (3) subbands included in the computation
NQM is ported with the kind permission of Professor Brian L. Evans:
Copyright (c) 1999-2021 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 software and its documentation for any purpose, provided that the copyright notice in its
entirety appear in all copies of this software.
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 SOFTWARE 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.
VSR is ported with the kind permissions of Dr. Sheila S. Hemami and Professor Damon Chandler at Ritsumeikan University
in Japan. They are the co_inventors of the method.
Author: D. M. Chander
Copyright 1998-2007 Image Coding and Analysis Lab, Oklahoma State
University, Stillwater, OK 74078 USA.
$Revision: BETA 1.02.0.0 $ $Date: 2007/10/04/ 15:00:00 $
For DWT code used for VSNR:
////////////////////////////////////////////////////////////////////////////
// //
// COPYRIGHT (c) 1998, 2002, VCL //
// ------------------------------ //
// Permission to use, copy, modify, distribute and sell this software //
// and its documentation for any purpose is hereby granted without fee, //
// provided that the above copyright notice appear in all copies and //
// that both that copyright notice and this permission notice appear //
// in supporting documentation. VCL makes no representations about //
// the suitability of this software for any purpose. //
// //
// DISCLAIMER: //
// ----------- //
// The code provided hereunder is provided as is without warranty //
// of any kind, either express or implied, including but not limited //
// to the implied warranties of merchantability and fitness for a //
// particular purpose. The author(s) shall in no event be liable for //
// any damages whatsoever including direct, indirect, incidental, //
// consequential, loss of business profits or special damages. //
// //
Other metrics are from full_ref.py, no_ref.py and utils.py by Andrew Khalel.
full_ref.py, no_ref.py and utils.py are Copyright (c) 2018 Andrew Khalel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
## Implemented metrics
- [x] Mean Squared Error (MSE)
- [x] Root Mean Squared Error (RMSE)
- [x] Peak Signal-to-Noise Ratio (PSNR) [[1]](https://ieeexplore.ieee.org/abstract/document/1284395/)
- [x] Structural Similarity Index (SSIM) [[1]](https://ieeexplore.ieee.org/abstract/document/1284395/)
- [x] Universal Quality Image Index (UQI) [[2]](https://ieeexplore.ieee.org/document/995823/)
- [x] Multi-scale Structural Similarity Index (MS-SSIM) [[3]](https://ieeexplore.ieee.org/abstract/document/1292216/)
- [x] Erreur Relative Globale Adimensionnelle de Synthese (ERGAS) [[4]](https://hal.archives-ouvertes.fr/hal-00395027/)
- [x] Spatial Correlation Coefficient (SCC) [[5]](https://www.tandfonline.com/doi/abs/10.1080/014311698215973)
- [x] Relative Average Spectral Error (RASE) [[6]](https://ieeexplore.ieee.org/document/1304896/)
- [x] Spectral Angle Mapper (SAM) [[7]](https://ntrs.nasa.gov/search.jsp?R=19940012238)
- [x] Spectral Distortion Index (D_lambda) [[8]](https://www.ingentaconnect.com/content/asprs/pers/2008/00000074/00000002/art00003)
- [x] Spatial Distortion Index (D_S) [[8]](https://www.ingentaconnect.com/content/asprs/pers/2008/00000074/00000002/art00003)
- [x] Quality with No Reference (QNR) [[8]](https://www.ingentaconnect.com/content/asprs/pers/2008/00000074/00000002/art00003)
- [x] Visual Information Fidelity (VIF) [[9]](https://ieeexplore.ieee.org/abstract/document/1576816/)
- [x] Block Sensitive - Peak Signal-to-Noise Ratio (PSNR-B) [[10]](https://ieeexplore.ieee.org/abstract/document/5535179/)
Available metrics list
mse, rmse, psnr, rmse_sw, uqi, ssim, ergas, scc, rase, sam, msssim, vifp, psnrb
## References
[1] "Image quality assessment: from error visibility to structural similarity." 2004)
[2] "A universal image quality index." (2002)
[3] "Multiscale structural similarity for image quality assessment." (2003)
[4] "Quality of high resolution synthesised images: Is there a simple criterion?." (2000)
[5] "A wavelet transform method to merge Landsat TM and SPOT panchromatic data." (1998)
[6] "Fusion of multispectral and panchromatic images using improved IHS and PCA mergers based on wavelet decomposition." (2004)
[7] "Discrimination among semi-arid landscape endmembers using the spectral angle mapper (SAM) algorithm." (1992)
[8] "Multispectral and panchromatic data fusion assessment without reference." (2008)
[9] "Image information and visual quality." (2006)
[10] "Quality Assessment of Deblocked Images" (2011)
-
-
Field Summary
Fields Modifier and Type Field Description private double
alpha
(package private) static double
ALPHA
(package private) static double
BETA
int
BLOCK_SENSITIVE_PEAK_SIGNAL_TO_NOISE_RATIO
int
BORDER_CONSTANT
int
BORDER_DEFAULT
int
BORDER_REFLECT
int
BORDER_REFLECT_101
int
BORDER_REPLICATE
int
BORDER_WRAP
private ModelImage
clr
private ModelImage
clr_const
private ModelImage
clr_noise
(package private) static double
DELTA
int
ERGAS
private double
ergas_mean
(package private) static double
GAMMA
private ModelImage
gry
private ModelImage
gry_const
private ModelImage
gry_noise
(package private) boolean
GWAVELIFT_NORM_1_1
private boolean
isColor
private double
k1
private double
k2
private int
length
private int
level
private int
M
int
MEAN_SQUARED_ERROR
private double
meanBlueSquareError
private double
meanGreenSquareError
private double
meanRedSquareError
private double
meanSquareError
private int
method
private int[]
metrics
int
MULTI_SCALE_STRUCTURAL_SIMILARITY_INDEX
private int
nDims
int
NQM
private double
nqm_value
private double
overall_mssim
int
PEAK_SIGNAL_TO_NOISE_RATIO
private double
peakSignalToNoiseRatio
int
PIXEL_BASED_VISUAL_INFORMATION_FIDELITY
private static int
PRODUCT
private double
psnr_b
private double
r
private double
rase_mean
private float[]
referenceBlueBuffer
private double[]
referenceBuffer
private float[]
referenceGreenBuffer
private ModelImage
referenceImage
private float[]
referenceRedBuffer
private double[]
referenceYBuffer
int
RELATIVE_AVERAGE_SPECTRAL_ERROR
private double[]
results
private double[][]
rmse_blue_map
private double[][]
rmse_green_map
private double[][]
rmse_map
private double[][]
rmse_red_map
int
RMSE_SW
private double
rmse_sw_mean
int
ROOT_MEAN_SQUARED_ERROR
private double
rootMeanSquareError
private double
sam_mean
private double
sigma
private double
sigma_nsq
int
SPATIAL_CORRELATION_COEFFICIENT
private double
spatialCorrelationCoefficient
int
SPECTRAL_ANGLE_MAPPER
int
SSIM_WITH_AUTOMATIC_DOWNSAMPLING
int
STRUCTURAL_SIMILARITY_INDEX
private double
structuralSimilarityIndex
private int[]
subbands
private float[]
testBlueBuffer
private double[]
testBuffer
private float[]
testGreenBuffer
private ModelImage
testImage
private float[]
testRedBuffer
private double[]
testYBuffer
(package private) static double
TWOALPHA
(package private) static double
TWOBETA
(package private) static double
TWODELTA
(package private) static double
TWOGAMMA
private ViewUserInterface
UI
int
UNIVERSAL_QUALITY_IMAGE_INDEX
private double
universalImageQualityIndex
private double
VA
private double
vif
private double
vifp_mean
int
VISUAL_INFORMATION_FIDELITY
int
VSNR
private int
vsnr_data_b
private double
vsnr_data_Ce
private double
vsnr_data_Ci
private double[]
vsnr_data_Cis
private double
vsnr_data_CTe
private int[]
vsnr_data_filter_gains
private double[]
vsnr_data_fs
private double
vsnr_data_g
private double
vsnr_data_k
private double
vsnr_data_mL
private double
vsnr_data_mX
private int
vsnr_data_num_levels
private double[]
vsnr_data_pix2lum_table
private double
vsnr_data_r
private double
vsnr_data_v
private double
vsnr_data_zeta
private double
vsnr_value
private double[]
weight
private double[][]
win
private int
ws
private static int
WTD_SUM
private int
xDim
private boolean
YCrCbRequired
private int
yDim
-
Fields inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
destFlag, destImage, image25D, mask, maxProgressValue, minProgressValue, multiThreadingEnabled, nthreads, progress, progressModulus, progressStep, runningInSeparateThread, separable, srcImage, threadStopped
-
-
Constructor Summary
Constructors Constructor Description ImageQuality()
ImageQuality(ModelImage referenceImage, ModelImage testImage, double VA, int[] metrics, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, double sigma_nsq, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, double sigma_nsq, int[] subbands, int M, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, double alpha, int vsnr_data_b, double vsnr_data_k, double vsnr_data_g, double vsnr_data_r, double vsnr_data_v, int vsnr_data_num_levels, int[] vsnr_data_filter_gains, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double[][] win, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double r, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double k1, double k2, double sigma, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double k1, double k2, double sigma, double r, double[][] win, double sigma_nsq, int[] subbands, int M, int level, double[] weight, int method, double VA, double alpha, int vsnr_data_b, double vsnr_data_k, double vsnr_data_g, double vsnr_data_r, double vsnr_data_v, int vsnr_data_num_levels, int[] vsnr_data_filter_gains, double[] results)
ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double k1, double k2, double sigma, int level, double[] weight, int method, double[] results)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private double
_compute_bef(double[] im, int block_size)
private double[]
analyze_dst_img()
private void
analyze_src_img()
private double
best_csnrs(double v_idx)
private double[]
cmaskn(double[] c, double[] ci, double[] a, double[] ai, double i)
double[][]
copyMakeBorder(double[][] src, int top, int bottom, int left, int right, int borderType, double borderValue)
private double[][]
correlationFilter(double[][] img)
private double
ctf(double f_r)
void
DoTransformCols(double[][] Buffer, double[][] SBuffer, double[][] DBuffer)
void
DoTransformRows(double[][] Buffer, double[][] SBuffer, double[][] DBuffer)
private void
DoUntransformCols(double[][] Buffer, double[][] SBuffer, double[][] DBuffer)
private void
DoUntransformRows(double[][] Buffer, double[][] SBuffer, double[][] DBuffer)
private void
ergas()
private double[][]
fftshift(double[][] in)
private double[][]
filter2Same(double[][] img, double[][] win)
private double[][]
filter2SameWithDownSample(double[][] img, double[][] win, int borderType, int downSampleY, int downSampleX, int startY, int startX, int stopY, int stopX)
private double[][]
filter2Valid(double[][] img, double[][] filter)
private double
find_best_csnrs(double Ce)
private double[]
gthresh(double[] x, double T, double[] z)
private double[][][][]
imdwt(double[][] LL0, int num_levels)
private double
log2(double input)
private void
mse()
private void
msssim()
private void
nqm()
private void
psnr()
private void
psnrb()
private void
rase()
private void
Reconstruct(double[][][] bands, int num_scales)
private void
refparams_vecgsm(double[][][] ssarr, double[][] l_arr, java.util.Vector<double[][]> org)
private void
rmse()
private void
rmse_sw()
void
runAlgorithm()
Actually runs the algorithm.private void
sam()
private void
scc()
private void
ssim(boolean downSampling)
void
testErgas()
void
testMse()
void
testMsssim()
void
testNQM()
void
testPsnr()
void
testPSNRB()
void
testRase()
void
testRmse()
void
testSam()
void
testScc()
void
testSsim()
void
testSsimDownload()
void
testUqi()
void
testVIF()
void
testVIFP()
void
testVSNR()
private double[][]
uniformFilter(double[][] img, int size1, int size2)
private void
uqi()
private void
vifp()
private void
vifsub_est_M(java.util.Vector<double[][]> g_all, java.util.Vector<double[][]> vv_all, java.util.Vector<double[][]> org, java.util.Vector<double[][]> dist)
private void
vifvec()
private void
vsnr()
-
Methods inherited from class gov.nih.mipav.model.algorithms.AlgorithmBase
actionPerformed, addListener, addProgressChangeListener, calculateImageSize, calculatePrincipleAxis, computeElapsedTime, computeElapsedTime, convertIntoFloat, delinkProgressToAlgorithm, delinkProgressToAlgorithmMulti, displayError, errorCleanUp, finalize, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, fireProgressStateChanged, generateProgressValues, getDestImage, getElapsedTime, getMask, getMaxProgressValue, getMinProgressValue, getNumberOfThreads, getProgress, getProgressChangeListener, getProgressChangeListeners, getProgressModulus, getProgressStep, getProgressValues, getSrcImage, isCompleted, isImage25D, isMultiThreadingEnabled, isRunningInSeparateThread, isThreadStopped, linkProgressToAlgorithm, linkProgressToAlgorithm, makeProgress, notifyListeners, removeListener, removeProgressChangeListener, run, setCompleted, setImage25D, setMask, setMaxProgressValue, setMinProgressValue, setMultiThreadingEnabled, setNumberOfThreads, setProgress, setProgressModulus, setProgressStep, setProgressValues, setProgressValues, setRunningInSeparateThread, setSrcImage, setStartTime, setThreadStopped, startMethod, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened
-
Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
-
-
-
Field Detail
-
UI
private ViewUserInterface UI
-
metrics
private int[] metrics
-
results
private double[] results
-
referenceImage
private ModelImage referenceImage
-
testImage
private ModelImage testImage
-
MEAN_SQUARED_ERROR
public final int MEAN_SQUARED_ERROR
- See Also:
- Constant Field Values
-
ROOT_MEAN_SQUARED_ERROR
public final int ROOT_MEAN_SQUARED_ERROR
- See Also:
- Constant Field Values
-
PEAK_SIGNAL_TO_NOISE_RATIO
public final int PEAK_SIGNAL_TO_NOISE_RATIO
- See Also:
- Constant Field Values
-
STRUCTURAL_SIMILARITY_INDEX
public final int STRUCTURAL_SIMILARITY_INDEX
- See Also:
- Constant Field Values
-
SSIM_WITH_AUTOMATIC_DOWNSAMPLING
public final int SSIM_WITH_AUTOMATIC_DOWNSAMPLING
- See Also:
- Constant Field Values
-
UNIVERSAL_QUALITY_IMAGE_INDEX
public final int UNIVERSAL_QUALITY_IMAGE_INDEX
- See Also:
- Constant Field Values
-
MULTI_SCALE_STRUCTURAL_SIMILARITY_INDEX
public final int MULTI_SCALE_STRUCTURAL_SIMILARITY_INDEX
- See Also:
- Constant Field Values
-
ERGAS
public final int ERGAS
- See Also:
- Constant Field Values
-
SPATIAL_CORRELATION_COEFFICIENT
public final int SPATIAL_CORRELATION_COEFFICIENT
- See Also:
- Constant Field Values
-
RELATIVE_AVERAGE_SPECTRAL_ERROR
public final int RELATIVE_AVERAGE_SPECTRAL_ERROR
- See Also:
- Constant Field Values
-
SPECTRAL_ANGLE_MAPPER
public final int SPECTRAL_ANGLE_MAPPER
- See Also:
- Constant Field Values
-
VISUAL_INFORMATION_FIDELITY
public final int VISUAL_INFORMATION_FIDELITY
- See Also:
- Constant Field Values
-
PIXEL_BASED_VISUAL_INFORMATION_FIDELITY
public final int PIXEL_BASED_VISUAL_INFORMATION_FIDELITY
- See Also:
- Constant Field Values
-
BLOCK_SENSITIVE_PEAK_SIGNAL_TO_NOISE_RATIO
public final int BLOCK_SENSITIVE_PEAK_SIGNAL_TO_NOISE_RATIO
- See Also:
- Constant Field Values
-
RMSE_SW
public final int RMSE_SW
- See Also:
- Constant Field Values
-
NQM
public final int NQM
- See Also:
- Constant Field Values
-
VSNR
public final int VSNR
- See Also:
- Constant Field Values
-
PRODUCT
private static final int PRODUCT
- See Also:
- Constant Field Values
-
WTD_SUM
private static final int WTD_SUM
- See Also:
- Constant Field Values
-
testBuffer
private double[] testBuffer
-
testRedBuffer
private float[] testRedBuffer
-
testGreenBuffer
private float[] testGreenBuffer
-
testBlueBuffer
private float[] testBlueBuffer
-
referenceBuffer
private double[] referenceBuffer
-
referenceRedBuffer
private float[] referenceRedBuffer
-
referenceGreenBuffer
private float[] referenceGreenBuffer
-
referenceBlueBuffer
private float[] referenceBlueBuffer
-
testYBuffer
private double[] testYBuffer
-
referenceYBuffer
private double[] referenceYBuffer
-
rmse_sw_mean
private double rmse_sw_mean
-
universalImageQualityIndex
private double universalImageQualityIndex
-
structuralSimilarityIndex
private double structuralSimilarityIndex
-
overall_mssim
private double overall_mssim
-
sam_mean
private double sam_mean
-
psnr_b
private double psnr_b
-
length
private int length
-
YCrCbRequired
private boolean YCrCbRequired
-
isColor
private boolean isColor
-
meanSquareError
private double meanSquareError
-
meanRedSquareError
private double meanRedSquareError
-
meanGreenSquareError
private double meanGreenSquareError
-
meanBlueSquareError
private double meanBlueSquareError
-
rootMeanSquareError
private double rootMeanSquareError
-
peakSignalToNoiseRatio
private double peakSignalToNoiseRatio
-
rmse_map
private double[][] rmse_map
-
rmse_red_map
private double[][] rmse_red_map
-
rmse_green_map
private double[][] rmse_green_map
-
rmse_blue_map
private double[][] rmse_blue_map
-
ergas_mean
private double ergas_mean
-
spatialCorrelationCoefficient
private double spatialCorrelationCoefficient
-
rase_mean
private double rase_mean
-
vifp_mean
private double vifp_mean
-
vif
private double vif
-
nqm_value
private double nqm_value
-
vsnr_value
private double vsnr_value
-
gry
private ModelImage gry
-
gry_noise
private ModelImage gry_noise
-
gry_const
private ModelImage gry_const
-
clr
private ModelImage clr
-
clr_noise
private ModelImage clr_noise
-
clr_const
private ModelImage clr_const
-
nDims
private int nDims
-
xDim
private int xDim
-
yDim
private int yDim
-
ws
private int ws
-
k1
private double k1
-
k2
private double k2
-
sigma
private double sigma
-
level
private int level
-
weight
private double[] weight
-
method
private int method
-
r
private double r
-
win
private double[][] win
-
sigma_nsq
private double sigma_nsq
-
subbands
private int[] subbands
-
M
private int M
-
VA
private double VA
-
alpha
private double alpha
-
vsnr_data_b
private int vsnr_data_b
-
vsnr_data_k
private double vsnr_data_k
-
vsnr_data_g
private double vsnr_data_g
-
vsnr_data_r
private double vsnr_data_r
-
vsnr_data_v
private double vsnr_data_v
-
vsnr_data_num_levels
private int vsnr_data_num_levels
-
vsnr_data_filter_gains
private int[] vsnr_data_filter_gains
-
vsnr_data_fs
private double[] vsnr_data_fs
-
vsnr_data_pix2lum_table
private double[] vsnr_data_pix2lum_table
-
vsnr_data_CTe
private double vsnr_data_CTe
-
vsnr_data_mX
private double vsnr_data_mX
-
vsnr_data_mL
private double vsnr_data_mL
-
vsnr_data_zeta
private double vsnr_data_zeta
-
vsnr_data_Cis
private double[] vsnr_data_Cis
-
vsnr_data_Ci
private double vsnr_data_Ci
-
vsnr_data_Ce
private double vsnr_data_Ce
-
BORDER_CONSTANT
public final int BORDER_CONSTANT
- See Also:
- Constant Field Values
-
BORDER_REPLICATE
public final int BORDER_REPLICATE
- See Also:
- Constant Field Values
-
BORDER_REFLECT
public final int BORDER_REFLECT
- See Also:
- Constant Field Values
-
BORDER_WRAP
public final int BORDER_WRAP
- See Also:
- Constant Field Values
-
BORDER_REFLECT_101
public final int BORDER_REFLECT_101
- See Also:
- Constant Field Values
-
BORDER_DEFAULT
public final int BORDER_DEFAULT
- See Also:
- Constant Field Values
-
ALPHA
static final double ALPHA
- See Also:
- Constant Field Values
-
BETA
static final double BETA
- See Also:
- Constant Field Values
-
GAMMA
static final double GAMMA
- See Also:
- Constant Field Values
-
DELTA
static final double DELTA
- See Also:
- Constant Field Values
-
TWOALPHA
static final double TWOALPHA
- See Also:
- Constant Field Values
-
TWOBETA
static final double TWOBETA
- See Also:
- Constant Field Values
-
TWOGAMMA
static final double TWOGAMMA
- See Also:
- Constant Field Values
-
TWODELTA
static final double TWODELTA
- See Also:
- Constant Field Values
-
GWAVELIFT_NORM_1_1
boolean GWAVELIFT_NORM_1_1
-
-
Constructor Detail
-
ImageQuality
public ImageQuality()
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double k1, double k2, double sigma, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double k1, double k2, double sigma, int level, double[] weight, int method, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double r, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double[][] win, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, double sigma_nsq, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, double sigma_nsq, int[] subbands, int M, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, double VA, int[] metrics, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, double alpha, int vsnr_data_b, double vsnr_data_k, double vsnr_data_g, double vsnr_data_r, double vsnr_data_v, int vsnr_data_num_levels, int[] vsnr_data_filter_gains, double[] results)
-
ImageQuality
public ImageQuality(ModelImage referenceImage, ModelImage testImage, int[] metrics, int ws, double k1, double k2, double sigma, double r, double[][] win, double sigma_nsq, int[] subbands, int M, int level, double[] weight, int method, double VA, double alpha, int vsnr_data_b, double vsnr_data_k, double vsnr_data_g, double vsnr_data_r, double vsnr_data_v, int vsnr_data_num_levels, int[] vsnr_data_filter_gains, double[] results)
-
-
Method Detail
-
testMse
public void testMse()
-
testRmse
public void testRmse()
-
testPsnr
public void testPsnr()
-
testErgas
public void testErgas()
-
testScc
public void testScc()
-
testRase
public void testRase()
-
testUqi
public void testUqi()
-
testSsim
public void testSsim()
-
testSsimDownload
public void testSsimDownload()
-
testMsssim
public void testMsssim()
-
testSam
public void testSam()
-
testNQM
public void testNQM()
-
testPSNRB
public void testPSNRB()
-
testVIF
public void testVIF()
-
testVIFP
public void testVIFP()
-
testVSNR
public void testVSNR()
-
runAlgorithm
public void runAlgorithm()
Description copied from class:AlgorithmBase
Actually runs the algorithm. Implemented by inheriting algorithms.- Specified by:
runAlgorithm
in classAlgorithmBase
-
mse
private void mse()
-
rmse
private void rmse()
-
psnr
private void psnr()
-
copyMakeBorder
public double[][] copyMakeBorder(double[][] src, int top, int bottom, int left, int right, int borderType, double borderValue)
-
filter2Same
private double[][] filter2Same(double[][] img, double[][] win)
-
correlationFilter
private double[][] correlationFilter(double[][] img)
-
uniformFilter
private double[][] uniformFilter(double[][] img, int size1, int size2)
-
rmse_sw
private void rmse_sw()
-
filter2Valid
private double[][] filter2Valid(double[][] img, double[][] filter)
-
ergas
private void ergas()
-
scc
private void scc()
-
rase
private void rase()
-
uqi
private void uqi()
-
msssim
private void msssim()
-
ssim
private void ssim(boolean downSampling)
-
sam
private void sam()
-
psnrb
private void psnrb()
-
_compute_bef
private double _compute_bef(double[] im, int block_size)
-
log2
private double log2(double input)
-
vifp
private void vifp()
-
vifvec
private void vifvec()
-
refparams_vecgsm
private void refparams_vecgsm(double[][][] ssarr, double[][] l_arr, java.util.Vector<double[][]> org)
-
filter2SameWithDownSample
private double[][] filter2SameWithDownSample(double[][] img, double[][] win, int borderType, int downSampleY, int downSampleX, int startY, int startX, int stopY, int stopX)
-
vifsub_est_M
private void vifsub_est_M(java.util.Vector<double[][]> g_all, java.util.Vector<double[][]> vv_all, java.util.Vector<double[][]> org, java.util.Vector<double[][]> dist)
-
nqm
private void nqm()
-
gthresh
private double[] gthresh(double[] x, double T, double[] z)
-
cmaskn
private double[] cmaskn(double[] c, double[] ci, double[] a, double[] ai, double i)
-
ctf
private double ctf(double f_r)
-
fftshift
private double[][] fftshift(double[][] in)
-
vsnr
private void vsnr()
-
find_best_csnrs
private double find_best_csnrs(double Ce)
-
analyze_dst_img
private double[] analyze_dst_img()
-
analyze_src_img
private void analyze_src_img()
-
best_csnrs
private double best_csnrs(double v_idx)
-
imdwt
private double[][][][] imdwt(double[][] LL0, int num_levels)
-
DoTransformRows
public void DoTransformRows(double[][] Buffer, double[][] SBuffer, double[][] DBuffer)
-
DoTransformCols
public void DoTransformCols(double[][] Buffer, double[][] SBuffer, double[][] DBuffer)
-
Reconstruct
private void Reconstruct(double[][][] bands, int num_scales)
-
DoUntransformCols
private void DoUntransformCols(double[][] Buffer, double[][] SBuffer, double[][] DBuffer)
-
DoUntransformRows
private void DoUntransformRows(double[][] Buffer, double[][] SBuffer, double[][] DBuffer)
-
-