Skip to content
Merged

Dev #171

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion docx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
# [0.43.0](https://github.com/shelllet/winui/compare/main...dev) (2025-04-07)
# [0.44.0](https://github.com/shelllet/winui/compare/main...dev) (2025-05-03)

### Changed:
1. [相机类型](./actions/type/TypeCamera.md) 动作支持工业 USB3/GIGE 接口相机,比如海康相机。
2. 更新 [文字识别](./actions/ai/PaddleOCR.md) 动作,运行加载其它语言模型,用来识别中英文以外的文字。
3. 更新 [文字识别(Tesseract)](./actions/ai/TesseractOCR.md) 动作, 支持基于 *Tesseract* (常用来识别特殊字体)的文字识别。
4. 添加动作菜单*缓存对象*。 用来解决 某些动作反复执行时,由于内置对象的初始化比较耗,导致不必要的时间开销。
5. 动作支持借助脚本更新运行时参数,详情参考动作说明。
6. 修复导入其它流程崩溃问题。
7. 修复 Web 自动化浏览器无正常退出问题。
8. 修复 [图像匹配](./actions/detection/MatchImage.md) 不显示另 `Else` 连接点。
9. 修复 打开流程后,按 *Enter* 键崩溃问题。

### Note

1. 使用管理员权限运行 *小友+*, 无法显示 *动作* 的拖动效果(已知问题)。
2. 64位下载(x64):https://winui.net/_media/simple/小友+0.44.0-setup.x64.exe


## [0.43.0](https://github.com/shelllet/winui/compare/main...dev) (2025-04-07)

### Changed:
1. 增加[图像匹配](./actions/detection/MatchImage.md) 动作。
Expand Down
2 changes: 1 addition & 1 deletion docx/_coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

- Right now support down to build 17763 (version 1809/October 2018 Update) of Windows 10..

[微软商店](https://apps.microsoft.com/store/detail/XP9BRHTXN0Z3V7)
[微软商店](https://apps.microsoft.com/detail/xp9lv7v0p6s74z?hl=en-US&gl=CN)
[下载](https://api.winui.net/simple/v5/download_latest ':id=simple')


20 changes: 17 additions & 3 deletions docx/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,18 @@
- [鼠标/键盘宏录制](./introduction/workflow/record)
- [变量](./introduction/workflow/variable.md)
- [资源](./introduction/workflow/resources.md)
- [动作](./introduction/workflow/action.md)
- [流程操作技巧](./introduction/workflow/skill.md)
- [通配符匹配](./introduction/workflow/wildcard.md)
- [Glob模式匹配](./introduction/workflow/glob.md)
- 其它
- [Glob模式](./introduction/mixed/glob.md)
- [通配符](./introduction/mixed/wildcard.md)
- [Web 定位策略](./introduction/webdriver/locators.md)
- [Tesseract 支持的语言](./introduction/tesseract/Languages_Scripts.md)
- [Tesseract 数据文件](./introduction/tesseract/Data-Files.md)
- [Tesseract 5 的训练](./introduction/tesseract/tesstrain.md)
- [ Windows 系统上安装 CUDA](./introduction/mixed/CUDA.md)
- [cuDNN 和 CUDA 版本对应关系](./introduction/mixed/cuDNN.md)
- [Paddle2ONNX模型转化](./introduction/mixed/paddle2onnx.md)
- [UIAutomatorViewer 工具](./introduction/android/uiautomatorviewer.md)
- [动作](./actions/README.md)
- 系统
Expand Down Expand Up @@ -134,10 +142,11 @@
- 深度学习
- [目标分类](./actions/ai/ImageClassification.md)
- [对象检测](./actions/ai/ObjectDetection.md)
- [文字识别](./actions/ai/ImageOCR.md)
- [文字识别](./actions/ai/PaddleOCR.md)
- [文本块检测](./actions/ai/TextDetection.md)
- [二维码识别](./actions/ai/QRCode.md)
- [条码识别](./actions/ai/BarcodeDetector.md)
- [文字识别(Tesseract)](./actions/ai/TesseractOCR.md)
- 媒体
- [窗口截图](./actions/media/CaptureWindow.md)
- [全屏截图](./actions/media/CaptureFullScreen.md)
Expand Down Expand Up @@ -236,6 +245,7 @@
- [关系运算](./actions/control/RelationalOperator.md)
- [参数](./actions/control/Param.md)
- [分组](./actions/control/GroupAction.md)
- [软触发](./actions/control/SoftwareTrigger.md)
- 算法
- [分割字符串](./actions/algorithm/SplitString.md)
- [合并字符串](./actions/algorithm/JoinString.md)
Expand Down Expand Up @@ -340,4 +350,8 @@
- [WebLocated](./enums/WebLocated.md)
- [ModuleOption](./enums/ModuleOption.md)
- [BARCODE_Encoding](./enums/BARCODE_Encoding.md)
- [PageSegMode](./enums/PageSegMode.md)
- [CameraTriggerActivation](./enums/CameraTriggerActivation.md)
- [CameraTriggerSource](./enums/CameraTriggerSource.md)
- [CameraType](./enums/CameraType.md)
- [Changelog](./CHANGELOG.md)
12 changes: 10 additions & 2 deletions docx/actions/ai/ImageOCR.md → docx/actions/ai/PaddleOCR.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 文字识别
识别图像中的中文/英文文字。

![ImageOCR](./images/03.png ':size=90%')
![PaddleOCR](./images/03.png ':size=90%')

## 子流程
> 不支持
Expand All @@ -20,13 +20,21 @@
* 角度分类器
> 指定是否使用角度分类器,默认识别:0°、90° 、270°。 如果使用,则可识别旋转180°的图片。如果文本没有旋转180°,为了性能,请不要使用该选项。其它文本旋转角度无法准确识别。

* 检测模型
> 检测模型文件,用于非内置语言检测。
* 分类器模型
> 角度分类模型文件,用于非内置语言检测。
* 识别模型
> 识别模型文件,用于非内置语言检测。
* 字典文件
> 字典文件,参考:[Paddle2ONNX模型转化与预测](./introduction/mixed/paddle2onnx.md)。
## 输出

> 识别结果, 参考: [`RecognitionResults`](./types/RecognitionResult.md)。

### 其它

示例 https://github.com/shelllet/WinUi/blob/main/dnn/ImageOCR.simple
示例 https://github.com/shelllet/WinUi/blob/main/dnn/PaddleOCR.simple

<iframe type="text/html" height="640px" src="https://www.youtube.com/embed/-XdfKlw-vgQ" frameborder="0"></iframe>

Expand Down
33 changes: 33 additions & 0 deletions docx/actions/ai/TesseractOCR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# 文字识别(Tesseract)
基于 Tesseract OCR 的一款开源的光学字符识别引擎。能够识别多种语言的文字,包括但不限于英语、中文、法语、德语等。

* 支持多种语言:Tesseract 能够识别多种语言的文字,包括但不限于英语、中文、法语、德语等。通过训练数据的扩展,其语言识别能力还在不断增强。
* 高识别准确率:在经过大量数据训练和优化后,对于清晰的文档图像,Tesseract 可以达到较高的识别准确率。它能够处理多种字体、字号和排版格式的文字,对噪声和图像变形有一定的鲁棒性。
* 可定制性强:用户可以根据自己的需求对 Tesseract 进行定制,例如训练自己的字库模型,以提高对特定领域或特殊字体的识别效果。此外,还可以调*整各种参数来优化识别过程,适应不同的应用场景。

![TesseractOCR](./images/07.png ':size=90%')

## 子流程
> 不支持

## 运行参数

* 图像
> 包含文字的图片。

* 数据文件
> 默认值为 NULL,包含了 **英语**、**中文 - 简体** 和 **中文 - 繁体**。 它指定了 Tesseract 数据文件所在的路径。其它语言需要下载对应的数据文件,参考:[训练数据文件](./introduction/tesseract/Data-Files)。

* 识别语言
> 默认值为 "eng"。它指定了要识别的语言,可以使用 ISO 639-3 语言代码来指定语言,例如 "eng" 表示英语,"chi_sim" 表示简体中文。如果要同时识别多种语言,可以用 "+" 连接不同的语言代码,如 "eng+chi_sim",参考: [Tesseract 支持的语言](./introduction/tesseract/Languages_Scripts)

* 页面分割模式
> 默认值为 `AUTO` 。它指的是页面分割模式(Page Segmentation Mode),决定了 Tesseract 如何对图像中的页面进行分割和识别,例如是按行识别、按单词识别还是按单个字符识别等。参考:[PageSegMode](./enums/PageSegMode.md)。

## 输出

> 识别结果, 参考: [`RecognitionResults`](./types/RecognitionResult.md)。

### 其它

示例 https://github.com/shelllet/WinUi/blob/main/dnn/PaddleOCR.simple
Binary file added docx/actions/ai/images/07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docx/actions/algorithm/FilterText.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
## 运行参数

* 数据
> 含有文本的列表,例如 [*文字识别*](./actions/ai/ImageOCR.md) 动作。
> 含有文本的列表,例如 [*文字识别*](./actions/ai/PaddleOCR.md) 动作。

* 文本
> 文本,*字符串* 类型,参考:[String](./types/String.md), 支持 [*通配符(WildCard)*](./introduction/process/wildcard.md) 匹配。
Expand Down
2 changes: 1 addition & 1 deletion docx/actions/algorithm/JoinString.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 合并字符串
将字符串列表,或者含有字符串的列表(如 [文本检测](./actions/ai/ImageOCR.md)),合并成字符串。
将字符串列表,或者含有字符串的列表(如 [文本检测](./actions/ai/PaddleOCR.md)),合并成字符串。

![JoinString](./images/16.png ':size=90%')

Expand Down
25 changes: 11 additions & 14 deletions docx/actions/cloud/BaiduTranslate.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,30 @@
# 百度翻译
百度翻译

![action](./images/2022-11-17_184608.png ':size=90%')
![BaiduTranslate](./images/01.png ':size=90%')

## 子流程

> 不支持

## 运行参数

* [AppID]():AppID
* [Secret]:Secret
* From:源语言
* To:目标语言
* Text:翻译的文本
* AppID
> AppID
* Secret
> Secret
* 源语言
>
* 目标语言
>
* 文本
> 翻译的文本


## 输出

> 翻译后的文本


## 脚本调用

```python
import simple


```

## 示例

Binary file added docx/actions/cloud/images/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions docx/actions/control/SoftwareTrigger.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 软触发
工业相机的软触发(Software Trigger)是通过软件指令控制图像采集的技术,适用于需要灵活控制采集时机的场景(如机器视觉检测、动态目标捕捉)。如果工业相机设置了软触发模式,该动作可以触发相机拍照。

![SoftwareTrigger](./images/04.png ':size=90%')


## 子流程
> 不支持


## 运行参数


* 对象
> 相机对象,参考:[相机](./actions/type/TypeCamera.md)。


## 输出

> 无。

## 其它

23 changes: 13 additions & 10 deletions docx/actions/type/TypeCamera.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,36 @@
定义相机类型,当前系统必须连接相机设备,且不被占用(USB相机通常已经连接)。工业 *GIGE* 接口的相机需要手动安装相应的驱动程序。

![TypeCamera](./images/15.png ':size=90%')
* 该动作不能获取相机图像,需要配合动作 [相机图像](./actions/media/VideoFrame.md) 获取相机图像。
* 该动作在非触发模式,需要配合动作 [相机图像](./actions/media/VideoFrame.md) 获取相机图像。

## 权限
> 无要求

## 子流程
> 支持。
> 支持。非触发模式相机对象传子流程。触发模式时,相机图像转入子流程。

## 运行参数

* 相机
> 相机索引,默认值:`0`,表示第 `1` 个相机设备。

- 类型
> 相机类型,参考:[CameraType](./enums/CameraType.md)。

## 输出

> 相机对象,参考:[VideoCapture](./types/VideoCapture.md)。
* 触发模式
> 触发模式开关,只支持相机是 GIGE/USB3 工业相机。

* 触发源
> 只支持触发模式打开时设置。参考:[CameraTriggerSource](./enums/CameraTriggerSource.md)。

## 脚本调用

```python
import simple;
* 触发激活方式
> 只支持触发模式打开时设置。参考:[CameraTriggerActivation](./enums/CameraTriggerActivation.md)。


cap = VideoCapture(0)
## 输出

```
> 相机对象,参考:[VideoCapture](./types/VideoCapture.md)。

## 示例

Expand Down
Binary file modified docx/actions/type/images/15.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions docx/enums/CameraTriggerActivation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# CameraTriggerActivation

* RisingEdge
> 上升沿
* FallingEdge
> 下降沿
* LevelHigh

> 高电平

* LevelLow

> 低电平
11 changes: 11 additions & 0 deletions docx/enums/CameraTriggerSource.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# CameraTriggerSource
- Line0
> 非隔离输入(如海康相机)。
- Line1

- Line2

> 可配置为输入/输出的双向I/O(如LEO系列相机)。
- Software

> 通过主机发送软件命令触发拍照,优点是配置灵活,但触发速度和精度低于硬件触发
8 changes: 8 additions & 0 deletions docx/enums/CameraType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# CameraType

- USB2

- USB3
> 常见于工业相机接口
- GIGE
> 常见于工业相机接口
24 changes: 24 additions & 0 deletions docx/enums/PageSegMode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# PageSegMode

* AUTO (3)
> 自动检测页面布局并进行识别。这是最常用的模式之一,Tesseract 会自动分析图像的布局,尝试确定文字的行、段落等结构,然后进行识别。适用于大多数普通文档图像。
* SINGLE_COLUMN (4)
> 假定图像包含一个垂直排列的单列文本。当图像中的文字是以单列形式排列时,使用此模式可以更准确地识别文字,引擎会按照单列文本的结构进行处理。
* SINGLE_BLOCK_VERT_TEXT (5)
> 假定图像包含一个垂直排列的文本块。如果图像中的文字是垂直书写的,并且形成一个整体的文本块,使用该模式可以更好地进行识别。
* SINGLE_BLOCK (6)
> 假定图像包含一个统一的文本块。对于没有明显分行或段落结构的图像,如一些标语、横幅等,使用此模式可以将整个图像作为一个文本块进行识别。
* SINGLE_LINE (7)
> 将图像视为单行文本进行识别。适用于只包含一行文字的图像,如标题、菜单等,引擎会专注于识别这一行文字。
* SINGLE_WORD (8)
> 将图像视为单个单词进行识别。当图像中只包含一个单词时,使用此模式可以提高识别的准确性。
* CIRCLE_WORD (9)
> 将图像视为单个单词,且该单词可能是圆形排列的。对于一些以圆形方式排列的文字,如商标、徽章上的文字,此模式可以更好地进行识别。
* SINGLE_CHAR (10)
> 将图像视为单个字符进行识别。用于识别只包含一个字符的图像,例如验证码中的单个字符。
* SPARSE_TEXT (11)
> 在图像中查找稀疏分布的文本,不进行特定的页面布局分析。当图像中的文字分布比较分散,没有明显的布局结构时,使用此模式可以找出所有的文字。
* SPARSE_TEXT_OSD (12)
> 在图像中查找稀疏分布的文本,并进行方向和脚本检测。结合了方向和脚本检测功能,适用于文字分布稀疏且方向不确定的图像。
* RAW_LINE (13)
> 直接将图像中的像素作为原始文本行进行识别,不进行任何页面分割或预处理。这种模式适用于一些特殊情况,如手写文字或经过特殊处理的图像,引擎会尽量直接识别像素中的文字信息。
Loading