This class displays the video and controls the camera, inheriting UIView. It supports real-time document detection, capturing images and documents.

The built-in video view has the capability of real-time document detection, capturing the detected documents, capturing images, etc.

How to detect documents in a video stream

By default, the document detection function is turned on.

document capture 2.1

If you just want to take photos, you can disable it by setting mode to DME_IMAGE.

self.dcsView.videoView.mode = DME_IMAGE;

As you can see, there are built-in icons for capturing images or documents, controlling flash and camera position. The capture function is built into the capture icon, so you don't even need to call capture methods captureImage() or captureDocument().

How to set Next View

The default view after clicking the capture button is the video view, but you can set the property nextViewAfterCapture to the image gallery view or edit view.

self.dcsView.videoView.nextViewAfterCapture = DVE_IMAGEGALLERYVIEW; //Set next view to DVE_IMAGEGALLERYVIEW after the Capture icon is clicked.
self.dcsView.videoView.nextViewAfterCancel = DEV_IMAGEGALLERYVIEW;  //Set next view to DVE_IMAGEGALLERYVIEW after the Cancel icon is clicked.

You can also customize the built-in icons on the video view, such as, hiding the flash tool item, or changing the text shown on it, etc. Check related properties here.

Is this page helpful?