MCPcopy Create free account
hub / github.com/HelloBush/Java_MHXYdemo / OcrEx

Method OcrEx

src/pkgDm/Dm2Java.java:2257–2259  ·  view source on GitHub ↗

识别屏幕范围(x1,y1,x2,y2)内符合color_format的字符串,并且相似度为sim,sim取值范围(0.1-1.0), 这个值越大越精确,越大速度越快,越小速度越慢,请斟酌使用! 这个函数可以返回识别到的字符串,以及每个字符的坐标. @param x1 左上角X坐标 @param y1 左上角Y坐标 @param x2 右下角X坐标 @param y2 右下角Y坐标 @param color_format 颜色格式串. 可以包含换行分隔符,语法是","后加分割字符串. 具体可以查看下面的示例.注意,RGB和HSV格式都支持. @param sim 相似度,取值

(int x1,int y1,int x2,int y2,String color_format,double sim)

Source from the content-addressed store, hash-verified

2255 * @return 返回识别到的字符串 格式如 "识别到的信息|x0,y0|…|xn,yn"
2256 */
2257 public String OcrEx(int x1,int y1,int x2,int y2,String color_format,double sim){
2258 return Dispatch.call(dm,"OcrEx",x1,y1,x2,y2,color_format,sim).getString();
2259 }
2260
2261 /**
2262 * 识别位图中区域(x1,y1,x2,y2)的文字

Callers

nothing calls this directly

Calls 2

callMethod · 0.95
getStringMethod · 0.45

Tested by

no test coverage detected