Flexibility of ARImageTrackingConfiguration targets

Hello, we would like to use this API to track an image in our camera view. We have run the demo where we upload a static image and it finds it great. However, our target is actually a small pattern of shapes; triangles, circles and squares arranged in a rectangular pattern, which encircles some visual information that we want to take a picture of and upload (in other words, its the "payload" and is highly variable).

Is there a way that we can describe such a target to ARImageTrackingConfiguration? Two things that might work are

(1) can we provide an image with translucency, where basically those pixel are "don't care"... anything will match them. That way we can make the center of the target trasnparent/ignored, and it will not throw off the pattern matching. Our experiments indicate that this doesn't work, but something like this would increase versatility so much, that I can't imagine there isn't *some* way to achieve this.

(2) provide irregularly shaped (not rectangular) images... I guess this is similar to 1. We would like to match certain polygons within the area, and ignore the rest.

(3) Can we provide multiple images, preferably with spatial relationships, that are matched simultaneously?

This reads like a wish list, but Im just thinking about how constrained this powerful tool is if it is limited to rectangular images. Is there any clever way to accomplish what we are trying to do? (Other than complex custom image analysis.)

Replies

It is not possible to define "ignore regions", but for a start you could experiment with using only a partial area of your target as a reference image. For example, if you know that the top left area will never change, you may want to create an ARReferenceImage depicting just that part (provided that it is rectangular).

Detecting multiple images, as outline in your third idea, can work as well. If you use a world tracking configuration, you can look at the transforms of each detected ARImageAnchor and thus determine if they have the required spatial relationship to each other. You can detect multiple images at once by passing them into your configuration's set of detectionImages.