在Ar.js中播放跟踪图像的视频顶部

问题描述 投票:-1回答:1

我正在跟踪图像后尝试播放视频。但是我做不到。我可以听到视频的声音,但无法将视频放在图像的顶部。代码如下。

https://glitch.com/edit/#!/join/13d94c52-526b-481b-900f-872bd598f3d7

这是跟踪图像

https://raw.githubusercontent.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex-image-big.jpeg

我的代码怎么了?

augmented-reality aframe ar.js
1个回答
0
投票

我认为您的代码没什么错,但是实际上nft功能是实验性的,尚有一些优化要做。现在解决的可能方法是:在原语中添加side="double",并尝试使用较小的视频来减小宽度大小并调整压缩率。

另一个问题可能是您使用的描述符(NFT标记),如果它的dpi较低且宽度不足,则只能在图像附近很近的位置跟踪图像,并且无法跟踪图像的近平面。相机。


0
投票

我在图像跟踪方面也有问题。

我正在尝试对自己的图像使用图像跟踪。当我运行该应用程序时,我看到已加载NFT(控制台:[info] Loading of NFT data complete.),但是在扫描图像时却没有任何反应。

<!DOCTYPE html>
<html>
  <script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
  <script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.js"></script>
  <body style="margin : 0px; overflow: hidden;">
    <a-scene 
    vr-mode-ui="enabled: false;"
    renderer="logarithmicDepthBuffer: true;"
    embedded 
    arjs>
      <a-nft
        type="nft"
        url="nft_img/sImg"
        smooth="true"
        smoothCount="10"
        smoothTolerance=".01"
        smoothThreshold="5"
      >
      <a-box 
          color="blue"
          scale="0.07 0.07 0.07"
          position="0 0 0">
        </a-box>
      <a-entity camera></a-entity>
    </a-scene>
  </body>
</html>

NFT文件保存在文件夹nft_img中。我用于NFT文件的图像非常简单。

Tested image

© www.soinside.com 2019 - 2024. All rights reserved.