简体   繁体   English

Xcode错误:AR参考图像必须具有非零正宽度

[英]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参考图像添加到资产目录时,需要添加物理大小:

Xcode AR参考图像UI

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.

相关问题 Xcode AR 参考图太相似了 - Xcode AR Reference Image is too similar 我得到无效的文档参考。 文档引用必须在 xcode 中有偶数段错误 - Im getting Invalid document reference. Document references must have an even number of segments error in xcode SwiftUI Xcode 中的分段 11 非零退出代码错误 - Segmentation 11 non zero exit code error in SwiftUI in Xcode session运行期间如何修改“AR参考图像集”? - How to modify “AR Reference Image Set” during session run? 具有动态高度的 Xcode UItableviewCell,前三个单元格在图像周围有一个宽度,但重用后称为固定 - Xcode UItableviewCell with dynamic height, the first THREE cells have a width around the image but after reuse is called its fixed 出现错误“其Info.plist中没有CFBundleName键的字符串长度值不为零” - Getting error “does not have a CFBundleName key with a non-zero length string value in its Info.plist” 我尝试将图像下载到 firebase 但我收到错误“条件绑定的初始化程序必须具有可选类型,而不是'字符串” - I try to download a image to firebase but I getting an error “Initializer for conditional binding must have Optional type, not 'String” 条件绑定的初始化程序必须具有Optional类型,而不是'IndexPath'-Xcode 8,Swift 3 - Initializer for conditional binding must have Optional type, not 'IndexPath' - Xcode 8, Swift 3 在Xcode 9.2中检索Firebase数据库参考时出错 - Error in retrieving Firebase database reference in Xcode 9.2 无法引用Xcode 6 beta 6中的局部函数错误 - Cannot reference a local function error in Xcode 6 beta 6
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM