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?

1
  • For QR code tracking you should use NFT version of AR.js Mar 28, 2022 at 12:29

2 Answers 2

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

1
  • 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? Apr 2, 2018 at 6: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.)

1
  • Sorry, I don't know what I am looking at there.
    – janpio
    Feb 21, 2019 at 16:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.