VisionCamera
Classes​
Interfaces​
- CameraDevice
- CameraDeviceFormat
- CameraProps
- Code
- CodeScanner
- CodeScannerFrame
- DeviceFilter
- ErrorWithCause
- FormatFilter
- Frame
- FrameProcessor
- FrameProcessorPlugin
- OnCodeScannedEvent
- OnErrorEvent
- OnShutterEvent
- PhotoFile
- Point
- RecordVideoOptions
- TakePhotoOptions
- TakeSnapshotOptions
- VideoFile
Type Aliases​
AutoFocusSystem​
Ƭ AutoFocusSystem: "contrast-detection"
| "phase-detection"
| "none"
Indicates a format's autofocus system.
"none"
: Indicates that autofocus is not available"contrast-detection"
: Indicates that autofocus is achieved by contrast detection. Contrast detection performs a focus scan to find the optimal position"phase-detection"
: Indicates that autofocus is achieved by phase detection. Phase detection has the ability to achieve focus in many cases without a focus scan. Phase detection autofocus is typically less visually intrusive than contrast detection autofocus
Defined in​
CameraDevice.ts:35
CameraPermissionRequestResult​
Ƭ CameraPermissionRequestResult: "granted"
| "denied"
Defined in​
Camera.tsx:19
CameraPermissionStatus​
Ƭ CameraPermissionStatus: "granted"
| "not-determined"
| "denied"
| "restricted"
Defined in​
Camera.tsx:18
CameraPosition​
Ƭ CameraPosition: "front"
| "back"
| "external"
Represents the camera device position.
"back"
: Indicates that the device is physically located on the back of the phone"front"
: Indicates that the device is physically located on the front of the phone"external"
: The camera device is an external camera, and has no fixed facing relative to the phone. (e.g. USB or Continuity Cameras)
Defined in​
CameraDevice.ts:11
CaptureError​
Ƭ CaptureError: "capture/recording-in-progress"
| "capture/recording-canceled"
| "capture/no-recording-in-progress"
| "capture/file-io-error"
| "capture/create-temp-file-error"
| "capture/create-recorder-error"
| "capture/insufficient-storage"
| "capture/video-not-enabled"
| "capture/photo-not-enabled"
| "capture/frame-invalid"
| "capture/no-data"
| "capture/recorder-error"
| "capture/focus-canceled"
| "capture/timed-out"
| "capture/snapshot-failed"
| "capture/image-data-access-error"
| "capture/encoder-error"
| "capture/invalid-image-type"
| "capture/failed-writing-metadata"
| "capture/unknown"
Defined in​
CameraError.ts:36
CodeScannerError​
Ƭ CodeScannerError: "code-scanner/not-compatible-with-outputs"
| "code-scanner/code-type-not-supported"
| "code-scanner/cannot-load-model"
Defined in​
CameraError.ts:32
CodeType​
Ƭ CodeType: "code-128"
| "code-39"
| "code-93"
| "codabar"
| "ean-13"
| "ean-8"
| "itf"
| "upc-e"
| "upc-a"
| "qr"
| "pdf-417"
| "aztec"
| "data-matrix"
The type of the code to scan.
Defined in​
CodeScanner.ts:6
DeviceError​
Ƭ DeviceError: "device/configuration-error"
| "device/no-device"
| "device/invalid-device"
| "device/microphone-unavailable"
| "device/pixel-format-not-supported"
| "device/low-light-boost-not-supported"
| "device/focus-not-supported"
| "device/camera-not-available-on-simulator"
| "device/camera-already-in-use"
Defined in​
CameraError.ts:7
FormatError​
Ƭ FormatError: "format/invalid-fps"
| "format/invalid-video-hdr"
| "format/photo-hdr-and-video-hdr-not-suppoted-simultaneously"
| "format/low-light-boost-not-supported-with-hdr"
| "format/invalid-video-stabilization-mode"
| "format/incompatible-pixel-format-with-hdr-setting"
| "format/invalid-format"
| "format/format-required"
Defined in​
CameraError.ts:17
Orientation​
Ƭ Orientation: "portrait"
| "portrait-upside-down"
| "landscape-left"
| "landscape-right"
Represents Orientation. Depending on the context, this might be a sensor orientation (relative to the phone's orentation), or view orientation.
portrait
: 0° (home-button at the bottom)landscape-left
: 90° (home-button on the left)portrait-upside-down
: 180° (home-button at the top)landscape-right
: 270° (home-button on the right)
Defined in​
Orientation.ts:10
ParameterError​
Ƭ ParameterError: "parameter/invalid-parameter"
| "parameter/unsupported-output"
| "parameter/unsupported-input"
| "parameter/invalid-combination"
Defined in​
CameraError.ts:2
PermissionError​
Ƭ PermissionError: "permission/microphone-permission-denied"
| "permission/camera-permission-denied"
Defined in​
CameraError.ts:1
PhysicalCameraDeviceType​
Ƭ PhysicalCameraDeviceType: "ultra-wide-angle-camera"
| "wide-angle-camera"
| "telephoto-camera"
Indentifiers for a physical camera (one that actually exists on the back/front of the device)
"ultra-wide-angle-camera"
: A built-in camera with a shorter focal length than that of a wide-angle camera. (FOV of 94° or higher)"wide-angle-camera"
: A built-in wide-angle camera. (FOV between 60° and 94°)"telephoto-camera"
: A built-in camera device with a longer focal length than a wide-angle camera. (FOV of 60° or lower)
Some Camera devices consist of multiple physical devices. They can be interpreted as logical devices, for example:
"ultra-wide-angle-camera"
+"wide-angle-camera"
= dual wide-angle camera."wide-angle-camera"
+"telephoto-camera"
= dual camera."ultra-wide-angle-camera"
+"wide-angle-camera"
+"telephoto-camera"
= triple camera.
Defined in​
CameraDevice.ts:26
PixelFormat​
Ƭ PixelFormat: "yuv"
| "rgb"
| "native"
| "unknown"
Represents the pixel format of a Frame
.
If you intend to read Pixels from this Frame or use an ML model for processing, make sure that you are
using the expected PixelFormat
, otherwise the plugin might not be able to properly understand the Frame's content.
Most ML models operate in either yuv
(recommended) or rgb
.
yuv
: Frame is in YUV pixel-format (Y'CbCr 4:2:0 or NV21, 8-bit)rgb
: Frame is in RGB pixel-format (RGB or RGBA, 8-bit)native
: Frame is in the Camera's native Hardware Buffer format (PRIVATE). This is the most efficient Format.unknown
: Frame has unknown/unsupported pixel-format.
Defined in​
PixelFormat.ts:14
SessionError​
Ƭ SessionError: "session/camera-not-ready"
| "session/audio-in-use-by-other-app"
| "session/no-outputs"
| "session/audio-session-failed-to-activate"
| "session/invalid-output-configuration"
Defined in​
CameraError.ts:26
SnapshotFile​
Ƭ SnapshotFile: Pick
<PhotoFile
, "path"
| "width"
| "height"
| "orientation"
| "isMirrored"
>
Defined in​
Snapshot.ts:11
SystemError​
Ƭ SystemError: "system/camera-module-not-found"
| "system/camera-is-restricted"
| "system/no-camera-manager"
| "system/frame-processors-unavailable"
| "system/recording-while-frame-processing-unavailable"
| "system/view-not-found"
| "system/max-cameras-in-use"
| "system/do-not-disturb-bug"
Defined in​
CameraError.ts:57
UnknownError​
Ƭ UnknownError: "unknown/unknown"
Defined in​
CameraError.ts:66
VideoStabilizationMode​
Ƭ VideoStabilizationMode: "off"
| "standard"
| "cinematic"
| "cinematic-extended"
| "auto"
Indicates a format's supported video stabilization mode. Enabling video stabilization may introduce additional latency into the video capture pipeline.
"off"
: No video stabilization. Indicates that video should not be stabilized"standard"
: Standard software-based video stabilization. Standard video stabilization reduces the field of view by about 10%."cinematic"
: Advanced software-based video stabilization. This applies more aggressive cropping or transformations than standard."cinematic-extended"
: Extended software- and hardware-based stabilization that aggressively crops and transforms the video to apply a smooth cinematic stabilization."auto"
: Indicates that the most appropriate video stabilization mode for the device and format should be chosen automatically
Defined in​
CameraDevice.ts:46