Hi Medabit,
Thank you so much for such a thorough reply, it is hugely helpful to know these details.
I’ll explain a bit more my use case and my current setup:
In my Scene (among other things) I have an ARCamera, a VuMark and an empty game object that I use as a “processing manager” - let’s call it ManagerObject. ManagerObject has a script attached - let’s call it ProcessCameraImage.
During the Start() of ProcessCameraImage I register a TrackablesUpdated callback, during which the camera image is accessed and subsequently processed. The image processing is done only on a specific region determined by the VuMark’s position with respect to the ARCamera. The result of this processing is stored.
During the Update() of ProcessCameraImage, the result of the image processing of the current frame (computed during the TrackablesUpdated callback) is compared to the processing result of the previous frame, and a “decision" is made based on that.
In my current setup, I think what’s most critical is:
* Having the guarantee that the TrackablesUpdated callback is called in *every* single Update cycle, since otherwise the decision making I do during Update would be messed up. Do you think this is something I can rely upon even if you change things in the future?
* Understanding the execution order of the Update() during which the trackables are updated, and the Update() of my ProcessCameraImage script. As far as I know the order in which Unity executes Update functions is arbitrary although it can be enforced in the Project Settings if necessary. Is anything done internally in Vuforia with respect to controlling this execution order at all? Not sure if it’s even possible but it’s worth asking :)
Regarding your question, I don’t think my use case falls into that category, I wish I could be more helpful. The only reason I can think of that being necessary would be if I wanted to compute something physics-related during FixedUpdate that had to match the state of the trackables. If you’d want to share a use case yourself that would be super interesting to read.
Thanks a million again for your help!
Hello,
Apologies, but Vuforia 7.2 does not provide APIs to access the source image of a User Defined Target.
One possible approach would be to capture the camera frames just prior to creating a User Defined Target: https://library.vuforia.com/content/vuforia-library/en/articles/Solution/Working-with-the-Camera.html#How-To-Obtain-HD-Camera-Frames (see "How To Access the Camera Image in Unity").
Thanks,
Vuforia Support