Skip to main content
Version: 12 Dec 2024

NativeBindings

See ml_cv_camera.h for additional comments.

Inherits from:
MagicLeapNativeBindings

Public Methods

MLResult.Code MLCVCameraGetFramePose

Get the camera pose in the world coordinate system.

public MLResult.Code MLCVCameraGetFramePose(
ulong cvCameraHandle,
ulong headHandle,
CameraID id,
long vcamTimestamp,
ref MLTransform outTransform
)

Parameters

TypeNameDescription
ulongcvCameraHandleMLHandle previously created with MLCVCameraTrackingCreate.
ulongheadHandleMLHandle previously created with MLHeadCameraCreate.
CameraIDidThe camera id.
longvcamTimestampThe timestamp of the frame pose.
ref MLTransformoutTransformThe transform of the frame pose.

Returns: MLResult.Result will be MLResult.Code.Ok if successful. MLResult.Result will be MLResult.Code.UnspecifiedFailure if failed due to internal error.


MLResult.Code MLCVCameraTrackingCreate

Create Camera Tracker.

public MLResult.Code MLCVCameraTrackingCreate(
ref ulong cvCameraHandle
)

Parameters

TypeNameDescription
ref ulongcvCameraHandletracker Handle.

Returns: MLResult_Ok On success. MLResult_PermissionDenied Necessary permission is missing. MLResult_UnspecifiedFailure Unable to create tracker.


MLResult.Code MLCVCameraTrackingDestroy

Destroy Tracker after usage.

public MLResult.Code MLCVCameraTrackingDestroy(
ulong cvCameraHandle
)

Parameters

TypeNameDescription
ulongcvCameraHandleMLHandle previously created with MLCVCameraTrackingCreate.

Returns: MLResult_Ok On success. MLResult_PermissionDenied Necessary permission is missing. MLResult_UnspecifiedFailure Unable to create tracker.


Public Attributes

MaxDistortionCoefficients

MLCVCameraIntrinsics_MaxDistortionCoefficients from ml_cv_camera.h


public const uint MaxDistortionCoefficients = 5;


Public Enums

CameraID

MLCVCameraID enum from ml_cv_camera.h

EnumeratorValueDescription
ColorCamera0RGB Camera.