Ar.js: Camera resolution is low

Created on 11 May 2019  路  6Comments  路  Source: jeromeetienne/AR.js

Describe the bug
Not sure if it is a bug or expected behaviour. The resolution of the camera is pretty low, ranging from blurry to very pixelated depending on the phone used (I tested on an iphone 6s, iphone 8 and a brand new huawei).

To Reproduce
My code is the same as the README, except to the changes made to the <a-box>.

Expected behavior
Crisper camera, I guess.

Screenshots
Screenshot_20190511_162750_com android chrome

Smartphone:

  • Device: Huawei P30 lite
  • OS: Android 9
  • Browser: Chrome
  • Version: 74.0.3729.136

Most helpful comment

Ok I found the way to change that parameter:

on the a-scene, parameter 'arjs', set this:

sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960;

defaults are here (640 and 480 pixels): https://github.com/jeromeetienne/AR.js/blob/master/three.js/src/threex/threex-artoolkitsource.js

All 6 comments

try another random web demo using the mobile camera, to see if there are differences. like: https://davidwalsh.name/demo/camera.php

In this demo you sent me it looks much better. I tried using <a-marker-camera> and <a-camera-static> but they had the same results. I haven't tried using just a normal video element because I assumed that the whole camera logic would be gone. I thought it might be like this because the video is covering the entire screen but in that case older phones should have it worse, right?

Ok I found the way to change that parameter:

on the a-scene, parameter 'arjs', set this:

sourceWidth:1280; sourceHeight:960; displayWidth: 1280; displayHeight: 960;

defaults are here (640 and 480 pixels): https://github.com/jeromeetienne/AR.js/blob/master/three.js/src/threex/threex-artoolkitsource.js

That did the trick! I must have missed those options in the documentation. Thank you 馃槃

Which documentation 馃槃

I meant this section of the /aframe README, the attributes were there and I didn't notice :B

Was this page helpful?
0 / 5 - 0 ratings

Related issues

quistuipater picture quistuipater  路  7Comments

omarojo picture omarojo  路  3Comments

pvnr0082t picture pvnr0082t  路  4Comments

Samsy picture Samsy  路  5Comments

arifqz picture arifqz  路  4Comments