问题
I am adding an image into ARKit project. But it gives error.
回答1:
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:
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):
Here's the histogram of the image on the right (likewise):
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.
来源:https://stackoverflow.com/questions/50886821/ar-reference-image-the-histogram-of-the-image-is-narrow