← Back to team overview

qreator-discuss team mailing list archive

Re: QML camera is unstable

 

On Sun, Jun 9, 2013 at 5:18 PM, Stefan Schwarzburg <
stefan.schwarzburg@xxxxxxxxx> wrote:

> Hi David,
>
> I'm currently testing the touch-scanner branches, and I found that the
> camera exposure/whitebalance/brightness is very unstable.
>
> The attached two images were made within 1 minute and without any code
> changes.
> The important message here is that the pictures are NOT too dark, but that
> they are SOMETIMES too dark and sometimes not.
>
> I'm not sure if this has something to do with our configuration of the
> camera or with the QML or Qt code, but it is definitely something we need
> to figure out before shipping anything.
>
>
Hey Stefan,

Thanks for the testing. From the size of the images and the picture, I
assume you took those from the desktop.

In my case, playing with exposure, white balance or brightness did not make
any difference when pictures were taken from the web cam. So we've got two
cases here: in my case images are too dark, and in your case images go
crazy. I think I share your conclusion that the camera settings *on the
desktop* are not very reliable at the moment.

I'm not sure how we can correct that. In my case, it seemed that the webcam
ignored the settings, so it might be that either the hardware does not
support them, or that the camera plugin for the desktop is not passing the
parameters correctly. Which is weird, as the Qt camera plugin uses
GStreamer as a backend afaik, and Cheese, which also uses GStreamer, takes
pictures with the right brighthness.

In my testing on a device, the white balance/brightness/exposure seem
correct, so this issue apparently only affects the desktop version.

Another issue that I've now got more insight on is the delay in decoding
from a device. It takes about 15-20 seconds to decode a QR code, but in the
limited testing that I've done it seems to work every time, which is really
good.

I believe what might be happening here is that it takes quite a lot of
memory or processing power to scan and decode the images with higher
resolution from the device's camera (on my desktop it takes about 1 second
to decode the webcam's 640x480 images).

I'll try to benchmark if the C++ plugin can do this much faster, but in any
case, a couple of measures I can think of are:

~ Reduce the resolution of the captured image
~ Crop the captured image to the QR code window before sending it to the
decoding library functions

In terms of the QR code window, I've started adding some preliminary code
to show where the QR code should be positioned in the picture to be
scanned, but it's not yet functional (i.e. the window is shown, but it does
not do anything).

I've updated the code on the scanner branch: lp:~dpm/qreator/touch-scanner

Cheers,
David.

References