查找文字返回全部结果 - FindStrFromPtrAll
函数简介
查找文字返回全部结果。
返回数据类型解析:
[{
"MatchVal": 0.85,//数据相似度
"MatchState": true,//返回数据是否大于指定精度,用于快速判断识别结果
"Index": 0,//多图识别时的返回索引
"Angle": 45.0,//识别结果角度
"MatchPoint": {
"x": 100,//识别结果X坐标
"y": 200//识别结果Y坐标
}
}]
接口名称
FindStrFromPtrAll
DLL调用
long FindStrFromPtrAll(long instance, long source, string str, string colorJson,string dict,double matchVal)
参数说明
参数名 | 类型 | 说明 |
---|---|---|
instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
source | 长整数型 | 图片 |
str | 字符串 | 查找字符串 |
colorJson | 字符串 | 颜色列表的JSON字符串,格式如:[{"StartColor": "3278FA", "EndColor": "6496FF", "Type": 0}, {"StartColor": "3278FA", "EndColor": "6496FF", "Type": 1}] |
dict | 字符串 | 字库名称 |
matchVal | 双精度浮点数 | 匹配值 |
示例
// 示例代码待补充
返回值
查找到的全部结果(格式为二进制字符串指针)
返回匹配结果,如
[{
"MatchVal": 0.85,
"MatchState": true,
"Index": 0,
"Angle": 45.0,
"MatchPoint": {
"x": 100,
"y": 200
}
},
{
"MatchVal": 0.85,
"MatchState": true,
"Index": 0,
"Angle": 45.0,
"MatchPoint": {
"x": 100,
"y": 200
}
}
]
注意:
- DLL调用返回字符串指针地址,需要调用 FreeStringPtr 接口释放内存