captureImage(quality)
Captures a single image with the specified quality settings.
func captureImage(quality: ImageQuality) async throws -> Int
Parameters
quality
This specifies the resolution and compression for images taken using the VIVE AI Glasses camera.
Return value
0 if function calling is successful; otherwise, -1 .
Exception
The following exceptions may be thrown: ViveGlassError.UnregisteredAppException, ViveGlassError.GlassesPermissionDeniedException.
Permissions
Camera permission is required before calling captureImage().
See also
Responding from VIVE AI Glasses event
func glasses(didReceiveCaptureEvent:data:)
Tells the delegate that the raw image data captured from the VIVE AI Glasses camera has been received.
Permissions
func requestPermission()
Requests permission to access VIVE AI Glasses resources.
func checkPermission()
Checks if the app has been granted the required permissions.
Enumerations
enum ImageQuality
This defines the resolution and compression for images taken using the VIVE AI Glasses camera.
enum Permission
This defines the permission that the app is requesting.
enum PermissionResult
This indicates the result of the permission request.
Error handling and exceptions
enum ViveGlassError
This represents an error thrown by the VIVE AI Glasses SDK.