function [marking_result,link_result,final_result] = top(image1)

accuracy = 3;
link_result = zeros(8,50);
final_result = zeros(50,6,8);

temp = region(round(image1/2^(9-accuracy)));

for k=0:2^accuracy-1
   k
   marking_result(:,:,k+1) = marking(seg(temp,k));
   link_r = link(marking_result(:,:,k+1));
   [a b] = size(link_r);
   link_result(k+1,1:b) = link_r;
   final_r = featuremap(marking_result(:,:,k+1),link_r);
   [c d] = size(final_r);
   final_result(1:c,1:d,k+1) = final_r; 
end



