From cc9cfa30537827f35cac39fe248723f7e1667003 Mon Sep 17 00:00:00 2001 From: Nathan Perkins Date: Tue, 7 Apr 2015 09:14:45 -0400 Subject: [PATCH] Add bar plot to analyze script. Fix in run script (not using PCAG). Fix in run (closing parallel pool twice). --- .gitignore | 4 ++++ analyze.m | 12 +++++++++++- run.m | 2 -- run_script.m | 2 +- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2fe6a26..777099b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ *.tiff *.mat +roc +scenes +anomalies +*.jpg diff --git a/analyze.m b/analyze.m index 0d915e4..0f2bb96 100644 --- a/analyze.m +++ b/analyze.m @@ -5,7 +5,7 @@ % scenes to compare scene_files = dir('scenes/*.jpg'); scene_files = {scene_files.name}; -scene_files = {'beach.jpg', 'beach2.jpg', 'desert.jpg', 'desert2.jpg'}; +% scene_files = {'beach.jpg', 'desert.jpg', 'island.jpg'}; % color spaces to compare color_spaces = {'RGB', 'L*a*b', 'u''v''L', 'uvL', 'xyY', 'XYZ', '*a*b', 'u''v''', 'uv', 'xy', 'XZ', 'log(L)*a*b'}; @@ -59,3 +59,13 @@ tbl(i, j) = auc; end end + +% bar plot +b = bar(tbl); +ylim([0.85 1.0]); +ylabel('AUC'); +xlabel('Color space'); +legend(b, algos, 'Location', 'EastOutside'); +set(gca, 'XTickLabel', color_spaces); +title('Comparative Performance'); +print(gcf, 'bar.png', '-dpng', '-r300'); \ No newline at end of file diff --git a/run.m b/run.m index da33aec..50f407c 100644 --- a/run.m +++ b/run.m @@ -9,5 +9,3 @@ parfor i = 1:length(scene_files) run_script(scene_files{i}); end - -delete(gcp); \ No newline at end of file diff --git a/run_script.m b/run_script.m index 81f6185..b88c3bc 100644 --- a/run_script.m +++ b/run_script.m @@ -72,7 +72,7 @@ function run_script(scene_file) % PCAG fname = sprintf('output/%s-%d-pcag.mat', scene_file, j); if ~exist(fname, 'file') - img_pcag = mwnswtd(img); + img_pcag = pcag(img); save(fname, 'img_pcag'); end end