
%Sarah Meshreqy
%This function gives the total number of corvers in the data set using the tree =9 and the segment criterion and the
%misclassified pixels and the error
function [total_dt,total_st,misclassified,error] = segmentVsTree(cornerMap_dt,cornerMap_st)
total_dt=0;
total_st=0;
difference=cell(1,length(dataset));
absValues=cell(1,length(dataset));
misclassified=0;
totalPixels=0;
for i=1:length(dataset)
total_dt=total_dt_junk+sum(sum(cornerMap_dt{i}));
    
total_st=total_st_junk+sum(sum(cornerMap_st{i}));    

difference{i}= cornerMap_dt{i}-cornerMap_st{i};

absValues{i}=abs(difference{i});

misclassified=misclassified+(sum(sum(absValues{i})));

end 
totalPixels=(length(dataset))*768*576;
error= misclassified/totalPixels;
end


