Skip to content

Commit

Permalink
* update qrcode doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lxowalle committed Oct 28, 2024
1 parent d12df85 commit 80fd6a8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 4 additions & 3 deletions docs/doc/en/vision/qrcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ Steps:

List common parameters and their explanations. If you cannot find parameters that fit your application, consider whether to use a different algorithm or extend the functionality based on the current algorithm's results.

| Parameter | Description | Example |
| --------- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| roi | Sets the rectangular area for the algorithm to compute, where roi=[x, y, w, h], x and y denote the top-left coordinates of the rectangle, and w and h denote the width and height of the rectangle, defaulting to the entire image. | Compute the area with coordinates (50,50) and width and height of 100:<br />`img.find_qrcodes(roi=[50, 50, 100, 100])` |
| Parameter | Description | Example |
| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| roi | Sets the rectangular area for the algorithm to compute, where roi=[x, y, w, h], x and y denote the top-left coordinates of the rectangle, and w and h denote the width and height of the rectangle, defaulting to the entire image. | Compute the area with coordinates (50,50) and width and height of 100:<br />`img.find_qrcodes(roi=[50, 50, 100, 100])` |
| qrcoder_type | Set the QR code library decoder type; you can choose either `image.QRCodeDecoderType.QRCODE_DECODER_TYPE_ZBAR` or `image::QRCodeDecoderType::QRCODE_DECODER_TYPE_QUIRC`. `QRCODE_DECODER_TYPE_ZBAR` offers faster recognition speed and higher accuracy at lower resolutions. `QRCODE_DECODER_TYPE_QUIRC` is relatively faster at higher resolutions but with slightly lower accuracy. By default, `QRCODE_DECODER_TYPE_ZBAR` is used.<br />Effective in version 4.7.7 and later. | img.find_qrcodes(decoder_type=image.QRCodeDecoderType.QRCODE_DECODER_TYPE_ZBAR) |

This article introduces common methods. For more API details, refer to the [image](../../../api/maix/image.md) section of the API documentation.
7 changes: 4 additions & 3 deletions docs/doc/zh/vision/qrcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,10 @@ while 1:

列举常用参数说明,如果没有找到可以实现应用的参数,则需要考虑是否使用其他算法实现,或者基于目前算法的结果扩展所需的功能

| 参数 | 说明 | 示例 |
| ---- | ------------------------------------------------------------ | ------------------------------------------------------------ |
| roi | 设置算法计算的矩形区域,roi=[x, y, w, h],x,y表示矩形区域左上角坐标,w,h表示矩形区域的宽度和高度,默认为整张图片 | 计算坐标为(50,50),宽和高为100的区域<br />```img.find_qrcodes(roi=[50, 50, 100, 100])``` |
| 参数 | 说明 | 示例 |
| ------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
| roi | 设置算法计算的矩形区域,roi=[x, y, w, h],x,y表示矩形区域左上角坐标,w,h表示矩形区域的宽度和高度,默认为整张图片 | 计算坐标为(50,50),宽和高为100的区域<br />```img.find_qrcodes(roi=[50, 50, 100, 100])``` |
| qrcoder_type | 设置二维码库解码器类型,可以选择image.QRCodeDecoderType.QRCODE_DECODER_TYPE_ZBAR或者image::QRCodeDecoderType::QRCODE_DECODER_TYPE_QUIRC. QRCODE_DECODER_TYPE_ZBAR在分辨率较小时识别速度更快,识别精度更高. QRCODE_DECODER_TYPE_QUIRC在分辨率较大时相对速度更快,但识别精度相对较低. 默认使用QRCODE_DECODER_TYPE_ZBAR.<br />v4.7.7及以后的版本有效. | img.find_qrcodes(decoder_type=image.QRCodeDecoderType.QRCODE_DECODER_TYPE_ZBAR) |

本文介绍常用方法,更多 API 请看 API 文档的 [image](../../../api/maix/image.md) 部分。

0 comments on commit 80fd6a8

Please sign in to comment.