Start a new topic
Solved

Qrcode

Hi Wikitude Team : 

I do some research on JS Sdk sample qrcode these days

and I can see the qrcode decoded part is in BarcodePlugin.cpp and it passes the data to qrandbarcode.js WorldLoaded function


I am confused with if we would like to put model on qrcode when user aims at it (like sample surfer with imageOne model) , except import the qrcode as target image in Wikitude Studio , because it can only detected the qrcode image that is in .wtc file.


If I would like to scan any qrcode and when user aims at it , it appears the model  , do you have any suggestions?


can I do this in javascript code?

because If I add model in android (java) code class , the model moves  with the camera , so how can I know the right position in phone screen of the qrcode?


ps. The attachment is I set the qrcode as target image in Wikitude Studio and put the wtc file in the project , so that if I aim at this qrcode , it will appear model on it. But I hope it can contains any qrcodes. that is my question. 


Thank you Wikitude team!


 

522773.jpg
(103 KB)

Hi Milly,



I'll briefly summarise how you would need to implement the QR code tracking.


For a dedicated QR code tracking you need to employ a third party library to do the tracking, since the Wikitude SDK does not inherently support it - you've clearly already done that.

For the third party QR code tracking to be available in the Wikitude SDK, you'll need to write a plugin for the SDK that sends your QR code tracking data to our SDK. This plugin will need to be in C++ and use a feature we call the Positionables API. Positiobales are a way to connect the rendering of the Wikitude SDK with custom tracking data; it's essentially a way of saying "please use this tracking data instead of the Wikitude tracking algorithms for this model".


If you have a look at the marker tracking plugin, it does just that; not with QR codes but a different kind of markers. So you should be able to copy and paste most of the code, just replacing the aruco marker tracking library we use with your QR code tracking library.


Here is the relevant documentation page:

Positionable API



- Daniel


Good morning Daniel :)

Yes , the concept is I need to scan every QRCode and shows the related information with model or videos on it for the QRCode.

And if I use Positionable feature , it seems still need to set QRCode as target image

, is that correct?


So I use simple Instant tracking feature and with other 3th party QRCode library.

Do you think I can make it by this way?


Thanks Daniel :)

Good morning Milly, 



I'm confused; why would you need to render it in Java? Did you write a plugin for the Wikitude SDK that uses the 3rd party QR code library? If so, the Positionable feature is what you need. You can find its documentation page here.



- Daniel

Hi Daniel :

I just took your suggestion and use the 3th party of qrcode , it gave me the corner points of the QRCode , can I ask how can I render 3D model on QRCode with java code? 


Thanks!

Thanks for reply Daniel.

I am wondering if marker tracking can be traced the position without use it as target image , since we cannot import all QR-code as target image.


Thanks!

Hello Milly,



the Wikitude SDK does not support QR code augmentation specifically. As you've correctly found out, the only way to do that would be having your QR codes as regular image targets. How well that would work compared to natural images I do not know, I suspect not quite as well. The QR/barcode sample simply evaluates the code's content, it does not track it.


Alternatively, you could have a look at the marker tracking sample we provide to showcase the positionable feature of the SDK. It tracks QR-like markers using a third party library and the Plugins API of the Wikitude SDK. Maybe this fulfils you needs. Using another third party library in the same manner would also be an option.



- Daniel



Login or Signup to post a comment