CameraSource

class CameraSource(graphicOverlay: GraphicOverlay)

Manages the camera and allows UI updates on top of it (e.g. overlaying extra Graphics). This receives preview frames from the camera at a specified rate, sends those frames to detector as fast as it is able to process.

This camera source makes a best effort to manage processing on preview frames as fast as possible, while at the same time minimizing lag. As such, frames may be dropped if the detector is unable to keep up with the rate of frames generated by the camera.

Constructors

Link copied to clipboard
fun CameraSource(graphicOverlay: GraphicOverlay)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun release()

Stops the camera and releases the resources of the camera and underlying detector.

Link copied to clipboard
fun setFocusMode(autoFocusActive: Boolean)
Link copied to clipboard
fun setFrameProcessor(processor: FrameProcessor)
Link copied to clipboard
fun switchCamera(): Camera
Link copied to clipboard
fun updateFlashMode(flashActive: Boolean)

Properties

Link copied to clipboard
var camera: Camera? = null
Link copied to clipboard
var requestedCameraId: Int
Link copied to clipboard
var requestedFlashState: Boolean = false
Link copied to clipboard
var requestedFocusState: Boolean = true