Skip to content

Commit dcf7a1f

Browse files
Merge pull request #54 from dynamsoft-docs/preview
update to internal commit 649d8e28
2 parents 63da65d + 367cdf5 commit dcf7a1f

19 files changed

+875
-7
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
layout: default-layout
3+
title: CameraEnhancerModule - Dynamsoft Capture Vision MAUI Edition API Reference
4+
description: The class CameraEnhancerModule of DCV MAUI represents the camera enhancer module, which provides general functions for the camera enhancer.
5+
keywords: camera enhancer, MAUI
6+
needGenerateH3Content: true
7+
needAutoGenerateSidebar: true
8+
noTitleIndex: true
9+
---
10+
11+
# CameraEnhancerModule
12+
13+
The `CameraEnhancerModule` class defines general functions of the camera enhancer module.
14+
15+
## Definition
16+
17+
*Namespace:* Dynamsoft.CameraEnhancer.Maui
18+
19+
*Assembly:* Dynamsoft.CameraEnhancer.Maui
20+
21+
```csharp
22+
class CameraEnhancerModule
23+
```
24+
25+
## Methods
26+
27+
| Method | Description |
28+
|------- |-------------|
29+
| [`GetVersion`](#getversion) | Get the version of Dynamsoft Camera Enhancer. |
30+
31+
### GetVersion
32+
33+
Get the version of Dynamsoft Camera Enhancer.
34+
35+
```csharp
36+
static string GetVersion();
37+
```
38+
39+
**Return Value**
40+
41+
The version of Dynamsoft Camera Enhancer.
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
---
2+
layout: default-layout
3+
title: CameraEnhancer Class - Dynamsoft Capture Vision MAUI Edition
4+
description: CameraEnhancer Class of DCV MAUI edition is the class that defines camera controlling APIs.
5+
keywords: Camera, scan region, focus mode, zoom factor
6+
needGenerateH3Content: true
7+
needAutoGenerateSidebar: true
8+
noTitleIndex: true
9+
---
10+
11+
# CameraEnhancer
12+
13+
The `CameraEnhancer` class is the primary class of Dynamsoft Camera Enhancer that defines the camera controlling APIs. It is a subclass of `ImageSourceAdapter`.
14+
15+
## Definition
16+
17+
*Namespace:* Dynamsoft.CameraEnhancer.Maui
18+
19+
*Assembly:* Dynamsoft.CaptureVisionRouter.Maui
20+
21+
```java
22+
class CameraEnhancer : ImageSourceAdapter
23+
```
24+
25+
## Methods
26+
27+
| Method | Description |
28+
|------- |-------------|
29+
| [`CameraEnhancer(CameraView cameraView)`](#cameraenhancercameraview-cameraview) | The constructor. Initialize the `CameraEnhancer` with a `CameraView` instance. |
30+
| [`CameraEnhancer`](#cameraenhancer-1) | The constructor. |
31+
| [`SetCameraView`](#setcameraview) | Set/get the `CameraView` instance that bind with this `CameraEnhancer` instance. |
32+
| [`GetCameraView`](#getcameraview) | Set/get the `CameraView` instance that bind with this `CameraEnhancer` instance. |
33+
| [`Open`](#open) | Open the camera. |
34+
| [`Close`](#close) | Close the camera. |
35+
| [`SetScanRegion`](#setscanregion) | Set a scan region. The video frame is cropped based on the scan region. |
36+
| [`GetScanRegion`](#getscanregion) | Get a scan region. |
37+
| [`EnableEnhancedFeatures`](#enableenhancedfeatures) | Enable the specified enhanced features. View EnumEnhancedFeatures for more details. |
38+
| [`DisableEnhancedFeatures`](#disableenhancedfeatures) | Disable the specified enhanced features. View EnumEnhancedFeatures for more details. |
39+
| [`SelectCamera`](#selectcamera) | Select a camera with a camera position. |
40+
| [`GetCameraPosition`](#getcameraposition) | Select a camera with a camera position. |
41+
| [`SetZoomFactor`](#setzoomfactor) | Set the zoom factor of the camera. |
42+
| [`GetZoomFactor`](#getzoomfactor) | Get the zoom factor of the camera. |
43+
| [`SetFocus`](#setfocus) | Set the focus point of interest and trigger an one-off auto-focus. After the focus, you can either lock the focalngth or keep the continuous auto focus enabled by configuring the subsequent focus mode. |
44+
| [`GetFocusMode`](#getfocusmode) | Set the focus point of interest and trigger an one-off auto-focus. After the focus, you can either lock the focalngth or keep the continuous auto focus enabled by configuring the subsequent focus mode. |
45+
46+
The following methods are inherited from superclass [`ImageSourceAdapter`]({{ site.dcv_android_api }}core/image-source-adapter.html)
47+
48+
| Method | Description |
49+
| ------ | ----------- |
50+
| [`StartFetching`]({{ site.dcv_maui_api }}core/image-source-adapter.html#startfetching) | Start fetching images from the source to the Video Buffer of ImageSourceAdapter. |
51+
| [`StopFetching`]({{ site.dcv_maui_api }}core/image-source-adapter.html#stopfetching) | Stop fetching images from the source to the Video Buffer of ImageSourceAdapter. |
52+
| [`SetMaximumImageCount`]({{ site.dcv_maui_api }}core/image-source-adapter.html#setmaximumimagecount) | Sets the maximum number of images that can be buffered at any time. |
53+
| [`GetMaximumImageCount`]({{ site.dcv_maui_api }}core/image-source-adapter.html#getmaximumimagecount) | Returns the maximum number of images that can be buffered. |
54+
| [`GetImageCount`]({{ site.dcv_maui_api }}core/image-source-adapter.html#getimagecount) | Returns the current number of images in the buffer. |
55+
| [`IsBufferEmpty`]({{ site.dcv_maui_api }}core/image-source-adapter.html#isbufferempty) | Determines whether the buffer is currently empty. |
56+
| [`ClearBuffer`]({{ site.dcv_maui_api }}core/image-source-adapter.html#clearbuffer) | Clears all images from the buffer, resetting the state for new image fetching. |
57+
| [`SetColourChannelUsageType`]({{ site.dcv_maui_api }}core/image-source-adapter.html#setcolourchannelusagetype) | Sets the usage type for color channels in images. |
58+
| [`GetColourChannelUsageType`]({{ site.dcv_maui_api }}core/image-source-adapter.html#getcolourchannelusagetype) | Returns the current usage type for color channels in images. |
59+
60+
### CameraEnhancer(CameraView cameraView)
61+
62+
The constructor. Initialize the `CameraEnhancer` with a `CameraView` instance.
63+
64+
```csharp
65+
CameraEnhancer(CameraView cameraView);
66+
```
67+
68+
**Parameters**
69+
70+
`cameraView`: A [`CameraView`](camera-view.md) instance.
71+
72+
### CameraEnhancer
73+
74+
The constructor.
75+
76+
```csharp
77+
CameraEnhancer();
78+
```
79+
80+
### SetCameraView
81+
82+
Bind a `CameraView` instance with this `CameraEnhancer` instance.
83+
84+
```csharp
85+
void SetCameraView(CameraView view);
86+
```
87+
88+
### GetCameraView
89+
90+
Get the `CameraView` object that bind to this `CameraEnhancer`.
91+
92+
```csharp
93+
CameraView GetCameraView();
94+
```
95+
96+
### Open
97+
98+
Open the camera.
99+
100+
```csharp
101+
void Open();
102+
```
103+
104+
### Close
105+
106+
Close the camera.
107+
108+
```csharp
109+
void Close();
110+
```
111+
112+
### SetScanRegion
113+
114+
Set a scan region. The video frame is cropped based on the scan region. To learn the full code to setting a scan region, please refer to the [scan region](../guide/scan-region.md) article.
115+
116+
```csharp
117+
void SetScanRegion(DMRect scanRegion);
118+
```
119+
120+
**Parameters**
121+
122+
`scanRegion`: A [`DMRect`]({{ site.dcv_maui_api }}core/rect.html) object.
123+
124+
### GetScanRegion
125+
126+
Get the scan region if one has been set.
127+
128+
```csharp
129+
DMRect GetScanRegion();
130+
```
131+
132+
**Return Value**
133+
134+
A [`DMRect`]({{ site.dcv_android_api }}core/basic-structures/rect.html) object that represent the scan region area.
135+
136+
### EnableEnhancedFeatures
137+
138+
Enable the specified enhanced features. View [EnumEnhancedFeatures]({{ site.dce_maui_api }}enum/enhanced-features.html) to learn about these enhanced features. By default, these enhanced features are all disabled.
139+
140+
```csharp
141+
void EnableEnhancedFeatures(EnumEnhancedFeatures features);
142+
```
143+
144+
**Parameters**
145+
146+
`enhancedFeatures`: A combined value of `EnumEnhancedFeatures` which indicates a series of enhanced features.
147+
148+
**Return Value**
149+
150+
A bool value that indicates whether the enhanced features are enabled successfully.
151+
152+
### DisableEnhancedFeatures
153+
154+
Disable any enhanced features that have been previously enabled. View [EnumEnhancedFeatures]({{ site.dce_maui_api }}enum/enhanced-features.html) to learn about these enhanced features.
155+
156+
```csharp
157+
void DisableEnhancedFeatures(EnumEnhancedFeatures features);
158+
```
159+
160+
**Parameters**
161+
162+
`enhancedFeatures`: A combined value of `EnhancedFeatures` which indicates a series of enhanced features.
163+
164+
### SelectCamera
165+
166+
Select a camera with a camera position.
167+
168+
```csharp
169+
void SelectCamera(EnumCameraPosition cameraPosition);
170+
```
171+
172+
**Parameters**
173+
174+
`cameraPosition`: One of the [`EnumCameraPosition`]({{ site.dce_maui_api }}enum/camera-position.html) value.
175+
176+
### GetCameraPosition
177+
178+
Get the current camera position.
179+
180+
```csharp
181+
EnumCameraPosition GetCameraPosition();
182+
```
183+
184+
**Return Value**
185+
186+
A `EnumCameraPosition` value that represents the current camera position.
187+
188+
### SetZoomFactor
189+
190+
Set the zoom factor of the camera.
191+
192+
```csharp
193+
void SetZoomFactor(float zoomFactor);
194+
```
195+
196+
**Parameters**
197+
198+
`zoomFactor`: The zoom factor.
199+
200+
### GetZoomFactor
201+
202+
Get the zoom factor of the camera.
203+
204+
```csharp
205+
float GetZoomFactor();
206+
```
207+
208+
**Return Value**
209+
210+
The zoom factor.
211+
212+
### SetFocus
213+
214+
Set the focus point of interest and trigger an one-off auto-focus. After the focus, you can either lock the focalngth or keep the continuous auto focus enabled by configuring the subsequent focus mode.
215+
216+
```csharp
217+
void SetFocus(Point focusPoint, EnumFocusMode subsequentFocusMode);
218+
```
219+
220+
**Parameters**
221+
222+
`focusPoint`: The focus point of interest. The coordinate base of the point is "image".
223+
`subsequentFocusMode`: The subsequent focus mode of type [`EnumFocusMode`]({{ site.dce_maui_api }}enum/focus-mode.html).
224+
225+
### GetFocusMode
226+
227+
Get the current focus mode.
228+
229+
```csharp
230+
EnumFocusMode GetFocusMode();
231+
```
232+
233+
**Return Value**
234+
235+
A [`EnumFocusMode`]({{ site.dce_maui_api }}enum/focus-mode.html) value that represents the current focus mode.

programming/maui/api-reference/camera-enhancer.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The `CameraEnhancer` class is the primary class of Dynamsoft Camera Enhancer tha
1616

1717
*Namespace:* Dynamsoft.CameraEnhancer.Maui
1818

19-
*Assembly:* Dynamsoft.CaptureVisionRouter.Maui
19+
*Assembly:* Dynamsoft.CameraEnhancer.Maui
2020

2121
```java
2222
class CameraEnhancer : ImageSourceAdapter
@@ -42,6 +42,8 @@ class CameraEnhancer : ImageSourceAdapter
4242
| [`GetZoomFactor`](#getzoomfactor) | Get the zoom factor of the camera. |
4343
| [`SetFocus`](#setfocus) | Set the focus point of interest and trigger an one-off auto-focus. After the focus, you can either lock the focalngth or keep the continuous auto focus enabled by configuring the subsequent focus mode. |
4444
| [`GetFocusMode`](#getfocusmode) | Set the focus point of interest and trigger an one-off auto-focus. After the focus, you can either lock the focalngth or keep the continuous auto focus enabled by configuring the subsequent focus mode. |
45+
| [`TurnOnTorch`](#turnontorch) | Turn on the torch. |
46+
| [`TurnOffTorch`](#turnofftorch) | Turn off the torch. |
4547

4648
The following methods are inherited from superclass [`ImageSourceAdapter`]({{ site.dcv_android_api }}core/image-source-adapter.html)
4749

@@ -233,3 +235,19 @@ EnumFocusMode GetFocusMode();
233235
**Return Value**
234236

235237
A [`EnumFocusMode`]({{ site.dce_maui_api }}enum/focus-mode.html) value that represents the current focus mode.
238+
239+
### TurnOnTorch
240+
241+
Turn on the torch.
242+
243+
```csharp
244+
void TurnOnTorch();
245+
```
246+
247+
### TurnOffTorch
248+
249+
Turn off the torch.
250+
251+
```csharp
252+
void TurnOffTorch();
253+
```
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
---
2+
layout: default-layout
3+
title: CameraView Class - Dynamsoft Capture Vision MAUI Edition
4+
description: The CameraView class of DCV MAUI edition is used to display the camera preview and provides UI controlling APIs
5+
keywords: Torch button, scan region mask, scan laser, camera view, ui
6+
needGenerateH3Content: true
7+
needAutoGenerateSidebar: true
8+
noTitleIndex: true
9+
---
10+
11+
# CameraView
12+
13+
The `CameraView` class is used to display the camera preview and provides UI controlling APIs. Users can add interactable UI elements on the view.
14+
15+
## Definition
16+
17+
*Namespace:* Dynamsoft.CameraEnhancer.Maui
18+
19+
*Assembly:* Dynamsoft.CaptureVisionRouter.Maui
20+
21+
```java
22+
class CameraView : View
23+
```
24+
25+
## Methods & Properties
26+
27+
| Method | Description |
28+
|------- |-------------|
29+
| [`CameraView`](#cameraview-1) | The constructor. |
30+
31+
| Property | Type | Description |
32+
|--------- | ---- |-------------|
33+
| [`TorchButton`](#torchbutton) | *TorchButton* | The property that defines a torch button. User can click the button to turn on/off the torch. |
34+
| [`TorchButtonVisible`](#torchbuttonvisible) | *bool* | The property that defines whether the torch button is visible. |
35+
| [`ScanRegionMaskVisible`](#scanregionmaskvisible) | *bool* | The property that defines whether the scan region mask is visible. |
36+
| [`ScanLaserVisible`](#scanlaservisible) | *bool* | The property that defines whether the scan laser is visible. |
37+
38+
### CameraView
39+
40+
The constructor. Create an instance of `CameraView`.
41+
42+
```csharp
43+
CameraView();
44+
```
45+
46+
### TorchButton
47+
48+
The property that defines a torch button. User can click the button to turn on/off the torch. View [`TorchButton`]({{ site.dce_maui_api }}torch-button.html) class for how more information about how to configure the torch button.
49+
50+
```csharp
51+
TorchButton TorchButton { get; set; }
52+
```
53+
54+
### TorchButtonVisible
55+
56+
The property that defines whether the torch button is visible.
57+
58+
```csharp
59+
bool TorchButtonVisible { get; set; }
60+
```
61+
62+
### ScanRegionMaskVisible
63+
64+
The property that defines whether the scan region mask is visible.
65+
66+
```csharp
67+
bool ScanRegionMaskVisible { get; set; }
68+
```
69+
70+
### ScanLaserVisible
71+
72+
The property that defines whether the scan laser is visible.
73+
74+
```csharp
75+
bool ScanLaserVisible { get; set; }
76+
```

0 commit comments

Comments
 (0)