[英]Xcode Error: AR reference image must have non zero positive width
Help I'm playing around with ARKit's Image detection and I have no idea why every image I place in the AR Reference folder has an error: 帮助我正在玩ARKit的图像检测,我不知道为什么我放在AR Reference文件夹中的每个图像都有错误:
AR reference image 'name' must have non zero positive width
AR参考图像'name'必须具有非零正宽度
I'm not really sure what that means and I'm not having any luck when I google it. 我不确定这意味着什么,当我谷歌它时,我没有运气。
How do i fix this? 我该如何解决?
When you add an AR reference image to your asset catalog, you need to add a physical size: 将AR参考图像添加到资产目录时,需要添加物理大小:
This is necessary for ARKit to locate the image in the user's physical environment — otherwise it can't tell whether the image appears small in the camera image because it's physically small and nearby or because it's large and far away. 这对于ARKit将图像定位在用户的物理环境中是必要的 - 否则它无法判断图像在相机图像中是否显得很小,因为它在物理上很小并且在附近,或者因为它很大而且很远。
It could be because there are some limitations with the software: 可能是因为软件存在一些限制:
ARKit performs best when the host app is searching for 25 or fewer distinct images in a given environment
当主机应用程序在给定环境中搜索25个或更少的不同图像时,ARKit表现最佳
Developers should provide reference images, including information on physical size, to optimize detection
开发人员应提供参考图像,包括物理尺寸信息,以优化检测
ARKit does not track changes to the position so precise placement of virtual assets could pose a problem
ARKit不跟踪位置的变化,因此虚拟资产的精确放置可能会造成问题
A separate section covers potential interruptions to the AR experience 单独的部分涵盖了AR体验的潜在中断
Also, please refer see this answer that might reference you into right direction 另外,请参阅这个答案 ,可能会引导您进入正确的方向
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.