function res= binarise( I, s )
[m, n, can] = size(I);      %m=nb lignes, n=nb colonnes, can=nb canaux
	if(can > 1)
	    I = rgb2gray(I);          %dans le cas d'une image couleur, la transformer en NG
    end
    res=zeros(m, n);
    for i=1:m
        for j=1:n
            if (I(i, j) > s)
                 res(i, j) = 1;
            end
        end
    end
end

