Log in or register to post comments

Accessing Camera object on java level

August 11, 2011 - 7:03am #1

Hi,

Is it possible to get android.hardware.Camera object from QCARUnityPlayer.QCARPlayerProxyActivity on java level (i.e. in my own Unity plugin)? If so how? Is there a documentation for public API of QCARUnityPlayer?

Thanks,
Paulius

Re: Accessing Camera object on java level

August 16, 2011 - 10:44am #4

Hello Paulius,

Can you provide more information on the device being used? What Android OS is the device running? The Gingerbread update for the EVO 4G has fixed a lot of issues with the device itself. The QCAR sample apps provides auto focus functionality and I can confirm they work on the EVO 4G and can run Auto Focus. What device are you using that is returning false when running Auto focus? Have you tried the Auto Focus from one of the QCAR Sample apps?

I was also able to detect and track using the front of a $1 bill in "Mode_Default" on a EVO 4G running Gingerbread.

It is possible the user ran the camera app and set the focus to "Macro". This may explain a blury image when running a QCAR app.

Thank you,

-Peter

Re: Accessing Camera object on java level

August 16, 2011 - 5:36am #3

Hi,

The issue: we having problems with focus on Evo 4G. Basically marker (1 dollar bill) is out of focus 9i.e. too blurry) when you keep camera at distance at which marker should be recognized (10-20cm).

Theoretical solution: trigger autofocus on camera

Practical solution #1: I've read that we should set ARCamera mode to "Quality". That didn't help.

Practical solution #2: I've tried using interface provided by you for triggering autofocus. That didn't work* (functions return false). *Since I don't have Evo 4G, I tried it on device which has focusing in camera.

Practical solution #3: My client asked me to get access to Camera object on java level and try to trigger autofocus there, since "we do not trust wrappers" :)) I can't access java Camera object by calling Camera.open, since it's locked by QCAR, so I though maybe I could get the object from QCAR.

Have you tried Evo 4G? Are there any known issues?

I noticed that default Camera application doesn't do any focusing while in "record" mode, only in "take pictures", so maybe it's all by-design, but problem is that my client claims that on Evo 4G there is so much blur that it doesn't recognize the marker. I don't own Evo 4G, which makes it's hard to investigate on my side....

Thanks,
Paulius

Re: Accessing Camera object on java level

August 15, 2011 - 6:58am #2

The camera object is owned internally by QCAR and is not accessible. If you can tell us about your use case we might be able to add the functionality you require.

QCARUnityPlayer is not open source, but it is rather similar to the main activity that comes with our native Android SDK samples. There is no API to go along with it.

- Kim

Log in or register to post comments