Resource Base
Table of contents

iOS CameraEnhancer Class

CameraEnhancer is the class that provides multifunctional APIs on frame preprocessing and camera controlling.

For Objective-C users:

@property(nonatomic, strong) DynamsoftCameraEnhancer *dce;

For Swift users:

var dce:DynamsoftCameraEnhancer! = nil

CameraEnhancer Methods

Frame preprocessing methods

Method Description
enableFastMode Set the value true/false to turn on/off DCE fast mode
acquireListFrame Get the latest frame from the frame queue when this API is activated.
enableSensorControl Set true/false to turn on/off DCE sensor control.
setSensorControlThreshold Make settings on sensor control threshold
enableFrameFilter Set true/false to turn on/off DCE frame filter.
setMaxFrameRate Set max frame rate

Regular camera methods

Method Description
updateCameraSettingFromJson Update camera filter and focus settings from Json
updateCameraSettingFromFile Update camera filter and focus settings from file
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
removeTorchListener Remove 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 only takes effect 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.
enableDefaultAutoFocus Set true/false to turn on/off default auto focus.
enableRegularAutoFocus If this is true, camera will auto focus for every 3 seconds.
setRegularAutoFocusParam Set the focus interval and termination time for the regular autofocus.
enableAutoFocusOnSharpnessChange If this is enabled, camera will autofocus when clarity change is detected.
enableAutoZoom Set enableAutoZoom value true to enable 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