%% Compare results

clear all;close all;clc
addpath export_fig

hog32 = dlmread('pedestrian_rgb_root/pedestrian_detection.txt');
hog32x2 = dlmread('pedestrian_rgbd_root/pedestrian_detection.txt');

recall = hog32(:,1);

hog32_precision_easy = hog32(:,2);
hog32_precision_medium = hog32(:,3);
hog32_precision_hard = hog32(:,4);

hog32x2_precision_easy = hog32x2(:,2);
hog32x2_precision_medium = hog32x2(:,3);
hog32x2_precision_hard = hog32x2(:,4);

%%
close all

figure('color',[1 1 1],'position',[100 100 700 600]);
set(gca, 'LooseInset', get(gca,'TightInset'))


hold on

plot(recall,hog32x2_precision_easy,'color',[1 0 0],'linewidth',2)
plot(recall,hog32x2_precision_medium,'color',[1 .4 .0],'linewidth',2)
plot(recall,hog32x2_precision_hard,'color',[1 .6 .0],'linewidth',2)

plot(recall,hog32_precision_easy,'color',[0 0 1],'linewidth',2)
plot(recall,hog32_precision_medium,'color',[0 .4 1],'linewidth',2)
plot(recall,hog32_precision_hard,'color',[0 .6 1],'linewidth',2)


h=legend('32x2HOG easy','32x2HOG medium','32x2HOG hard','32HOG easy','32HOG medium','32HOG hard');
set(h,'box','off')

title('Comparision 32HOG RGB with 32x2 HOG RGBD, root filters only','fontsize',14)
xlabel('recall')
ylabel('precision')
box off

export_fig 'pedestrian_rgb_rgbd_comparision.pdf' -pdf

% plot(recall,hog32_precision_medium,'g')

% plot(recall,hog32_precision_hard,'b')