26.06.2013 Views

Étude des propriétés hydriques et des mécanismes d ... - sacre

Étude des propriétés hydriques et des mécanismes d ... - sacre

Étude des propriétés hydriques et des mécanismes d ... - sacre

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Annexes<br />

For i = 1 To (InfoBMP.biWidth * 3) Step 3<br />

G<strong>et</strong> #1, IndexLecture + i, Pix<br />

Image(i, Indexy) = Pix.Rouge<br />

Image(i + 1, Indexy) = Pix.Vert<br />

Image(i + 2, Indexy) = Pix.Bleu<br />

Next i<br />

If Indexy = 1 Then<br />

Exit Do<br />

Else<br />

Indexy = Indexy - 1<br />

End If<br />

IndexLecture = IndexLecture + (InfoBMP.biWidth * 3) + (InfoBMP.biWidth Mod 4) 'on considere<br />

seulement le 24 Bit > 3*oct<strong>et</strong><br />

Loop<br />

indexligne = 1<br />

total = 0<br />

moyenneligne = 0<br />

nbpix = Cells(2, 6)<br />

nbpixvu = 0<br />

For j = 1 To InfoBMP.biHeight<br />

For i = 1 To LongueurLigne Step 3<br />

If SeuillageBinaire(Image(i, j), ValSeuilR) = 255 And _<br />

SeuillageBinaire(Image(i + 1, j), ValSeuilV) = 255 And _<br />

SeuillageBinaire(Image(i + 2, j), ValSeuilB) = 255 Then<br />

'Cells(indexligne, 1) = (InfoBMP.biWidth * 3) + 1 - i<br />

'Cells(indexligne, 2) = j<br />

'indexligne = indexligne + 1<br />

total = total + 1<br />

End If<br />

Next i<br />

nbpixvu = nbpixvu + 1<br />

If nbpixvu = nbpix Then<br />

Cells(indexligne, 1) = total<br />

Cells(indexligne, 2) = total / nbpix<br />

'Cells(indexligne, 2) = j<br />

indexligne = indexligne + 1<br />

total = 0<br />

nbpixvu = 0<br />

End If<br />

Next j<br />

Close #1<br />

End If<br />

End Sub<br />

Kévin Beck (2006) 225

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!