Evaluation of PSNR Lin Zhang, Dept. Computing, The Hong Kong Polytechnic University |
I have to compare image compression techniques like VQ, JPEG, WAVELET, and fractal. For this, the parameter to be compared is PSNR. Please tell me how I can calculate PSNR OF AN IMAGE which is COMPRESSED by different compression techniques. Plz explain with example.
How to calculate PSNR of a double sized image. Learn more about matlab, digital image processing, image processing, signal processing. The PSNR block computes the peak signal-to-noise ratio, in decibels, between two images. This ratio is used as a quality measurement between the original and a compressed image. The higher the PSNR, the better the quality of the compressed, or reconstructed image.
Introduction
PSNR (Peak Singal-to-Noise Ratio) index is a traditional IQA metric.
Source Code
We used the PSNR implementation provided by Dr. Zhou Wang, which can be downloaded here https://ece.uwaterloo.ca/~z70wang/research/iwssim/psnr_mse.m.
Usage Notes
1. This implementation can only deal with gray-scale images. So, you need to convert the RGB image to the grayscale version, which can be accomplished by rgb2gray in Matlab.
Evaluation Results
The results (in Matlab .mat format) are provided here. Each result file contains a n by 2 matrix, where n denotes the number of distorted images in the database. The first column is the PSNR values, and the second column is the mos/dmos values provided by the database. For example, you can use the following matlab code to calculate the SROCC and KROCC values for PSNR values obtained on the TID2008 database:
%%%%%%%%%%%%%%%
matData = load('PSNROnTID.mat');
PSNROnTID= matData.PSNROnTID;
PSNR_TID_SROCC = corr(PSNROnTID(:,1), PSNROnTID(:,2), 'type', 'spearman');
PSNR_TID_KROCC = corr(PSNROnTID(:,1), PSNROnTID(:,2), 'type', 'kendall');
PSNROnTID= matData.PSNROnTID;
PSNR_TID_SROCC = corr(PSNROnTID(:,1), PSNROnTID(:,2), 'type', 'spearman');
PSNR_TID_KROCC = corr(PSNROnTID(:,1), PSNROnTID(:,2), 'type', 'kendall');
%%%%%%%%%%%%%%%
The source codes to calculate the PLCC and RMSE are also provided for each database. This needs a nonlinear regression procedure which is dependant on the initialization of the parameters. We try to adjust the parameters to get a high PLCC value. For different databases, the parameter initialization may be different. The nonlinear fitting function is of the form as described in [1].
Evaluation results of PSNR on seven databases are given below. Besides, for each evaluation metric, we present its weighted-average value over all the testing datasets; and the weight for each database is set as the number of distorted images in that dataset.
Database | Results | Nonlinear fitting code | SROCC | KROCC | PLCC | RMSE |
TID2008 | PSNROnTID | NonlinearFittingTID | 0.5531 | 0.4027 | 0.5734 | 1.0994 |
CSIQ | PSNROnCSIQ | NonlinearFittingCSIQ | 0.8058 | 0.6084 | 0.8000 | 0.1575 |
LIVE | PSNROnLIVE | NonlinearFittingLIVE | 0.8756 | 0.6865 | 0.8723 | 13.3597 |
IVC | NonlinearFittingIVC | 0.6884 | 0.5218 | 0.7196 | 0.8460 | |
Toyama-MICT | 0.6132 | 0.4443 | 0.6429 | 0.9585 | ||
A57 | 0.6189 | 0.4309 | 0.7073 | 0.1737 | ||
WIQ | 0.6257 | 0.4626 | 0.7939 | 14.1381 | ||
Weighted-Average | 0.6874 | 0.5161 | 0.7020 |
Reference
[1] H.R. Sheikh, M.F. Sabir, and A.C. Bovik, 'A statistical evaluation of recent full reference image quality assessment algorithms', IEEE Trans. on Image Processing, vol. 15, no. 11, pp. 3440-3451, 2006.
Created on: May. 08, 2011
![Psnr mse Psnr mse](/uploads/1/1/8/0/118040249/823563822.png)
Last update: Aug. 04, 2011
Compare two encoder versions
Use general streams parameters, 11 video quality metrics and visually compare frames or separate blocks of the stream
Optimize your encoder
Analyze the quality of encoded video against referenced RAW stream and identify the code portion causing the quality change
Key Features
Calculation of quality metrics: PSNR, APSNR, MSAD, MSE, SSIM, DELTA, VQM,NQI, VMAF and VMAF phone, VIF
Selection of ROI (region of interest) for metrics calculation
Display of essential statistics of encoded streams
Automatic selection of the similar first frame in two streams for analysis synchronization
Comparison of two encoded frames from different streams with a reference stream
Sharing comments between application instances and/or applications of Elecard StreamEye Studio set
Synchronization between applications of Elecard StreamEye Studio set (Binding mode)
Display of comparison results in graphs: metrics, quantizer, frame size, bit allocation etc.
Visual comparison of two encoded streams
Possibility to choose output YUV data format when saving decoded information
Bit allocation display
Automation through Command Line Interface
Saving data into CSV or text files
Video Quality Estimator is a part of StreamEye StudioElecard StreamEye Studio includes 5 separate stand-alone applications and command line tools for all-around video analysis.
|
Software and Hardware specifications
Supported video formats
- MPEG 1/2 Video stream
- AVC/H.264 Video stream
- HEVC/H.265 Video stream
- VP9 Video stream
- AV1 Video stream
- VVC Video stream VTM 10.0 (preview version)
Supported media containers
- MPEG-2 Transport Stream
- MPEG-2 Program Stream
- MP4 file container
- MKV file container
- MXF file container
- AVI container
- IVF container
- FLV container
RAW formats
- I444
- IYUV
- NV12
- NV21
- P444
- RGB24
- RGB32
- UYVY (Y422, UYNV, HDYC)
- V210
- V400
- Y42B
- YUY2 (YUNV, V422, YUYV)
- YV12
- YV16
- YVYU
- .Y4M
- WIDE
- I400
- I422
- V444
System Requirements
- Windows® 7/8/10 (64-bit)
- Mac OS X 10.9 Mavericks and later
- Ubuntu 16.04, 18.04, 20.04 x64
- CentOS 7.6 x86_64
- Fedora 29
​
Screenshots
Follow this link to find the VVC video samples and estimate how Video Quality Estimator work with it.
Please fill in a short form to get free demo-version or product pricing.
Related products
StreamEye Studio
Elecard StreamEye Studio is a set of powerful software tools for video quality analysis designed for professional use in video compression, processing, communication and streaming media industries
Stream Analyzer
Elecard Stream Analyzer is a professional tool for syntax analysis of encoded media streams
New version 4.3 is released
Boro
IPTV Monitoring
Software solution for UDP, RTP, HTTP and HLS streams quality control and measurement of QoS and QoE parameters in all segments of distributed networks. Live stream monitoring.
Resources
- Elecard Video Quality Estimator for Windows User Guide(PDF,346.28 KB)
- Elecard Video Quality Estimator for Mac User Guide(PDF,1.44 MB)
- Elecard Video Quality Estimator for Linux User Guide(PDF,1.29 MB)
- Command line tool manual
Video Tutorials
Learn more about Video Quality Estimator GUI and functionality
News & Events
Python Psnr
Elecard releases new version of StreamEye Studio v. 4.6
Matlab For Mac Os X
Elecard has implemented support for the new VVC format in the video analysis products that are part of StreamEye Studio set.