FirstModulAR 0.1.0
Loading...
Searching...
No Matches
MLCVCameraCapturer Class Reference

Captures camera data from the Magic Leap CV (Computer Vision) camera, and feeds it through the CameraCapturer pipeline. More...

Inheritance diagram for MLCVCameraCapturer:
CameraCapturer

Public Member Functions

void StartCameraCapture (MLCameraBase.Identifier cameraIdentifier=MLCameraBase.Identifier.CV, Action< bool > onCameraCaptureStarted=null)
 Starts the Camera capture with the target settings.
 
byte[] FlipImageVerticallyRGBA (byte[] originalImage)
 Flips the image vertically.
 

Protected Member Functions

override void Awake ()
 Automatically initializes the singleton instance of the camera capturer.
 
void Start ()
 
override void SubscribersChanged ()
 Called when the subscribers to the OnCameraDataCaptured event change, and starts or stops the camera capture accordingly.
 
- Protected Member Functions inherited from CameraCapturer

Properties

bool IsCameraConnected [get]
 Can be used by external scripts to query the status of the camera and see if the camera capture has been started.
 
- Properties inherited from CameraCapturer
static int TargetImageWidth [get]
 Gets the target image width.
 
static int TargetImageHeight [get]
 Gets the target image height.
 

Additional Inherited Members

- Static Public Member Functions inherited from CameraCapturer
static void SubscribeCameraRawDataCaptured (Action< byte[], int, int > action)
 Subscribes to the camera raw data captured event.
 
static void UnsubscribeCameraRawDataCaptured (Action< byte[], int, int > action)
 Unsubscribes from the camera raw data captured event.
 
- Static Public Attributes inherited from CameraCapturer
static CameraCapturer Instance
 
- Protected Attributes inherited from CameraCapturer
int _targetImageWidth = 640
 
int _targetImageHeight = 480
 
- Static Protected Attributes inherited from CameraCapturer
static Action< byte[], int, int > OnCameraDataCaptured
 

Detailed Description

Captures camera data from the Magic Leap CV (Computer Vision) camera, and feeds it through the CameraCapturer pipeline.

Member Function Documentation

◆ Awake()

override void MLCVCameraCapturer.Awake ( )
inlineprotectedvirtual

Automatically initializes the singleton instance of the camera capturer.

Reimplemented from CameraCapturer.

◆ FlipImageVerticallyRGBA()

byte[] MLCVCameraCapturer.FlipImageVerticallyRGBA ( byte[] originalImage)
inline

Flips the image vertically.

Parameters
originalImageThe original image to flip, in RGBA_8888 format.
Returns
The flipped image, in RGBA_8888 format.

◆ Start()

void MLCVCameraCapturer.Start ( )
inlineprotected

◆ StartCameraCapture()

void MLCVCameraCapturer.StartCameraCapture ( MLCameraBase.Identifier cameraIdentifier = MLCameraBase::Identifier::CV,
Action< bool > onCameraCaptureStarted = null )
inline

Starts the Camera capture with the target settings.

Parameters
cameraIdentifierWhich camera to use. (Main or CV)
widthThe width of the video stream.
heightThe height of the video stream.
onCameraCaptureStartedAn action callback that returns true if the video capture started successfully.

◆ SubscribersChanged()

override void MLCVCameraCapturer.SubscribersChanged ( )
inlineprotectedvirtual

Called when the subscribers to the OnCameraDataCaptured event change, and starts or stops the camera capture accordingly.

Reimplemented from CameraCapturer.

Property Documentation

◆ IsCameraConnected

bool MLCVCameraCapturer.IsCameraConnected
get

Can be used by external scripts to query the status of the camera and see if the camera capture has been started.


The documentation for this class was generated from the following file: