2

I am adding an image into ARKit project. But it gives error.enter image description here

rickster
  • 124,678
  • 26
  • 272
  • 326
Rajesh Maurya
  • 3,026
  • 4
  • 19
  • 37
  • This warning is telling you that your ARSession may have trouble picking up the image because its suitability isn’t ideal e.g it doesn’t have areas which are clearly defined or it contains lots of the same colour etc. – BlackMirrorz Jun 16 '18 at 11:26

1 Answers1

5

You have an image whose content is not good for detection. There's a section in the WWDC18 talk What's New in ARKit 2 that talks about this and has some examples of what's good and what's not:

enter image description here

The image on the right has multiple problems, but shares the "uniform color regions" and "narrow histogram" issues you have. For a human, that image is pretty easy to recognize, because it uses our ability to identify solid shapes on empty backgrounds — that ability apparently isn't a strength of the computer vision algorithm in play here, though. Instead, you're looking for lots of detail — many points across the extent of the image with high local contrast. Also, you're looking at it in grayscale and at low resolution because you want to run at 60 fps on a mobile device.

Here's the histogram of the image on the left (after converting to grayscale):

enter image description here

Here's the histogram of the image on the right (likewise):

enter image description here

The histograms are a way of quantifying that the good image has lots of gradations of brightness, where the bad image has large chunks of only a few distinct shades of gray — you want the former.

rickster
  • 124,678
  • 26
  • 272
  • 326
  • Hey, thank you for your response. How do you get the image histogram? Is there a web service for it? Did you do it on Xcode? – aviggiano Aug 16 '18 at 19:27
  • 1
    These histograms I got by opening the image in the stock Preview app, converting to grayscale, and taking a screenshot from the Adjust Color window. If you want to do it programmatically in your app there's a Core Image filter for that. – rickster Aug 16 '18 at 20:01