Skip to content

Commit

Permalink
Add bar plot to analyze script.
Browse files Browse the repository at this point in the history
Fix in run script (not using PCAG).
Fix in run (closing parallel pool twice).
  • Loading branch information
nathanntg committed Apr 7, 2015
1 parent e537ad4 commit cc9cfa3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
*.tiff
*.mat
roc
scenes
anomalies
*.jpg
12 changes: 11 additions & 1 deletion analyze.m
Original file line number Diff line number Diff line change
Expand Up @@ -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'};
Expand Down Expand Up @@ -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');
2 changes: 0 additions & 2 deletions run.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,3 @@
parfor i = 1:length(scene_files)
run_script(scene_files{i});
end

delete(gcp);
2 changes: 1 addition & 1 deletion run_script.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc9cfa3

Please sign in to comment.