ms-vite-plugin 1.4.46 → 1.4.47

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.
@@ -118,7 +118,7 @@ function recognizeAbs(
118
118
  | `y` | number | 否 | 0 | 裁剪区域左上角 y 坐标;全屏识别传 0 |
119
119
  | `ex` | number | 否 | 0 | 裁剪区域右下角 x 坐标;全屏识别传 0;为 0 时使用图像宽度 |
120
120
  | `ey` | number | 否 | 0 | 裁剪区域右下角 y 坐标;全屏识别传 0;为 0 时使用图像高度 |
121
- | `confidenceThreshold` | number | 否 | 0.8 | 相似度下限;`<=0` 时按 `0.8`;低于阈值的字符会被过滤;`>0.95` 时要求像素完全一致 |
121
+ | `confidenceThreshold` | number | 否 | 0.95 | 相似度下限;`<=0` 时按 `0.95`;低于阈值的字符会被过滤;`>0.95` 时要求像素完全一致 |
122
122
 
123
123
  **返回值:**
124
124
 
@@ -129,7 +129,7 @@ function recognizeAbs(
129
129
  **示例:**
130
130
 
131
131
  ```javascript
132
- const chars = dotOcr.recognizeAbs(fontId, "screen", 100, 200, 600, 280, 0.8);
132
+ const chars = dotOcr.recognizeAbs(fontId, "screen", 100, 200, 600, 280, 0.95);
133
133
  logi(`识别数量: ${chars.length}`);
134
134
  if (chars.length > 0) {
135
135
  logi(`文本: ${chars[0].text}, 坐标: (${chars[0].x}, ${chars[0].y})`);
@@ -168,7 +168,7 @@ function findTextAbs(
168
168
  | `y` | number | 否 | 0 | 裁剪区域左上角 y 坐标;全屏识别传 0 |
169
169
  | `ex` | number | 否 | 0 | 裁剪区域右下角 x 坐标;全屏识别传 0;为 0 时使用图像宽度 |
170
170
  | `ey` | number | 否 | 0 | 裁剪区域右下角 y 坐标;全屏识别传 0;为 0 时使用图像高度 |
171
- | `confidenceThreshold` | number | 否 | 0.8 | 单字符识别相似度下限;语义同 `recognizeAbs` |
171
+ | `confidenceThreshold` | number | 否 | 0.95 | 单字符识别相似度下限;语义同 `recognizeAbs` |
172
172
  | `exactMatch` | boolean | 否 | false | `false` 为行内子串包含匹配;`true` 要求某一整行文本完全等于目标字符串 |
173
173
 
174
174
  **返回值:**
@@ -188,7 +188,7 @@ const hits = dotOcr.findTextAbs(
188
188
  200,
189
189
  600,
190
190
  280,
191
- 0.8,
191
+ 0.95,
192
192
  false,
193
193
  );
194
194
  if (hits.length > 0) {
@@ -118,7 +118,7 @@ function 识别绝对坐标(
118
118
  | `上` | 数字 | 否 | 0 | 裁剪区域左上角 y 坐标;全屏识别传 0 |
119
119
  | `右` | 数字 | 否 | 0 | 裁剪区域右下角 x 坐标;全屏识别传 0;为 0 时使用图像宽度 |
120
120
  | `下` | 数字 | 否 | 0 | 裁剪区域右下角 y 坐标;全屏识别传 0;为 0 时使用图像高度 |
121
- | `置信度阈值` | 数字 | 否 | 0.8 | 相似度下限;`<=0` 时按 `0.8`;低于阈值的字符会被过滤;`>0.95` 时要求像素完全一致 |
121
+ | `置信度阈值` | 数字 | 否 | 0.95 | 相似度下限;`<=0` 时按 `0.95`;低于阈值的字符会被过滤;`>0.95` 时要求像素完全一致 |
122
122
 
123
123
  **返回值:**
124
124
 
@@ -129,7 +129,7 @@ function 识别绝对坐标(
129
129
  **示例:**
130
130
 
131
131
  ```javascript
132
- const 结果 = $点阵OCR.识别绝对坐标(字库ID, "screen", 100, 200, 600, 280, 0.8);
132
+ const 结果 = $点阵OCR.识别绝对坐标(字库ID, "screen", 100, 200, 600, 280, 0.95);
133
133
  $打印信息日志(`识别数量: ${结果.length}`);
134
134
  if (结果.length > 0) {
135
135
  $打印信息日志(`文本: ${结果[0].text}, 坐标: (${结果[0].x}, ${结果[0].y})`);
@@ -168,7 +168,7 @@ function 查找文本绝对坐标(
168
168
  | `上` | 数字 | 否 | 0 | 裁剪区域左上角 y 坐标;全屏识别传 0 |
169
169
  | `右` | 数字 | 否 | 0 | 裁剪区域右下角 x 坐标;全屏识别传 0;为 0 时使用图像宽度 |
170
170
  | `下` | 数字 | 否 | 0 | 裁剪区域右下角 y 坐标;全屏识别传 0;为 0 时使用图像高度 |
171
- | `置信度阈值` | 数字 | 否 | 0.8 | 单字符识别相似度下限;语义同 `识别绝对坐标` |
171
+ | `置信度阈值` | 数字 | 否 | 0.95 | 单字符识别相似度下限;语义同 `识别绝对坐标` |
172
172
  | `完整匹配` | 布尔值 | 否 | false | `false` 为行内子串包含匹配;`true` 要求某一整行文本完全等于目标字符串 |
173
173
 
174
174
  **返回值:**
@@ -188,7 +188,7 @@ const 命中 = $点阵OCR.查找文本绝对坐标(
188
188
  200,
189
189
  600,
190
190
  280,
191
- 0.8,
191
+ 0.95,
192
192
  false,
193
193
  );
194
194
  if (命中.length > 0) {
@@ -96,7 +96,7 @@ def recognizeAbs(
96
96
  y: int = 0,
97
97
  ex: int = 0,
98
98
  ey: int = 0,
99
- confidenceThreshold: float = 0.8,
99
+ confidenceThreshold: float = 0.95,
100
100
  ) -> List[OCRChar]
101
101
  ```
102
102
 
@@ -110,7 +110,7 @@ def recognizeAbs(
110
110
  | `y` | int | 否 | 0 | 裁剪区域左上角 y 坐标;全屏识别传 0 |
111
111
  | `ex` | int | 否 | 0 | 裁剪区域右下角 x 坐标;全屏识别传 0;为 0 时使用图像宽度 |
112
112
  | `ey` | int | 否 | 0 | 裁剪区域右下角 y 坐标;全屏识别传 0;为 0 时使用图像高度 |
113
- | `confidenceThreshold` | float | 否 | 0.8 | 相似度下限;`<=0` 时按 `0.8`;低于阈值的字符会被过滤;`>0.95` 时要求像素完全一致 |
113
+ | `confidenceThreshold` | float | 否 | 0.95 | 相似度下限;`<=0` 时按 `0.95`;低于阈值的字符会被过滤;`>0.95` 时要求像素完全一致 |
114
114
 
115
115
  **返回值:**
116
116
 
@@ -121,7 +121,7 @@ def recognizeAbs(
121
121
  **示例:**
122
122
 
123
123
  ```python
124
- chars = dotocr.recognizeAbs(font_id, "screen", 100, 200, 600, 280, 0.8)
124
+ chars = dotocr.recognizeAbs(font_id, "screen", 100, 200, 600, 280, 0.95)
125
125
  print(f"识别数量: {len(chars)}")
126
126
  if chars:
127
127
  print(f"文本: {chars[0].text}, 坐标: ({chars[0].x}, {chars[0].y})")
@@ -143,7 +143,7 @@ def findTextAbs(
143
143
  y: int = 0,
144
144
  ex: int = 0,
145
145
  ey: int = 0,
146
- confidenceThreshold: float = 0.8,
146
+ confidenceThreshold: float = 0.95,
147
147
  exactMatch: bool = False,
148
148
  ) -> List[OCRChar]
149
149
  ```
@@ -159,7 +159,7 @@ def findTextAbs(
159
159
  | `y` | int | 否 | 0 | 裁剪区域左上角 y 坐标;全屏识别传 0 |
160
160
  | `ex` | int | 否 | 0 | 裁剪区域右下角 x 坐标;全屏识别传 0;为 0 时使用图像宽度 |
161
161
  | `ey` | int | 否 | 0 | 裁剪区域右下角 y 坐标;全屏识别传 0;为 0 时使用图像高度 |
162
- | `confidenceThreshold` | float | 否 | 0.8 | 单字符识别相似度下限;语义同 `recognizeAbs` |
162
+ | `confidenceThreshold` | float | 否 | 0.95 | 单字符识别相似度下限;语义同 `recognizeAbs` |
163
163
  | `exactMatch` | bool | 否 | False | `False` 为行内子串包含匹配;`True` 要求某一整行文本完全等于目标字符串 |
164
164
 
165
165
  **返回值:**
@@ -179,7 +179,7 @@ hits = dotocr.findTextAbs(
179
179
  200,
180
180
  600,
181
181
  280,
182
- 0.8,
182
+ 0.95,
183
183
  False,
184
184
  )
185
185
  if hits:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-vite-plugin",
3
- "version": "1.4.46",
3
+ "version": "1.4.47",
4
4
  "type": "commonjs",
5
5
  "license": "MIT",
6
6
  "publishConfig": {