-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using QR code as marker #341
Comments
I'm not sure about what you're asking, but it is possible to create a QR Code that contains a marker (pattern or barcode). You can do that with a simple free online tool (https://www.qrcode-monkey.com). You just choose content of QR Code (like an URI) and also upload your marker in "ADD LOGO IMAGE". Details on: https://medium.com/chialab-open-source/how-to-deliver-ar-on-the-web-only-with-a-qr-code-e24b7b61f8cb |
@nicolocarpignoli Let me write what I am trying to do with AR.js. To display 3d object using AR.js we need a marker. Markers are preset Hiro/Kanji, barcode or custom marker which is generated by AR.js marker training I am trying to implement augmented reality in our application to display 3d object after QR code scan on QR code, using AR.js to achieve this. But AR.js need a marker to place the object. With this custom pattern able to place 3d object after scanning QR code based on QR code data. Please check following example in codepen https://codepen.io/prasannaboga/pen/deOLQe, please scan above QR codes(contains text data with colors red, green and blue) in this example, It displaying a 3d box after scanning QR codes box color is changing.
|
Ok, I think I get it. For the second answer, it is possible to scale the object and make it bigger/smaller aside from the marker 'size'. Example (see scale attribute):
With "2 2 2" we scale x2 the a-frame object in every direction. |
@prasannaboga any luck? |
@nicolocarpignoli by using Using rangeslider.js javascript plugin I am calculation scale and rotation value based on slider value. Here is the working example please check Sample20. |
@prasannaboga what qrcode markers are you using for your sample? |
@gravyplaya I created a custom marker with the black square, here is patt file https://raw.githubusercontent.com/prasannaboga/demo_arjs02/master/source/images/pattern-qrcode-square.patt Try this sample18 given above QR codes. |
@prasannaboga any luck? About your first question... I was reading about AR-CODE. I think it can help us. Do you really need multi-markers? So.. here https://jeromeetienne.github.io/AR.js/three.js/examples/arcode.html all you need is change this line: by the default preset "hiro": Example: please let me know if you had something else |
Do you want to request a feature or report a bug?
feature
What is the current behavior?
I have created a custom pattern using QR corner square. Using this custom pattern I am able to show the 3D object any one of the square corners. I am using jsQR library to scan the QR code show the object based on QR code data. Now it scans the QR code and updates 3D box color based on QR Code value.
If the current behavior is a bug, please provide the steps to reproduce.
Sample code in codepen
What is the expected behavior?
Here I want to position the object center of QR code. I want to calculate all three square corners positions and calculate center position. And, when mobile is moving forward/backward to object size increase/decrease based on the square size, but I want to make object always fit to screen irrespective of marker size or distance between marker and mobile.
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Operating System and Device Name
Android Chrome
Ubuntu Chrome
Sample QR codes
The text was updated successfully, but these errors were encountered: