ms-types 0.9.5 → 0.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/types/paddleocr.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* 飞桨OCR模块 包含OCR
|
|
2
|
+
* 飞桨OCR模块 包含OCR识别、可选模型预加载和资源释放等功能
|
|
3
3
|
*/
|
|
4
4
|
declare namespace paddleOcr {
|
|
5
5
|
/**
|
|
@@ -33,15 +33,13 @@ declare namespace paddleOcr {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* 可选预加载 PP-OCRv5 模型。识别和查找方法会自动加载所需模型,通常不需要先调用。
|
|
37
37
|
* @param maxSideLen 最大边长,默认640,可不传
|
|
38
38
|
* @param useGpu 是否使用GPU,默认false,可不传
|
|
39
|
-
* @returns
|
|
39
|
+
* @returns 加载成功或模型已加载返回true
|
|
40
40
|
* @example
|
|
41
|
-
* const
|
|
42
|
-
*
|
|
43
|
-
* logi("加载成功")
|
|
44
|
-
* }
|
|
41
|
+
* const results = paddleOcr.recognizeAbs("screen", 0, 0, 0, 0)
|
|
42
|
+
* logi(`识别数量: ${results.length}`)
|
|
45
43
|
*/
|
|
46
44
|
function loadV5(maxSideLen?: number, useGpu?: boolean): boolean;
|
|
47
45
|
/**
|
package/types/pip.d.ts
CHANGED
|
@@ -33,6 +33,12 @@ declare namespace pip {
|
|
|
33
33
|
* @returns true代表尺寸已提交,false代表当前模式不允许设置或宽高无效
|
|
34
34
|
*/
|
|
35
35
|
function setContentSize(width: number, height: number): boolean;
|
|
36
|
+
/**
|
|
37
|
+
* 设置日志模式显示文本的文字大小
|
|
38
|
+
* @param fontSize 日志字号,必须是有效数字
|
|
39
|
+
* @returns true代表日志文字大小已提交,false代表字号无效
|
|
40
|
+
*/
|
|
41
|
+
function setLogFontSize(fontSize: number): boolean;
|
|
36
42
|
/**
|
|
37
43
|
* 设置自定义模式显示的纯文本
|
|
38
44
|
* @param text 要显示的文本,支持换行
|
package/types/tomatoocr.d.ts
CHANGED
|
@@ -206,4 +206,13 @@ declare namespace tomatoOcr {
|
|
|
206
206
|
* ```
|
|
207
207
|
*/
|
|
208
208
|
function findTapPoints(data: string): string;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 释放 TomatoOCR SDK 已加载的 OCR 模型和内部资源
|
|
212
|
+
* @example
|
|
213
|
+
* ```typescript
|
|
214
|
+
* tomatoOcr.release();
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
function release(): void;
|
|
209
218
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference path="全局模块.d.ts" />
|
|
2
2
|
/**
|
|
3
|
-
* 飞桨OCR模块 包含OCR
|
|
3
|
+
* 飞桨OCR模块 包含OCR识别、可选模型预加载和资源释放等功能
|
|
4
4
|
*/
|
|
5
5
|
declare namespace $PaddleOCR {
|
|
6
6
|
/**
|
|
@@ -34,15 +34,13 @@ declare namespace $PaddleOCR {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* 可选预加载 PP-OCRv5 模型。识别和查找方法会自动加载所需模型,通常不需要先调用。
|
|
38
38
|
* @param 最大边长 最大边长,默认640,可不传
|
|
39
39
|
* @param useGpu 是否使用GPU,默认false,可不传
|
|
40
|
-
* @returns
|
|
40
|
+
* @returns 加载成功或模型已加载返回true
|
|
41
41
|
* @example
|
|
42
|
-
* const
|
|
43
|
-
*
|
|
44
|
-
* $打印信息日志("加载成功")
|
|
45
|
-
* }
|
|
42
|
+
* const 识别结果数组 = $PaddleOCR.识别绝对坐标("screen", 0, 0, 0, 0)
|
|
43
|
+
* $打印信息日志(`识别数量: ${识别结果数组.length}`)
|
|
46
44
|
*/
|
|
47
45
|
function 加载V5模型(最大边长?: 数字, useGpu?: 布尔值): 布尔值;
|
|
48
46
|
/**
|
|
@@ -37,6 +37,12 @@ declare namespace $悬浮窗 {
|
|
|
37
37
|
* @returns true代表尺寸已提交,false代表当前模式不允许设置或宽高无效
|
|
38
38
|
*/
|
|
39
39
|
function 设置内容尺寸(宽度: 数字, 高度: 数字): 布尔值;
|
|
40
|
+
/**
|
|
41
|
+
* 设置日志模式显示文本的文字大小
|
|
42
|
+
* @param 字号 日志字号,必须是有效数字
|
|
43
|
+
* @returns true代表日志文字大小已提交,false代表字号无效
|
|
44
|
+
*/
|
|
45
|
+
function 设置日志文字大小(字号: 数字): 布尔值;
|
|
40
46
|
/**
|
|
41
47
|
* 设置自定义模式显示的纯文本
|
|
42
48
|
* @param 文本 要显示的文本,支持换行
|