%% run on all training images
clear
dr_root='C:\Users\Davis\Google Drive\CS 232\final project';
dr_bod='\training\';
subdr={'00','01','02','03','04','05','06','07','08','09','10','11','12','13','14','15','16','17','18','19'};
cd(dr_root);
svec=zeros(size(subdr));
tvec=zeros(size(subdr));
lvec=zeros(size(subdr));
time=zeros(size(subdr));
for i=1:numel(subdr)
    shred_directory=[dr_root,dr_bod,subdr{i}];
    [order, orientation, time(i), recovered_page] = assemble_shreds(shred_directory);
    figure; imshow(recovered_page)
    cd(dr_root)
    i
    [score, total, longest]=eval_order_v3(order, orientation, [dr_root,'\ground_truth\',subdr{i},'.mat']);
    svec(i)=score; tvec(i)=total; lvec(i)=longest;
end
