1 % =================================================================
\r
2 % Sparse Feature Fidelity (SFF)
\r
4 % Copyright(c) 2013 Hua-wen Chang
\r
5 % All Rights Reserved.
\r
6 % ----------------------------------------------------------------------
\r
7 % Please refer to the following paper
\r
9 % Hua-wen Chang, Hua Yang, Yong Gan, and Ming-hui Wang, "Sparse Feature Fidelity
\r
10 % for Perceptual Image Quality Assessment", IEEE Transactions on Image Processing,
\r
11 % vol. 22, no. 10, pp. 4007-4018, October 2013
\r
12 % ----------------------------------------------------------------------
\r
13 % =================================================================
\r
14 function [OB,metrics] = CSIQ()
\r
16 load('CSIQ.mat'); % load database information and DMOS data
\r
17 load('W.mat'); % load the feature detector, W
\r
19 Score = zeros(866,1);
\r
20 h = waitbar(0,'Please wait...');
\r
22 %READ A REFERENCE IMAGE
\r
23 Ir = imread(['D:\IMDB\CSIQ\src_imgs\' csiq_imTitle{iPoint,2} '.png']);
\r
24 %READ A DISTORTED IMAGE
\r
25 Id = imread(['D:\IMDB\CSIQ\dst_imgs\' csiq_imTitle{iPoint,1} '\' csiq_imTitle{iPoint,2} '.' csiq_imTitle{iPoint,1} '.' num2str(csiq_imDMOS(iPoint,1)) '.png']);
\r
27 Score(iPoint) = SFF(Ir,Id,W);
\r
28 waitbar(iPoint/866);
\r
32 SB = csiq_imDMOS(:,2); % Subjective Score
\r
33 OB = Score; % Objective Score
\r
35 metric_1 = corr(SB, OB, 'type', 'pearson'); % Pearson linear correlation coefficient (without mapping)
\r
36 metric_2 = corr(SB, OB, 'type', 'spearman'); % Spearman rank-order correlation coefficient
\r
37 metric_3 = corr(SB, OB, 'type', 'kendall'); % Kendall rank-order correlation coefficient
\r
38 metrics = [metric_1;metric_2;metric_3];
\r
39 figure,scatter(OB,SB,'*');
\r