Robert Edge Detection With VB.net
If picada = False Then MsgBox("Pilih dulu gambar yang akan diproses", MsgBoxStyle.Critical + MsgBoxStyle.OkOnly, "Error Proses") Exit Sub End If bmap = New Bitmap(picAwal.Image) picAwal.Image = bmap Dim tempbmp As New Bitmap(picAwal.Image) Dim robert As Int64 Dim tempRed(0 To 2000, 0 To 2000) As Int64, tempGreen(0 To 2000, 0 To 2000) _ As Int64, tempBlue(0 To 2000, 0 To 2000) As Int64 Dim i, j, t1, t2, t3, t4, sx, sy As Integer ProgressBar1.Width = picAwal.Width ProgressBar1.Show() With bmap For i = 0 To .Height - 2 For j = 0 To .Width - 2 t1 = CInt((.GetPixel(j, i).R) + CInt(.GetPixel(j, i).G) + CInt(.GetPixel(j, i).B) / 3) t2 = CInt(CInt(.GetPixel(j + 1, i + 1).R) + CInt(.GetPixel(j + 1, i + 1).G) + CInt(.GetPixel(j + 1, i + 1).B) / 3) sx = t1 - t