%Sarah Meshreqy
%This script computes the accuracy for every data set.
total_dt_junk=0;
total_st_junk=0;
difference_junk=cell(1,8);
junk_abs=cell(1,8);
junk_sum=0;
for i=1:8
total_dt_junk=total_dt_junk+sum(sum(cornerMap_dt_nms_junk{i}));
    
total_st_junk=total_st_junk+sum(sum(cornerMap_st_junk{i}));    

difference_junk{i}= cornerMap_dt_nms_junk{i}-cornerMap_st_junk{i};

junk_abs{i}=abs(difference_junk{i});

junk_sum=junk_sum+(sum(sum(junk_abs{i})));

end



total_dt_box=0;
total_st_box=0;
difference_box=cell(1,14);
box_abs=cell(1,14);
box_sum=0;
for i=1:14
total_dt_box=total_dt_box+sum(sum(cornerMap_dt_nms_box{i}));
    
total_st_box=total_st_box+sum(sum(cornerMap_st_box{i}));    

difference_box{i}= cornerMap_dt_nms_box{i}-cornerMap_st_box{i};

box_abs{i}=abs(difference_box{i});

box_sum=box_sum+(sum(sum(box_abs{i})));

end


total_dt_maze=0;
total_st_maze=0;
difference_maze=cell(1,15);
maze_abs=cell(1,15);
maze_sum=0;
for i=1:15
total_dt_maze=total_dt_maze+sum(sum(cornerMap_dt_nms_maze{i}));
    
total_st_maze=total_st_maze+sum(sum(cornerMap_st_maze{i}));    

difference_maze{i}= cornerMap_dt_nms_maze{i}-cornerMap_st_maze{i};

maze_abs{i}=abs(difference_maze{i});

maze_sum=maze_sum+(sum(sum(maze_abs{i})));

end