google-ar / three.ar.js

A helper three.js library for building AR web experiences that run in WebARonARKit and WebARonARCore
https://developers.google.com/ar/develop/web/getting-started
Apache License 2.0
2.91k stars 365 forks source link

Cannot detect QR-code or ARMarker in markers-example #107

Closed jsalli closed 6 years ago

jsalli commented 6 years ago
Description:

Hi, I can't make the WebARonARCore-browser detect any QR-code or ARMarker I have. In the markers.html-example, I have a console.log inside the "if (markers.length > 0) {...}" on line 227 but it never triggers. I have printed QR-codes version 3 and 10 on an A4-paper from here Online QR-code generator and an ARMarker from here Online ARMarker generator. I also changed the "var MARKER_SIZE_IN_METERS" to value 0.15 which is the real marker size on paper.

I also looked into the issue #93.

Could you please share a working QR-code and ARMarker with us? Could you please help me on how to get a QR-code or ARMarker detected and trigger special content when detected?

ARCore version: Developer Preview 1 WebARonARCore version: 57.0.2987.5 Phone: Samsung Galaxy S8

Additional Information:
jsantell commented 6 years ago

Can you post any source?

jsalli commented 6 years ago

Here is my repo: qrcode-detection-three.ar.js

The markers I have used can be found in the markers-folder. I have printed the markers on A4 paper and then measured the marker to be 15cm in size in my case.

The qrcode.html is a copy of the markers.html example from the three.ar.js repo with couple of small adjustments. The dist and third_party-folders are from three.ar.js repo's master branch couple of days ago.

Thanks for your help! :)

mprafson commented 6 years ago

I have traditionally had success using v2 QR codes that are printed. I make my QR codes here (though I don't think they're anything special): https://www.the-qrcode-generator.com/

To make sure you've hit the v2 length, you just need to type until you see the 4th square appear in the bottom right. So for example, going to the above site and typing "qrcode-test-version2" should work (though that string is arbitrary).

jsantell commented 6 years ago

is this still an issue?

jsantell commented 6 years ago

Closing; please reopen if this is still an issue!