对比多色点 - CmpMultiColorPtr
函数简介
在指定图片中对比多色点,检查指定的点阵颜色列表是否与图片中的颜色匹配。
接口名称
CmpMultiColorPtr
DLL调用
int CmpMultiColorPtr(long ola, long image, string pointJson, double sim);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| ola | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| image | 长整数型 | 图像句柄,OLAImage对象的地址 |
| pointJson | 字符串 | 点阵颜色列表,支持JSON格式或简化字符串格式,详见 点阵颜色列表格式说明 |
| sim | 双精度浮点数 | 相似度阈值,范围 0 ~ 1.0,默认 1.0 |
示例
int result = CmpMultiColorPtr(ola, image, "10|5|00ff00,20|10|0000ff", 0.9);
if (result == 1) {
// 找到符合条件的颜色点
}
返回值
整数型:1 成功,0 失败。
