function [H] = Histo(I);
     [nblig,nbcol] = size(I);
     H = zeros(1,256);
     for lig = 1 : nblig
          for col = 1 : nbcol
               ng = double(I(lig,col) + 1);
               H(ng) = H(ng) + 1;
          end;
     end;
endfunction;


function [] = Graf(I);
			H = Histo (I);
			plot(H);
			min(I);
			max(I);
endfunction;



function [S]  = Seuil(I,n);
				for i = n : 1
							S=I(if I==(255*i)
