我试图检查另一个图像中是否存在图像的一部分
说明:
完整图像:
http :
//imageshack.us/photo/my-images/526/part1g.png/
图像的第二部分,我想检查他是否存在于完整的图像:
http
:
//imageshack.us/photo/my-images/706/part2p.png/
如果第二部分是存在,那么函数返回true
有一个可以检查它是否存在的函数?
(如果它只是单像素然后它很容易,但我想检查图像中是否存在部分图像)
有一个有效的代码,但它会检查图像中是否存在单个像素:
Dim bmp As Bitmap = PictureBox1.Image
For x As Integer = 0 To bmp.Width - 1
For y As Integer = 0 To bmp.Height - 1
If bmp.GetPixel(x, y) = Color.FromArgb(48, 48, 48) Then
msgbox("Pixel Exist In Image!!!")
End If
Next
Next
Run Code Online (Sandbox Code Playgroud)