0

I'm trying to use Image Tracking with my own image. When I run the app I see that the NFT is loaded (console: [info] Loading of NFT data complete.) but when scanning the image nothing happens.

<!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>

The NFT files are saved in the folder nft_img. The image that I'm using for NFT files is a very simple one.

Tested image

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278

2 Answers2

0

I suggest you to restart with the same code but using the descriptors (NFT marker) of the pinball.jpg image instead (included in AR.js and in jsartoolkit5). If the code is ok, that is you can track the pinball image and the box appear, this means that your initial image, that you want to track is not adequate. Also looking at your image that you provided I can almost certainly say that it is not suitable. If you can create the NFT marker with NFT-Marker-Creator this not means that will have sufficient descriptors for the detection and for the tracking.

For more information on this subject read carefully the wiki of NFT-Marker-Creator and especially the Creating good markers section.

kalwalt
  • 460
  • 4
  • 12
0

in my tests I had to increase the scale because it seems that the size depends on those of the image to recognize (which is usually much larger than the box you are going to draw). In any case, the extraction of the features for the test image you provided returns a confidence value of 0 (obviously too low). I suggest you to use a more complex image (with more features) and increase the scale factor of the box. PS: pay attention to properly close the a-nft tag after closing the a-box one.