ARKit 无法检测到参考图像
我正在尝试使用我的应用检测图像。我将此添加到我的arresources assests
:
它是具有白色背景的JPG。
但是当我尝试使用此错误扫描时,Xcode正在抱怨:
错误域= com.apple.arkit.error代码= 300“无效的参考图像。” USERINFO = {nSlocalizedFailureReason =一个或多个参考图像的纹理不足:组(3),NSlocalizedRecoverySuggSuggestion =一个或多个图像缺乏足够的纹理,并且无法进行准确检测。当图像包含在其范围内分布的多个高对比度区域时,图像检测最有效。 “组(3)” ),nslocalizedDescription =无效的参考图像。}
我不完全理解它。为什么不能检测我的形象?我必须改变什么?我已经在检查员中设置了width
和高度
,并确保图像具有高分辨率(4096x2731)
I am trying to detect an image with my app. I added this one to my ARResources Assests
:
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
ARKit 的 AI 会看到黑色图像-and-white 光谱,因此图像检测背后的主要思想是相当丰富的视觉细节(大量白色 BG 区域不是好主意,以及重复的纹理图案),高对比度,明亮的周围环境,校准的屏幕(无蓝色或黄色色调)。此外,无需使用 Hi-Rez 图片进行图像检测 – 即使 400 像素宽的图片就足够了。
Apple 的建议可以为您提供有关此主题的一些附加信息。
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.