CameraPhotoOutput
A CameraOutput capturing Photos, in memory (capturePhoto) or directly to a file (capturePhotoToFile).
val photoOutput = VisionCamera.createPhotoOutput(PhotoOutputOptions(targetResolution = CommonResolutions.UHD_4_3))
// ... connect it to a CameraSession, then:
photoOutput.capturePhoto().use { photo ->
photo.saveToFile(path)
}Content copied to clipboard
Properties
Link copied to clipboard
The resolution this output is currently streaming at, or null if it is not connected yet.
Link copied to clipboard
The orientation of the content produced by this output.
Link copied to clipboard
Whether this output can deliver camera calibration data with photos (CapturePhotoSettings.enableCameraCalibrationDataDelivery).
Link copied to clipboard
Whether this output can deliver depth data with photos (CapturePhotoSettings.enableDepthData).
Functions
Link copied to clipboard
abstract suspend fun capturePhoto(settings: CapturePhotoSettings = CapturePhotoSettings(), callbacks: CapturePhotoCallbacks = CapturePhotoCallbacks()): Photo
Link copied to clipboard
abstract suspend fun capturePhotoToFile(settings: CapturePhotoSettings = CapturePhotoSettings(), callbacks: CapturePhotoCallbacks = CapturePhotoCallbacks()): PhotoFile
Captures a photo with the given settings and writes it to a temporary file.
Link copied to clipboard
Same as dispose, to use a CameraOutput with use { }.
Link copied to clipboard
Prepares the pipeline for the given settings, so that later capturePhoto calls with any of them start faster. Optional; a no-op on Android.