|
5精币
|
区域找图 | 逻辑型 | | |
盒子ID | 文本型 | | | | 左X | 整数型 | | | | 左Y | 整数型 | | | | 右X | 整数型 | | | | 右Y | 整数型 | | | | 图片路径 | 文本型 | | | | 精度 | 双精度小数型 | | | | 反回X | 整数型 | | | | 反回Y | 整数型 | | | |
变量名 | 类 型 | 静态 | 数组 | 备 注 | 文件返回 | 文本型 | | | 数据 | 文本型 | | | js | 类_json | | | 坐标 | 文本型 | | | 分割坐标 | 文本型 | | 0 | i | 整数型 | | | 盒子标号 | 文本型 | | | 端口 | 文本型 | | |
盒子标号 = 文本区分_只取字母 (盒子ID, 2 ) 判断 (盒子标号 = “A”)  端口 = “20” + 文本_删左边 (盒子ID, 1 )    js. 置属性 (“lujing”, 图片路径 )js. 置属性 (“quyu”, 到文本 (左X ) + “,” + 到文本 (左Y ) + “,” + 到文本 (右X ) + “,” + 到文本 (右Y )) js. 置属性数值 (“threshold”, 精度 ) 数据 = js. 取数据文本 () 文件返回 = 网页_访问S (“http://127.0.0.1:” + 端口 + “/cv/findpic2”, 1, 数据, , , “Content-Type: application/json”, , , , , , , , , , , , , , , )js. 解析 (文件返回 )坐标 = js. 取通用属性 (“result”, ) 如果 (坐标 ≠ “”) 分割坐标 = 分割文本 (坐标, “,”, ) 计次循环首 (取数组成员数 (分割坐标 ), i )  反回X = 到整数 (分割坐标 [1 ]) + 左X   反回Y = 到整数 (分割坐标 [2 ]) + 左Y  计次循环尾 () 返回 (真)   反回X = -1  反回Y = -1 返回 (假)
|
最佳答案
查看完整内容
[e=0].版本 2
.子程序 区域找图, 整数型, 公开, 为真返回1,假返回0
.参数 盒子ID, 文本型, , 盒子ID,文本型
.参数 左X, 整数型
.参数 左Y, 整数型
.参数 右X, 整数型
.参数 右Y, 整数型
.参数 图片路径, 文本型, , 绝对路径如“D:/111.bmp”
.参数 精度, 双精度小数型, , 精确度,越大越精确
.参数 反回X, 整数型, 参考
.参数 反回Y, 整数型, 参考
.局部变量 文件返回, 文本型
.局部变量 数据, 文本型
.局部变量 js, 类_json
.局 ...
|