Class DCVCameraEnhancer
The interface DCVCameraEnhancer
provides camera and camera related hardware controlling APIs.
class DCVCameraEnhancer
Method | Description |
---|---|
createInstance |
Create an instance of DCVCameraEnhancer . |
setScanRegion |
Specify the region of interest. |
open |
Open the camera. |
close |
Close the camera. |
turnOnTorch |
Turn on the torch. |
turnOffTorch |
Turn off the torch. |
createInstance
Create an instance of DCVCameraEnhancer
.
static createInstance(): Promise<DCVCameraEnhancer>;
Return Value
An instance of DCVCameraEnhancer
.
Code Snippet
dce = await Dynamsoft.DCVCameraEnhancer.createInstance()
setScanRegion
Specify a region of interest.
setScanRegion(region: Region): Promise<void>;
Parameters
region
: An object of Region
class. It contains the coordinates of the top, bottom, left and right border of the region. View more in Region
.
Code Snippet
dce.setScanRegion({
regionLeft: 15,
regionRight: 85,
regionTop: 30,
regionBottom: 70,
regionMeasuredByPercentage: true
})
Related APIs
open
Open the camera.
open(): Promise<void>;
close
Close the camera.
close(): Promise<void>;
turnOnTorch
Turn on the torch.
turnOnTorch(): Promise<void>;
turnOffTorch
Turn off the torch.
turnOffTorch(): Promise<void>;