Resource Base
com.dynamsoft.dce.CameraEnhancer
is the class that provides multifunctional APIs on frame preprocessing and camera controlling.
Java:
CameraEnhancer mCameraEnhancer = new CameraEnhancer(MainActivity.this);
Kotlin:
mCameraEnhancer = CameraEnhancer(this@MainActivity)
Method | Description |
---|---|
AcquireListFrame |
Get the latest frame from the frame queue when this API is activated. |
enableFastMode |
Set true/false to turn on/off DCE fast mode. |
getEnabledFastModeStatus |
Get the current status of fast mode (on/off). |
enableFrameFilter |
Set true/false to turn on/off DCE frame filter. |
getEnabledFrameFilterStatus |
Get the status (on/off) of DCE frame filter mode. |
setMaxFrameRate |
Set max frame rate. |
enableSensorControl |
Set true/false to turn on/off DCE sensor control. |
getEnabledSensorControlStatus |
Get the status (on/off) of DCE sensor control mode. |
setSensorControlThreshold |
Enable user to change sensor sensitivity (default value is 50). |
Method | Description |
---|---|
getDeviceLevel |
Make an evaluation on the current device and define its level for further use. |
setAutoModeLevelParam |
Set auto mode level parameter. |
updateCameraSetting |
Update camera, filter and focus settings from Json. |
getVersion |
Check current DCE version |
setCameraDesiredState |
Set Camera on/off. |
getCameraDesiredState |
Get camera desired state. |
getCameraCurrentState |
Get camera current state. |
pauseCamera |
Pause Camera. |
resumeCamera |
Resume Camera. |
startScanning |
Start scanning. |
stopScanning |
Stop scanning. |
addCameraListener |
Add camera listener (on preview original, filtered or fast frames). |
removeCameraListener |
Remove camera listener. |
setTorchDesiredState |
Set torch state. |
getTorchDesiredState |
Get torch desired state. |
getTorchCurrentState |
Get torch current state. |
addTorchListener |
Add torch listener. |
getCameraPosition |
Get current camera position. |
switchCameraPosition |
Switch camera position front/back. |
setResolution |
Set resolution. |
getResolution |
Get current resolution setting. |
getResolutionList |
Get all available resolutions |
Method | Description |
---|---|
setAutoFocusPosition |
Set auto focus position (Change the default auto focus position). |
setManualFocusPosition |
Set manual focus position (This focus position is only effected once for each time the API is called). |
setFocalLength |
Set focal length between 0 to 10 to enable fixed focal length mode. In fixed focal length mode, all focus parameters can’t be changed until this mode is quit. To quit fixed focal length mode, please set focal length equals to -1. |
enableDCEAutoFocus |
Set true/false to turn on/off DCE auto focus. |
getEnabledDCEAutoFocusStatus |
Get the status (on/off) of DCE auto focus. |
enableDefaultAutoFocus |
Set true/false to turn on/off default auto focus. |
getEnabledDefaultAutoFocusStatus |
Get the status (on/off) of camera default auto focus. |
enableRegularAutoFocus |
If this is true, camera will auto focus every 3 seconds. This focus mode will start automatically if DCE auto focus is enabled. Users can manually quit this focus mode when DCE auto focus is activated. |
getEnabledRegularAutoFocusStatus |
Get the current status (on/off) of this auto focus mode. |
setRegularAutoFocusParam |
Set the time interval and terminate time for the regular auto focus |
enableAutoFocusOnSharpnessChange |
If this is enabled, camera will autofocus when clarity change is detected. This focus mode will start automatically if DCE autofocus is enabled. Users can manually quit this focus mode when DCE autofocus is activated. |
getEnabledAutoFocusOnSharpnessChangeStatus |
Get the current status (on/off) of this auto focus mode. |
enableAutoZoom |
Set enableAutoZoom value true to enable auto zoom mode. |
getEnabledAutoZoomStatus |
Get the status (on/off) of auto zoom mode. |
setZoomFactor |
Set zoom factor. |
latest version