ARKit cannot detect reference image

Viewed 115

I am trying to detect an image with my app. I added this one to my ARResources Assests:

enter image description here

It is a JPG with a white background.

But XCode is complaining when I try to scan it with this error:

Error Domain=com.apple.arkit.error Code=300 "Invalid reference image." UserInfo={NSLocalizedFailureReason=One or more reference images have insufficient texture: Group (3), NSLocalizedRecoverySuggestion=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., ARErrorItems=( "Group (3)" ), NSLocalizedDescription=Invalid reference image.}

I don't quite get it. Why can it not detect my image? What do I have to change? I already set the width and height in the inspector and made sure the image has high resolution (4096x2731)

1 Answers

ARKit's AI sees images in black-and-white spectrum, so the main idea behind image detection is rather a rich number of visual details (massive white BG area isn't a good idea, as well as repetitive texture pattern), high contrast, well-lit surrounding environment, calibrated screen (no bluish or yellowish tint). Also, there's no need to use Hi-Rez pictures for image detection – even 400-pixels-wide picture is enough.

Apple's recommendations can give you some additional info on this topic.

Related