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

AR Marker example logs 0 markers #93

Closed nylki closed 6 years ago

nylki commented 6 years ago
Description:

I tried the new marker example on a Pixel XL and remotely opened the console on the device via Chrome via USB. I pointed the device while the camera was on on different kind of QR-Codes and a few aruco-markers but didn't see anything. The log continuesly logged 0. The only rendered 3D-object that could be occasionally seen was a grey cone in the middle (but it appeared mostly when the camera was hold shut by my hand or layed on the table).

Additional Information:
nylki commented 6 years ago

Ok, I played a bit more with different distances between device and the QR-Code (the marker), and actually printed a marker out on paper. Which worked fine now!

jsantell commented 6 years ago

Great! The size of the marker is important as well; glad you got it working!

judax commented 6 years ago

Thanks for testing this new feature! A couple of things to take into account:

1) There are different versions of QRCodes (from 1 to 40!). The ones that work with the current implementation are version 2 and above. The way to identify these QRCodes is by a distinctive square on the lower right side of the marker. This is usually tied to having more content in the QRCode. We might update the docs to explicitly make this available.

2) The AR markers are very specific. We will add a PDF with the markers that can be used.

3) The marker detection is not perfect and not completely recommended, at its current state, for continuous marker tracking. But for marker detection and content retrieval, it can be very useful.

Thanks again! We will try to update the content of the documentation with this information,

nylki commented 6 years ago

@judax regarding point 2: Thanks! looking forward to it, was wondering what"AR-marker" actually implied, as that could be any of aruco, reactivision, hiro/artoolkit, etc. markers.

I have previously experimented with compiling artoolkit via https://github.com/artoolkit/jsartoolkit5 and letting that do hiro-marker detection which is very performant (I easily get 60fps, with a very good detection rate at different device<->marker distances, angles even in some bad light situations). However jsartoolkit can be a pain to compile and use. Initially my goal was to actually integrate jsartoolkit with three.ar.js by grabbing the camera image that three.ar.js draws onto the canvas and use it as input for jsartoolkit to get detected markers and their transformation matrix. But seeing that you are already working on integrating marker detection support into three.ar.js, I thought I'd rather try out your approach first which would be less of a maintance hassle in the long run.

Will continue to test newer version and will report my results. :) Thanks for all your work so far!