salut j'ai commencer par calculer la moyenne d'une image et l’Écart type pour la segmenter mais le code suivant me renvoie toujours un 0 a la fin aidez moi j'ai tout essayer mais sa marche pas
le code est:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 moyenneimg = 0
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 function [ output_args ] = Untitled3( input_args ) S=0; nbr=0; image=imread('2.jpg') width=size(image,1) height=size(image,2) for i=1:width-1 for j=1:height-1 if image(i,j)~= 255 S = S+ image(i,j) end nbr=nbr+1 end moyenneimg = S/nbr end end
Partager