至於除了其他的答案,我會說,你的情況:
圖像的大小大約是1600x1000像素模板的尺寸約爲60×60像素
這個框架是不是最合適的。你試圖實現的是更多的搜索圖像在其他圖像,比比較兩個不同分辨率的圖像(如「搜索谷歌這個圖像」可以使用)。
關於本這樣
稱爲金字塔搜索。
確實,該算法的工作方式更快爲更大圖像。其實image-pyramid是基於template matching。如果我們把最流行的實現(我發現和使用):
private static bool IsSearchedImageFound(this Bitmap template, Bitmap image)
{
const Int32 divisor = 4;
const Int32 epsilon = 10;
ExhaustiveTemplateMatching etm = new ExhaustiveTemplateMatching(0.90f);
TemplateMatch[] tm = etm.ProcessImage(
new ResizeNearestNeighbor(template.Width/divisor, template.Height/divisor).Apply(template),
new ResizeNearestNeighbor(image.Width/divisor, image.Height/divisor).Apply(image)
);
if (tm.Length == 1)
{
Rectangle tempRect = tm[0].Rectangle;
if (Math.Abs(image.Width/divisor - tempRect.Width) < epsilon
&&
Math.Abs(image.Height/divisor - tempRect.Height) < epsilon)
{
return true;
}
}
return false;
}
應該關閉給你一個圖片這一個:
![page pyramid](https://i.stack.imgur.com/FtcvR.jpg)
作爲底線 - 嘗試用不同的方法。也許接近Sikuliintegration與.Net。或者你可以試試accord .Net更新版本的AForge。
如果這是太多的工作,你可以嘗試擴展你的屏幕截圖功能,裁剪所需的頁面元素(Selenium example)。