Resource Base
Table of contents

Android CameraEnhancer Class

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)

CameraEnhancer Methods

Frame preprocessing methods

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).

Regular camera methods

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

Focus & zoom methods

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.

This page is compatible for:

Version 1.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version
    • Version 1.0.1
    • Version 1.0
    Change +
    © 2003–2021 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support