function [Matrice_contours,Matrice_contours_couleur] = boundaries( l, c, N, R, k, a) ed = @edginess; cons = @byaverage; n = @norme; moy = @moyenne; for i = 1:l-1 for j = 1:c-1 if R(i,j) > k A(i,j) = 1; C(i,j) = 1; else A(i,j) = 0; C(i,j) = N(i,j); end end end Matrice_contours = A; Matrice_contours_couleur = C; B = ones([l-1 c-1]) - A; %I_edge1 = im2bw(A); if a == 'on' % On affiche l'image %figure, Image_contours = imshow(A); % Ou en noir sur blanc pour imprimer figure, Image_contours = imshow(B); end