如何设置图像目标,使其检测同一图像目标的所有尺寸

How to set an image target so that it detects all sizes of the same image target

我想做的是增强有关徽标外观的视频。

但是我的疑惑是,如果这个logo在不同的地方出现不同的大小怎么办?

vuforia 能否检测到这些大小差异并仍然增强视频?

我希望能够做到这一点

简答:你不能。

Vuforia 需要知道目标的实际真实世界大小,以便将您的虚拟 3D 对象放置到正确的位置,尤其是在深度方面。

如果尺寸不匹配,它会制动(只是 returns 不正确的深度位置)。例如。如果您的真实目标比您在 Unity 中配置的要小,那么您的虚拟内容将始终放置 "too far away" 因为 Vuforia 期望您的真实目标更大。

不同缩放但相等的图像目标之间没有任何区别.. none 我知道的跟踪软件能够做到这一点,因为它通常用于将 3D 内容实际放置到 3D 世界位置.. 如果你没有固定的预期目标大小,这将是不可能的,因为如果你靠近目标,相机就会变大。

如果 Vuforia 同时可见多个具有相同图像的目标,它只会采用它找到的第一个目标。

Vuforia 提供了一种在运行时更改预期目标大小的方法,请参阅 Targets 了解更多信息,但这在您的情况下无法自动检测正确的大小。

参见 [ImageTargets]

TargetSize

  • Actual size of the image target in 3D scene units.
  • Developer must specify the target size when creating the target online or in the Database Configuration XML file. The Database Configuration XML file is generated by the Target Manager, but once created, it can be modified by the developer.
  • The target size parameter is important, since the pose information returned during tracking will be in the same scale. For example, if the target image is 16 units wide, then moving the camera from the left border of the target to the right border of the target changes the returned position by 16 units along the x-axis.
    • (x, y) - Target size in scene units measured along the horizontal and vertical axes of the rectangular target.

Note: The size of the image target can be changed at runtime. This offers flexibility in defining or updating the scale of the target in your 3D scene.

Note: Developers looking to use image targets in combination with Positional Device Tracker should specify the target size in meters


另一方面如果你只关心一个纯粹的bool值"Is the target found at all or not"用于启用和禁用某些东西而不关心3D位置和只有在这种情况下 那么是的,你可以使用它 但是 你不会得到任何关于找到或没有找到不同尺寸或多远的信息它实际上远离相机或任何有用的 3D 位置。

您可以使用空间映射在现代 AR 头显上解决这个问题,因为 x/y 位置仍然应该正确,只是深度 z 位置(相机中的轴 space)