From 8354a06d09c33514e5d315ac207634d95e8a6c00 Mon Sep 17 00:00:00 2001 From: dberga Date: Wed, 25 Nov 2015 17:41:23 +0100 Subject: [PATCH 1/2] Fixed problem in EMD: when energy is too big, as im1 and im2 are integers, when dividing by a big number we get values rounded to 0. Casts set before energy calls to avoid 0 values on P,Q. Therefore to avoid the 0 score issue --- code_forMetrics/EMD.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code_forMetrics/EMD.m b/code_forMetrics/EMD.m index 6842eb6..adb5935 100755 --- a/code_forMetrics/EMD.m +++ b/code_forMetrics/EMD.m @@ -25,8 +25,8 @@ if nargin < 4, downsize = 32; end % reduce image size for efficiency of calculations -im1 = imresize(fixationMap, 1/downsize); -im2 = imresize(saliencyMap, size(im1)); +im1 = double(imresize(fixationMap, 1/downsize)); +im2 = double(imresize(saliencyMap, size(im1))); [R,C]= size(im1); % Making sure mass sums to 1. From 8f163ea9299238913a34f4a71a4146952fb5b0b4 Mon Sep 17 00:00:00 2001 From: dberga Date: Mon, 26 Oct 2015 17:10:08 +0100 Subject: [PATCH 2/2] Fixed error in AUC_Judd: Integers can only be combined with integers of the same class, or scalar doubles --- code_forMetrics/AUC_Judd.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_forMetrics/AUC_Judd.m b/code_forMetrics/AUC_Judd.m index 0857d3f..a275e58 100644 --- a/code_forMetrics/AUC_Judd.m +++ b/code_forMetrics/AUC_Judd.m @@ -41,7 +41,7 @@ % in the small values! if jitter % jitter the saliency map slightly to distrupt ties of the same numbers - saliencyMap = saliencyMap+rand(size(saliencyMap))/10000000; + saliencyMap = double(saliencyMap)+rand(size(saliencyMap))/10000000; end % normalize saliency map