Get the recognized image for further processing (not the reference image)

My problem is based on this "classical" example of image recognition with ARKit: https://developer.apple.com/documentation/arkit/recognizing_images_in_an_ar_experience


I need to not only recognize an image and place an AR-Object but also to work with the recognized image further (not the reference image!). How can I get it? Especially inside renderer(_ renderer: didAdd node: for anchor:).


As for now I have two hypothesis:

1. Use Vision framework inside renderer(_ renderer: didAdd node: for anchor:) to recognize what I need. I think, it is possible to get the current image from the camer from the current ARFrame.

2. Forget renderer(_ renderer: didAdd node: for anchor:), start with Vision, detect what I need and then make a hitTest() on it to add an ARNode.


I would appreciate a better alternative or maybe some hints on the proposed ways.

Replies

This thread has now about 150 views and no answers... I wonder if it's because people have no propositions or because I describe the problem somehowe vague/unclear...