-1
A
回答
0
如果您正在寻找完全匹配,那么您只需遍历像素并寻找匹配。该方法与字符串匹配一样简单,只是它是二维的。
当然还有余地一些的优化,但基本上是:
For y = 0 To image.Height - image2.Height - 1
For x = to image.Width - image2.Width - 1
ix = 0
iy = 0
cnt = 0
While iy < image2.Height And ix < image2.Width And image.GetPixel(x + ix, y + iy) = image2.GetPixel(ix, iy) Then
cnt += 1
ix += 1
If ix = image2.Width Then
ix = 0
iy += 1
End If
End While
If cnt = image2.Width * image2.Height Then
Return New Point(x, y)
End If
Next
Next
Return New Point(-1, -1)
相关问题
- 1. 2个图像之间的图像识别vb.net Lockbits
- 2. 图像识别
- 3. 识别图像
- 4. 图像识别
- 5. 识别子图像
- 6. DrawMatching - 图像识别
- 7. 图像识别 - pyautogui
- 8. Android图像识别
- 9. 图像识别库
- 10. 图像识别模式识别
- 11. “识别”命令未识别的图像
- 12. 图像识别(形状识别)
- 13. Tesseract无法识别图像后无法识别图像
- 14. Python - 识别/处理图像
- 15. 图像识别黑莓
- 16. 图像纹理识别C#
- 17. 图像无法识别ios
- 18. android上的图像识别
- 19. Python-OpenCV图像识别
- 20. 图像/场景识别
- 21. 如何识别图像
- 22. 图像识别的起点?
- 23. Python3图像识别错误
- 24. 图像识别软件库?
- 25. Watir:识别图像按钮
- 26. MySQL不识别图像
- 27. javascript图像识别脚本
- 28. Hololens的图像识别
- 29. 图像模式识别
- 30. 在Python中识别图像
几乎所有的东西是可能的;这只是一个努力的问题...... – 2011-03-20 02:11:54