Augmented Reality with ArUco markers


I am trying to create a basic AR patch based on the detect ArUco marker help patch in VL.
I can make the AR object appear on top of the marker but I want to be able to control what specific object appears based on the marker ID. However, my issue is that I am having issue linking the position coordinates output of the marker with its marker ID when there is more than 1 marker in the scene at the same time. The order ID seems to jump around in the spread once the marker is lost from the scene and redetected. Any idea how I should approach this instead?


stabilize your tracking with a method similar to sebl’s tracker
this should be easy to implement in VL

maybe there are also nugets out there for this special case?

I haven’t tried aruco, but as it’s already outputting and apparently maintaining an ID, that’s also probably depending on the marker used, I don’t think that’s needed … I guess the coordinates‘ order match the marker IDs, at least that’s what the patch seems to suggest. If you drop the flatten, you have a Spread of Spreads and each slice of the outer spread seems to be a spread of coordinates for each marker.

Thank you for your replies. I think wasn’t clear in my question as I forgot to mention that I intentionally want to remove the marker from the scene and then replace it back on to the scene.

Correct me if I am wrong but my understanding is that the stabilization with the trackers will only work when all the markers are continuously in the same scene. And that they would only help in reducing flickers and jumping about the markers? I am looking for a solution that permanently assigns an object to the specific marker even when the marker is lost.

For example, I would like to have the green teapot to be always assigned to markerID 18, blue teapot to 12 and red teapot to 5. But as I have used the getslice function to control the objects, once a marker is removed from the scene the spread order will change. My question is, is there a way to keep this fixed or a better approach to get my intended result.

I understood, but you just don’t use the marker ID in your logic yet.
You need a sift to check for 5,12,18 and use the index in which you have a hit. So you have a dynamically ordered index of 0,1,2 and use these to getslice the transform you need (actually I‘d suggest you just connect the transform spread to a single phongdirectional and use the sift index to reorder a Color spread in your specific use case)

1 Like

Thanks! I knew I was missing something. I didn’t know about the sift node.
Got it working now.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.