在较大的图像中查找较小的图像 [英] Finding a smaller image inside a larger image
问题描述
我一直在寻找一种方法,可以在较大图像(裁剪的屏幕截图)中定位较小图像的X和Y位置(仅当较小图像存在时,有时不存在),我找到了一些解决方案但是我无法让他们中的任何一个按照我需要的方式工作
这是我的大图
http://imageshack.us/photo/my- images/21/canchk.png/
这是我的小图片
http://imageshack.us/photo/my- images/842/mycan.png/
基本上我需要一个可以像这样调用的方法
findImagePos(SmallImage,LargeImage,X_array_varible,Y_array_varible,number_of_images_found_varible)
如果找不到图像,则number_of_images_found_varible将为0
否则number_of_images_found_varible将等于找到了多少张图像
和X_array_varible [0]将位于找到的第一个图像的X位置
和Y_array_varible [0]将位于找到的第一个图像的Y位置
等....
感谢您的帮助
Hi, I have been searching for a method that can locate the X and Y position of a smaller image inside a larger image (cropped screenshot) (only if the smaller image exists, sometimes it doesnt), i have found some solutions but i couldnt get any of them to work the way i needed
this is the my larger image
http://imageshack.us/photo/my-images/21/canchk.png/
and this is my smaller image
http://imageshack.us/photo/my-images/842/mycan.png/
Basically i need a method that i can call like this
findImagePos(SmallImage,LargeImage,X_array_varible, Y_array_varible, number_of_images_found_varible)
if no image is found then the number_of_images_found_varible would be 0
else number_of_images_found_varible would equal how many images where found
and X_array_varible[0] would have the X position of the first found image
and Y_array_varible[0] would have the Y position of the first found image
etc....
Thanks for any help
推荐答案
我认为AForge可以为您提供帮助,请在此处
I think that AForge can help you, look here Template matching
您是指缩略图吗?
在这种情况下,这里的链接可以为您提供帮助:
创建缩略图
You mean thumbnail image ?
In this case here a link that can help you :
create thumbnail
这篇关于在较大的图像中查找较小的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!