I am wondering how can I add and activate datasets from the file after some image target is found? I'd also like to deactivate/unload that database loaded after the target, which previously triggers to add the dataset, is lost.
The reason I want to do this is that I have a fairly large amount of images to be recognized by the AR camera, and I don't want my program to have all the image target added. I'd like to build up a tree. Only when you have detected all the ancestors(image targets), can you detect the leaves(image targets).
I have tried some method, trying to insert the code in the following page:
to the OnTrackingFound() function in the Default Trackable Event Handler component of the image target. But it raises an error:
Exception in the callback: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
Can anyone have some suggestions on how to solve it? Thanks in advance for the help.
As shown in the attachment, I'd like to have DinosaurBack.jpg detected first and then load the some dataset and recognized what is in the blank area like DinosaurTrex.jpg. (the expected outcome is only scan DinosaurTrex.jpg and get the result)