← Back to team overview

qreator-discuss team mailing list archive

Re: QML camera is unstable

 

Hi David,

Thanks for the testing. From the size of the images and the picture, I
> assume you took those from the desktop.
>
>
True. I do not have any mobile that runs ubuntu :-(


> 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 actually not sure that they are always too dark on your phone as well.
Maybe 5 out of 500 pictures were bright on my desktop, did you try that
many on your phone? I have used automatic triggering, you can copy the code
from my branch. Let it run for 15 minutes or so and then check your images
for bright ones... :-)


>
> 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.
>

Well, the viewfinder is always totally fine, one the still images are not.
I also noted, that you do not use camera.searchAndLock() "Start focusing,
exposure and white balance calculation." Maybe this mixes up exposure for
viewfinder and still image...
It would be great to directly get the image from the viewfinder instead of
taking a picture...


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

Well, if your images are too dark, then exposure is not ok!


>
> 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.
>

For me it worked everytime the brightness was ok.


>
> 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).
>

You could try to move a desktop-webcam picture and let it scan on the
mobile (hardcoded), just to see the time difference. But sure, higher
resolution should increase the time drastically.


>
> 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).
>
>
The new window looks very nice!
And I have seen that you added the dialogs, with an even better "dynamc
text" mechanism :-) Nice!

Cheers,
Stefan


> I've updated the code on the scanner branch: lp:~dpm/qreator/touch-scanner
>
> Cheers,
> David.
>
> --
> Mailing list: https://launchpad.net/~qreator-discuss
> Post to     : qreator-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~qreator-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References