explique ceci :
- 0 = pixel different à 60% de difference
- 1 = pixel identique à 10% prés
- 0.5 = pixel semblable à au moins 60 %
en termes/correspondances techniques. Ce sera un bon début, déjà (et te permettra d'y voir plus clair)
Deplus, la couleur du pixel a 3 composantes, pourquoi alors le tableau ne peut-il en stocker qu'une ?
là je comprends pas non plus car readbitmapIntoArray ne doit pas faire la meme chose que imagescan.GetPixel
Dim mybitmap As New Bitmap(Application.StartupPath & "\image1.jpg") tablepixel = readbitmapIntoArray(mybitmap) ListBox1.Items.Clear() For iterrow = 0 To tablepixel.GetLength(0) - 1 For itercol = 0 To tablepixel.GetLength(1) - 1 ListBox1.Items.Add("row " & iterrow.ToString & "col " & itercol.ToString & " R = " & tablepixel(iterrow, itercol).R.ToString & " G = " & tablepixel(iterrow, itercol).G.ToString & " B = " & tablepixel(iterrow, itercol).B.ToString) Next Next
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionPublic Class Form1 Dim MonImage As Bitmap Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim TailleX As Integer, TailleY As Integer MonImage = New Bitmap("C:\Users\Utilisateur\Documents\PERSO\Images Test VB\Mini_image_01.bmp") TailleX = MonImage.Width TailleY = MonImage.Height PBox1.Size = New Size(TailleX, TailleY) PBox1.Image = MonImage Call ScanPixel() End Sub Private Sub ScanPixel() Dim Val_R As Integer, Val_G As Integer, Val_B As Integer Dim TablePixel(1, 1) As Drawing.Color TablePixel(1, 1) = MonImage.GetPixel(1, 1) Val_R = TablePixel(1, 1).R.ToString Val_G = TablePixel(1, 1).G.ToString Val_B = TablePixel(1, 1).B.ToString Lbl_X.Text = CStr(1) Lbl_Y.Text = CStr(1) Lbl_R.Text = CStr(Val_R) Lbl_G.Text = CStr(Val_G) Lbl_B.Text = CStr(Val_B) End Sub End Class