private void OnARTrackedImagesChanged(ARTrackedImagesChangedEventArgs args)
{
if (args.added != null)
{
foreach (var track in args.added)
{
if (track.trackingState == TrackingState.Tracking)
{
//Debug.LogFormat("DmQrMark.TrackedImagesChanged.Add==> name:{0}", track.trackableId);
cbTracking?.Invoke(track);
return;
}
}
}
if (args.updated != null)
{
foreach (var track in args.updated)
{
if (track.trackingState == TrackingState.Tracking)
{
//Debug.LogFormat("DmQrMark.TrackedImagesChanged.Update==> name:{0}", track.trackableId);
cbTracking?.Invoke(track);
return;
}
}
}
}
I followed the official example for image recognition and use the add
and update
methods to get the currently captured object. However, I’m experiencing an issue with the update information being incorrect during image recognition.
After recognizing an image, I want to scan a different picture. Even when I move the first picture out of the camera’s view, it still appears in the update. Is there a way to clear the recognized images so I can reuse the add
method? I noticed that the content returned by add
is always correct.
Has anyone encountered similar problems or have any suggestions? Any help is appreciated