Skip to content

Commit 16bdd5b

Browse files
Merge pull request #59 from dynamsoft-docs/preview
Preview
2 parents 8ee8ca3 + f2429d4 commit 16bdd5b

File tree

6 files changed

+74
-0
lines changed

6 files changed

+74
-0
lines changed

_data/product_version.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ useGroupedVersion: true
22

33
version_info_list_desktop:
44
- value: latest version
5+
- value: 2.x
6+
child:
7+
- 2.4.2000_python
58

assets/js/dcvServerVersionSearch.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
[
2+
{
3+
"version": "2.4.2100",
4+
"matchVersion": {
5+
"python": "10.4.2100"
6+
}
7+
},
28
{
39
"version": "2.4.2000",
410
"matchVersion": {
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
layout: default-layout
3+
title: CaptureVisionRouter Single-File Processing Methods - Dynamsoft Capture Vision Router Module Python Edition API Reference
4+
description: Definition of CaptureVisionRouter class Single-File Processing Methods in Dynamsoft Capture Vision Router Module Python Edition.
5+
keywords: capture vision, capture, image processing, api reference, python, single-file
6+
needAutoGenerateSidebar: true
7+
needGenerateH3Content: false
8+
---
9+
10+
# Single-File Processing Methods - CaptureVisionRouter Class
11+
12+
| Method | Description |
13+
| --------------------- | --------------------------------------------------------- |
14+
| [`capture`](#capture) | Process an image or file to derive important information. |
15+
16+
## capture
17+
18+
Process an image or file to derive important information. It can optionally use a specified template for the capture.
19+
20+
```python
21+
def capture(self, *args) -> CapturedResult:
22+
```
23+
24+
**Parameters**
25+
26+
`args` <*tuple*>: A variable-length argument list. Can be one of the following:
27+
28+
- `file_path` <*str*>, `template_name` <*str*, optional>: Specifies the path of the file to process and a `CaptureVisionTemplate` to use for capturing.
29+
- `file_bytes` <*bytes*>, `template_name` <*str*, optional>: Specifies the image file bytes in memory to process and a `CaptureVisionTemplate` to use for capturing.
30+
- `image_data` <*ImageData*>, `template_name` <*str*, optional>: Specifies the image data to process and a `CaptureVisionTemplate` to use for capturing.
31+
32+
**Remarks**
33+
34+
- There are two types of `CaptureVisionTemplate`: the [preset ones]({{ site.dcvb_enumerations }}capture-vision-router/preset-template.html) which come with the SDK and the custom ones that get initialized when the user calls [InitSettings]({{ site.dcvb_python_api }}capture-vision-router/settings.html#initsettings) / [InitSettingsFromFile]({{ site.dcvb_python_api }}capture-vision-router/settings.html#initsettingsfromfile).
35+
- Please be aware that the preset `CaptureVisionTemplates` will be overwritten should the user call `InitSettings` / `InitSettingsFromFile` and pass his own settings.
36+
- If parameter `template_name` is not specified, the preset one named 'Default' will be used. However, if the preset ones have been overwritten as described above, the first `CaptureVisionTemplate` from the user's own settings will be used instead.
37+
38+
**Return Value**
39+
40+
Returns a `CapturedResult` object containing the captured items.
41+
42+
**See Also**
43+
44+
[ImageData]({{ site.dcvb_python_api }}core/basic-classes/image-data.html)
45+
46+
[CapturedResult]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result.html)

programming/python/api-reference/capture-vision-router/single-file-processing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def capture(self, *args) -> CapturedResult:
2828
- `file_path` <*str*>, `template_name` <*str*, optional>: Specifies the path of the file to process and a `CaptureVisionTemplate` to use for capturing.
2929
- `file_bytes` <*bytes*>, `template_name` <*str*, optional>: Specifies the image file bytes in memory to process and a `CaptureVisionTemplate` to use for capturing.
3030
- `image_data` <*ImageData*>, `template_name` <*str*, optional>: Specifies the image data to process and a `CaptureVisionTemplate` to use for capturing.
31+
- `image` <*numpy.ndarray*>, `image_pixel_format` <*EnumImagePixelFormat*, optional>, `template_name` <*str*, optional>: Specifies the image, formated in `numpy.ndarray`, and the image pixel format used in the image byte array to process and a `CaptureVisionTemplate` to use for capturing.
3132

3233
**Remarks**
3334

@@ -43,4 +44,6 @@ Returns a `CapturedResult` object containing the captured items.
4344

4445
[ImageData]({{ site.dcvb_python_api }}core/basic-classes/image-data.html)
4546

47+
[EnumImagePixelFormat]({{ site.dcvb_enumerations }}core/image-pixel-format.html?lang=python)
48+
4649
[CapturedResult]({{ site.dcvb_python_api }}capture-vision-router/auxiliary-classes/captured-result.html)

programming/python/release-notes/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ noTitleIndex: true
99

1010
# Module Release Notes - Dynamsoft Capture Vision Python Edition
1111

12+
- [2.4.2100 (11/07/2024)](python-2.md#242100-11072024)
1213
- [2.4.2000 (10/10/2024)](python-2.md#242000-10102024)

programming/python/release-notes/python-2.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,21 @@ needGenerateH3Content: false
88

99
# Release Notes for Python Edition - 2.x
1010

11+
## 2.4.2100 (11/07/2024)
12+
13+
### New
14+
15+
- Added support for `numpy.ndarray` image type in the `capture` interface.
16+
17+
### Improved
18+
19+
- Optimized the usage of list type member variables, allowing modification of individual objects within the list without needing to reassign the entire list.
20+
- Improved the usage of `EnumPresetTemplate` and `EnumBarcodeFormat`, no longer requiring `.value` for accessing enum members.
21+
22+
### Fixed
23+
24+
- Fixed a bug where initializing `FileImageTag` would raise a `TypeError` exception.
25+
1126
## 2.4.2000 (10/10/2024)
1227

1328
### Highlights

0 commit comments

Comments
 (0)