查找绑定窗口图片1 - FindWindowsFromPathAll
函数简介
在绑定窗口的指定区域内查找指定图像的所有匹配位置(使用文件路径),模板为图片路径,支持多图。返回全部匹配结果。
返回数据类型解析:
[{
"MatchVal": 0.85,
"MatchState": true,
"Index": 0,
"X": 100,
"Y": 200,
"Width":100,
"Height":100
}, ...]
接口名称
FindWindowsFromPathAll
DLL调用
long FindWindowsFromPathAll(long instance, int x1, int y1, int x2, int y2, string templ, string deltaColor, double matchVal)
参数定义:
instance(长整型数): OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。x1(整型数): 搜索区域左上角X坐标。y1(整型数): 搜索区域左上角Y坐标。x2(整型数): 搜索区域右下角X坐标。y2(整型数): 搜索区域右下角Y坐标。templ(字符串): 模板图片的路径,可以是多个图片,如 "test.bmp|test2.bmp|test3.bmp"。deltaColor(字符串): 颜色差值,格式为"RRGGBB",如"101010"。matchVal(双精度浮点数): 相似度,如0.85,最大为1。
示例:
待补充...
返回值
返回所有匹配结果字符串(JSON 数组)。
注意:
DLL调用返回字符串指针地址,需要调用 FreeStringPtr 接口释放内存。
