Start a new topic

Scanning and interpreting qr-codes with Unity

I have a general question about scanning qr-codes with Wikitude: Is there an integrated qr-code interpreter in the software? If so, how do you switch it on? And how can you decide what should happen after scanning?


I tried to have images for image recognition, but the software can't distinguish my three different qr-codes. Everytime it led to the same AR element.


Is there a description for using qr-codes?


If a qr-code with a HTML-reference is scannend, the app should show a button for jumping to the website, e.g.


The facts:

  • Wikitude SDK: 9.5 and 9.6
  • Working with Unity 2020.3.16f1 (for Mac)
  • I didn't find QR-Codes in the documentation.

Thank you.


Hi Björn,
for both the Professional Edition Unity Plugin and the Expert Edition one, there is a sample scene included in the sample projects for exactly that functionality called "Plugins - QR & Barcode" (Professional Edition) and "Simple - QR Plugin" (Expert Edition) respectively.

In this sample scenes, we are leveraging the functionality of a third party lib as the Wikitude SDK itself doesn't provide it, hence the "Plugin" moniker.


Kind regards,

Gökhan

Hi!

Thank you for your help. I found the example and got the few elements for the plugin - it works in my project already!

Finally I understood that the qr-code scanner is not an ImageTracker item and there has not to be a marker for it. The scanner takes every recognized code and delivers a string value back. It's as simple as it is ingenious.

It only becomes difficult if you want to float an AR element on a qr-code!?

Have a nice day

Björn


Hi Björn,

I didn't try it out, but I did a quick research... According to these posts, it seems that it is possible to get some position information back from the BarcodeReader/QRCodeReader:

https://stackoverflow.com/questions/43034961/how-to-get-the-coordinates-of-qr-code-using-zxing


If you take this position (check if it is already in your screenspace) and fire a raycast via AR Foundation, you would get the world space position of the QR Code. Then you'd be able to position an augmentation there...


You would first have to port the scene to AR Foundation of course. Only our Expert Edition SDK supports AR Foundation at the moment and with it, we also include some sample scenes, which demonstrates how the Wikitude SDK is working in an AR Foundation environment.


Kind regards,

Gökhan

Login or Signup to post a comment