NativeBindings
Inherits from:
MagicLeapNativeBindings
Public Methods
MLResult.Code MLMarkerTrackerCreate
Create a Marker Scanner. Requires CameraCapture, LowLatencyLightwear priveledges.
public MLResult.Code MLMarkerTrackerCreate(
in MLMarkerTrackerSettings settings,
out ulong handle
)
Parameters
Type | Name | Description |
---|---|---|
in MLMarkerTrackerSettings | settings | List of settings of type MLMarkerTrackerSettings that configure the scanner. |
out ulong | handle | A pointer to an MLHandle to the newly created Marker Scanner. If this operation fails, handle will be ML_INVALID_HANDLE . |
Returns: MLResult_InvalidParam : Failed to create Marker Scanner due to invalid out_handle. MLResult_Ok Successfully : created Marker Scanner. MLResult_PermissionDenied Failed : to create scanner due to lack of permission(s). MLResult_UnspecifiedFailure : Failed to create the Marker Scanner due to an internal error.
MLResult.Code MLMarkerTrackerDestroy
Destroy a Marker Scanner. Requires CameraCapture, LowLatencyLightwear priveleges.
public MLResult.Code MLMarkerTrackerDestroy(
ulong scannerHandle
)
Parameters
Type | Name | Description |
---|---|---|
ulong | scannerHandle | MLHandle to the Marker Scanner created by MLMarkerTrackerCreate(). |
Returns: MLResult_Ok : Successfully destroyed the Marker Scanner. MLResult_UnspecifiedFailure : Failed to destroy the scanner due to an internal error.
MLResult.Code MLMarkerTrackerGetResult
brief Get the results for Marker Scanning.= This function can be used to poll results from the scanner. This will allocate memory for the results array that will have to be freed later.
public MLResult.Code MLMarkerTrackerGetResult(
ulong scanner_handle,
ref MLMarkerTrackerResultArray data
)
Parameters
Type | Name | Description |
---|---|---|
ulong | scanner_handle | MLHandle to the Marker Scanner created by MLMarkerTrackerCreate(). |
ref MLMarkerTrackerResultArray | data | out_data Pointer to an array of pointers to MLMarkerTrackerResult. The content will be freed by the MLMarkerTrackerReleaseResult. |
Returns
Type | Name | Description |
---|---|---|
MLResult.Code | MLResult_UnspecifiedFailure | Failed to return detections due to an internal error. |
Returns: MLResult_InvalidParam Failed to return detection data due to invalid out_data.
MLResult_Ok Successfully fetched and returned all detections.
MLResult.Code MLMarkerTrackerReleaseResult
Release the resources for the results array.
public MLResult.Code MLMarkerTrackerReleaseResult(
ref MLMarkerTrackerResultArray data
)
Parameters
Type | Name | Description |
---|---|---|
ref MLMarkerTrackerResultArray | data | The list of detections to be freed. |
Returns: MLResult_InvaldParam Failed to free structure due to invalid data. MLResult_Ok Successfully freed data structure. MLResult_UnspecifiedFailure Failed to free data due to an internal error.
MLResult.Code MLMarkerTrackerUpdateSettings
Update the Marker Scanner with new settings. Requires CameraCapture, LowLatencyLightwear priveledges.
public MLResult.Code MLMarkerTrackerUpdateSettings(
ulong scanner_handle,
in MLMarkerTrackerSettings scanner_settings
)
Parameters
Type | Name | Description |
---|---|---|
ulong | scanner_handle | MLHandle to the Marker Scanner created by MLArucoScannerCreate(). |
in MLMarkerTrackerSettings | scanner_settings | List of new Marker Scanner settings. |
Returns: MLResult_InvalidParam : Failed to update the settings due to invalid scanner_settings. MLResult_Ok Successfully : updated the Marker Scanner settings. MLResult_PermissionDenied : Failed to update the settings due to lack of permission(s). MLResult_UnspecifiedFailure : Failed to update the settings due to an internal error.
Public Enums
DecodedDataType
Data type of the decoded marker data.
Enumerator | Value | Description |
---|---|---|
None | ||
Aruco | This covers Aruco and AprilTag | |
QR | ||
EAN_13 | ||
UPC_A |