Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to make AR.js camera less sensitive to movement?

After testing with default and custom marker/model of various size and distance, I concluded that the reason my AR models are having seizure (jittering/flickering/shaking like mad) is because of my hand movement. When the (phone) camera is at rest, the model is stable when the camera is stable.

Because the intention is to share the end product with the public (or anyone whose phone supports WebRTC), I can't calibrate the AR camera, because that would only fix my (phone) problem, not the other audience's.

Is there a setting in AR.js or ARToolkit that governs the sensitivity of the camera?

like image 372
Mr J Wolf Avatar asked Feb 23 '18 11:02

Mr J Wolf


2 Answers

In case you are facing hard mad movements/hyper-sensitivity shaking of images with Ar.JS, and you are using multiple markers in the same page, the solution is to add a <a-entity camera></entity> inside the <a-scene> that contains the markers.

This avoids the automatic camera(s) created by a-frame, and makes everything more stable.

like image 165
user1576978 Avatar answered Nov 17 '22 04:11

user1576978


You could use the object position and orientation from AR.js and average that over a few frames to smooth things out.

like image 38
JohnD Avatar answered Nov 17 '22 05:11

JohnD