How get detect quality from ARReferenceImage?

Hello.


I'm trying to dynamically create an ARReferenceImage from an online CGImage.


However, depending on the image, the following error will occur.


"One or more images lack sufficient texture and contrast for accurate detection. Image detection works best when an image contains multiple high-contrast regions distributed across its extent."


I think that this indicates that the specified image is unsuitable for AR.

If this error occurs ARSession will stop.


I'd like to check the image detect quality in advance and issue a warning if it is an inappropriate image.


How get detect quality from ARReferenceImage?


Sorry for bad english.

Thank you.

Replies

ARReferenceImage().validate