diff --git a/analyze.m b/analyze.m index cdf872f..90a1af4 100644 --- a/analyze.m +++ b/analyze.m @@ -1,6 +1,6 @@ % algorithms to compare -algos = {'rx', 'rxl', 'dwest', 'nswtd', 'mwnswtd', 'pcag', 'mwpcag', 'knna'}; -algos_nice = {'Global RX', 'Local RX', 'DWEST', 'NSWTD', 'MW-NSWTD', 'PCAG', 'MW-PCAG', 'KNN'}; +algos = {'rx', 'rxl', 'dwest', 'nswtd', 'mwnswtd', 'pcag', 'mwpcag', 'pcad', 'knna'}; +algos_nice = {'Global RX', 'Local RX', 'DWEST', 'NSWTD', 'MW-NSWTD', 'PCAG', 'MW-PCAG', 'PCAD', 'KNN'}; % scenes to compare scene_files = dir('scenes/*.jpg'); @@ -62,7 +62,7 @@ % bar plot b = bar(tbl); -ylim([0.65 1.0]); +ylim([0.6 1.0]); ylabel('AUC'); xlabel('Color space'); legend(b, algos, 'Location', 'EastOutside'); diff --git a/mwpcag_block.m b/mwpcag_block.m index 64be95a..b2bae4a 100644 --- a/mwpcag_block.m +++ b/mwpcag_block.m @@ -26,15 +26,15 @@ % largest if fm > bm fm_i = min_size - 1 + fm_i; - ret(s_i(1:fm_i)) = ret(s_i(1:fm_i)) + (fm * p_la(c)); + ret(s_i(1:fm_i)) = ret(s_i(1:fm_i)) + fm; else bm_i = numel(s) - max_size - 1 + bm_i + diff_num; - ret(s_i(bm_i:end)) = ret(s_i(bm_i:end)) + (bm * p_la(c)); + ret(s_i(bm_i:end)) = ret(s_i(bm_i:end)) + bm; end end % normalize % restore shape -px = reshape(ret / sum(p_la), block_size(1), block_size(2)); +px = reshape(ret, block_size(1), block_size(2)); end diff --git a/pcag_block.m b/pcag_block.m index 0f5ceec..70ee4a0 100644 --- a/pcag_block.m +++ b/pcag_block.m @@ -30,15 +30,15 @@ % largest if fm > bm fm_i = min_size - 1 + fm_i; - ret(s_i(1:fm_i)) = ret(s_i(1:fm_i)) + (fm * p_la(c)); + ret(s_i(1:fm_i)) = ret(s_i(1:fm_i)) + fm; else bm_i = numel(s) - max_size - 1 + bm_i + diff_num; - ret(s_i(bm_i:end)) = ret(s_i(bm_i:end)) + (bm * p_la(c)); + ret(s_i(bm_i:end)) = ret(s_i(bm_i:end)) + bm; end end % normalize % restore shape -px = reshape(ret / sum(p_la), block_size(1), block_size(2)); +px = reshape(ret, block_size(1), block_size(2)); end diff --git a/performance.m b/performance.m index 359a25f..ff90c26 100644 --- a/performance.m +++ b/performance.m @@ -1,6 +1,6 @@ % algorithms to performance test -algos = {@RX_global, @rxl, @dwest, @nswtd, @mwnswtd, @pcag, @pcag, @knn}; -algos_nice = {'Global RX', 'Local RX', 'DWEST', 'NSWTD', 'MW-NSWTD', 'PCAG', 'MW-PCAG', 'KNN'}; +algos = {@RX_global, @rxl, @dwest, @nswtd, @mwnswtd, @pcag, @mwpcag, @pcad, @knna}; +algos_nice = {'Global RX', 'Local RX', 'DWEST', 'NSWTD', 'MW-NSWTD', 'PCAG', 'MW-PCAG', 'PCAD', 'KNN'}; % scenes to compare scene_files = {'beach.jpg', 'desert.jpg', 'island.jpg'}; @@ -29,7 +29,7 @@ % bar plot b = bar(tbl); -ylabel('Time (s)'); +ylabel('Average time (s)'); xlabel('Algorithm'); set(gca, 'XTickLabel', algos_nice); title('Execution Time');