5

In my web application, want to implement Augmented Reality with QR code scanned value.

After QR code is scanned get data from the server based on QR code value and show image or objects based on the response.

I have gone through A-Frame blog able to show sample objects with hiro/barcode but with static values. I want to make it dynamic by scanning QR code.

How to achieve this by using AR.js and A-Frame?

prasannaboga
  • 1,004
  • 1
  • 14
  • 36

2 Answers2

2

This can be accomplished with data matrices. Configure your scene like this:

<a-scene arjs='detectionMode: mono_and_matrix; matrixCodeType: 3x3;'></a-scene>

Then, wrap your object(s) in a barcode marker:

<a-marker type='barcode' value='5'></a-marker>

You can use this tool to generate your barcodes: http://au.gmented.com/app/marker/marker.php

Note that matrixCodeType can be one of:

[3x3, 3x3_HAMMING63, 3x3_PARITY65, 4x4, 4x4_BCH_13_9_3, 4x4_BCH_13_5_5]

Some of these will be able to encode a greater number of unique values, but they have varying levels of accuracy. You can read about that here: https://github.com/artoolkit/artoolkit-docs/blob/master/3_Marker_Training/marker_barcode.md

oldthund3r
  • 21
  • 2
  • Thanks, @oldthund3r I tried this example it was working. But in my requirement, I need to work with QR Code which contains uuid. It there any way to get barcode value dynamically using jsartoolkit? – prasannaboga Apr 02 '18 at 06:54
0

How do you open your app/page that contains the AR.js code?

If it is via the QR code itself, you can just append the UUID that you want to have access to as a parameter to the URL and then access that from the URL query parameters.

(You still have to make a marker from your QR code for AR.js to be able where to display your information of course, as AR.js only offers marker based AR.)

janpio
  • 10,645
  • 16
  • 64
  • 107