The Android XR SDK is now available in Developer Preview. We want your feedback! Visit our
support page to reach out.
Stay organized with collections
Save and categorize content based on your preferences.
ARTrackedImageExtensions
Extensions to AR Foundation's ARTrackedImage
class.
Summary
Public static functions
|
IsMarker(this ARTrackedImage image)
|
bool
Check if the given image is a marker.
|
IsQrCode(this ARTrackedImage image)
|
bool
Check if the give image is a QR code.
|
TryGetMarkerData(this ARTrackedImage image, out XRMarkerDictionary dictionary, out int id)
|
bool
|
TryGetQrCodeData(this ARTrackedImage image, out string decodedData)
|
bool
Try to get the decoded data from a QR code image.
|
Public static functions
IsMarker
bool IsMarker(
this ARTrackedImage image
)
Check if the given image is a marker.
Details |
Parameters |
image
|
The ARTrackedImage instance.
|
|
Returns
|
true , if it's a valid marker image.
|
IsQrCode
bool IsQrCode(
this ARTrackedImage image
)
Check if the give image is a QR code.
Details |
Parameters |
image
|
The ARTrackedImage instance.
|
|
Returns
|
true , if it's a valid QR code image.
|
TryGetMarkerData
bool TryGetMarkerData(
this ARTrackedImage image,
out XRMarkerDictionary dictionary,
out int id
)
Try to get the XRMarkerDictionary and the id from the dictionary of a marker image.
Details |
Parameters |
image
|
The marker ARTrackedImage image instance which returns true from IsMarker(ARTrackedImage).
|
dictionary
|
|
id
|
The id from the dictionary .
|
|
Returns
|
true if it gets marker data successfully and output by dictionary and id .
|
TryGetQrCodeData
bool TryGetQrCodeData(
this ARTrackedImage image,
out string decodedData
)
Try to get the decoded data from a QR code image.
Details |
Parameters |
image
|
The QR code ARTrackedImage image instance which returns true from IsQrCode(ARTrackedImage).
|
decodedData
|
The decoded QR code data.
|
|
Returns
|
true , if it succeed to get QR Code data and decodedData contains valid data.
|
It can fail to get the data if the tracking server is still decoding or there is not data encoded with this QR code. You can try it again later if decoding finished.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-08 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-05-08 UTC."],[],[],null,["# ARTrackedImageExtensions Class Reference\n\nARTrackedImageExtensions\n========================\n\nExtensions to AR Foundation's `ARTrackedImage` class.\n\nSummary\n-------\n\n| ### Public static functions ||\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [IsMarker](#ismarker)`(this ARTrackedImage image)` | `bool` Check if the given image is a marker. |\n| [IsQrCode](#isqrcode)`(this ARTrackedImage image)` | `bool` Check if the give image is a QR code. |\n| [TryGetMarkerData](#trygetmarkerdata)`(this ARTrackedImage image, out `[XRMarkerDictionary](/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary)` dictionary, out int id)` | `bool` Try to get the [XRMarkerDictionary](/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary) and the id from the dictionary of a marker image. |\n| [TryGetQrCodeData](#trygetqrcodedata)`(this ARTrackedImage image, out string decodedData)` | `bool` Try to get the decoded data from a QR code image. |\n\nPublic static functions\n-----------------------\n\n### IsMarker\n\n```c#\nbool IsMarker(\n this ARTrackedImage image\n)\n``` \nCheck if the given image is a marker.\n\n\n| Details ||\n|-------------|---------------------------------------------------------------------------------------|\n| Parameters | |---------|------------------------------| | `image` | The ARTrackedImage instance. | |\n| **Returns** | `true`, if it's a valid marker image. |\n\n### IsQrCode\n\n```c#\nbool IsQrCode(\n this ARTrackedImage image\n)\n``` \nCheck if the give image is a QR code.\n\n\n| Details ||\n|-------------|---------------------------------------------------------------------------------------|\n| Parameters | |---------|------------------------------| | `image` | The ARTrackedImage instance. | |\n| **Returns** | `true`, if it's a valid QR code image. |\n\n### TryGetMarkerData\n\n```c#\nbool TryGetMarkerData(\n this ARTrackedImage image,\n out XRMarkerDictionary dictionary,\n out int id\n)\n``` \nTry to get the [XRMarkerDictionary](/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary) and the id from the dictionary of a marker image.\n\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |--------------|------------------------------------------------------------------------------------------------------------------------| | `image` | The marker ARTrackedImage image instance which returns `true` from IsMarker(ARTrackedImage). | | `dictionary` | The [XRMarkerDictionary](/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrmarkerdictionary) it belongs to. | | `id` | The id from the *dictionary* . | |\n| **Returns** | `true` if it gets marker data successfully and output by *dictionary* and *id* . |\n\n### TryGetQrCodeData\n\n```c#\nbool TryGetQrCodeData(\n this ARTrackedImage image,\n out string decodedData\n)\n``` \nTry to get the decoded data from a QR code image.\n\n\n| Details ||\n|-------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |---------------|-----------------------------------------------------------------------------------------------| | `image` | The QR code ARTrackedImage image instance which returns `true` from IsQrCode(ARTrackedImage). | | `decodedData` | The decoded QR code data. | |\n| **Returns** | `true`, if it succeed to get QR Code data and *decodedData* contains valid data. |\n\nIt can fail to get the data if the tracking server is still decoding or there is not data encoded with this QR code. You can try it again later if decoding finished."]]