Sure, that’s more or less what mainstream phones are doing. It isn’t even necessary to take a picture. Just activating the camera app and pointing it at a QR code and letting it focus … is enough to solicit a prompt asking whether you want to open that URL (presuming that the QR code does encode a URL).
For where we are at the moment, I wasn’t asking for anything more than being able to take a picture of the QR code. I would like to test that because the next concern is that the relevant government web site doesn’t work with the web browser on the Librem 5. (With care and hassle I could probably test this now.)
I installed zbar-tools on the Librem 5 and that worked fine to decode an example QR code from an image file (.png in my case). Next, I need to get hold of a current actual COVID QR code.
I’ve tested a bit more. With my (one line) script of
#!/bin/bash
epiphany `zbarimg -q --raw QR.JPG`
it works well. (There’s no confirmation there of course. For this purpose just verifying that the domain is the appropriate government domain would suffice.)
The only outstanding problem is that if the image arrives as a RAW file, I don’t know whether ImageMagick supports RAW / I don’t know how to convert a RAW file to a JPG file (or anything else that will work).
There is a known problem where if you crash the application, camera will hang and you need to reboot. That’s not going away soon.
Contributors are needed for:
adding the selfie camera
properly adding support for 10-bit modes instead of the hacky way
testing all resolutions
providing white balance parameters
adding brightness controls (you may need to work with us drectly)
turning hacks adding legacy v4l2 support into something upstreamable
eliminating crashes
The more this moves forward, the more time we have to fix the kernel side properly (even better if some kernel dev who knows media controls comes to help).
A bit noisy cause all the gain, exposure and focus adjustment has to be set manually with sliders - and with a cat you don’t really get much time for fine-tuning that if you want to capture a nice pose
Hi all! A few days ago I built megapixels from this repo, it did not work so I thought I needed byzantium. Now I accidentally opened it and OMG both camera previews are working. Taking pictures from the app does not work for me (I get a really small image with a few colored horizontal lines) but hey, at least it’s something
Rad, I just installed megapixels from the CI job, as well as 5.12 from linux-next ci job. The selfie cam is still mostly just a grey screen, but it’s great to see the big camera working
It’s quite hard to get the focus, gain and exposure right (as they cannot be automatically set yet it seems).
This was my first attempt, didn’t try to fine tune the settings so doesn’t look great and the hardware is certainly capable of much better pictures than what I achieved.
But it’s pretty easy to get working, I am running Byzantium then I simply had to compile Dorotas Megapixels fork and then it “just works”.
EDIT: The default resolution seems to be 640x480 which is pretty low as you can see in the picture above, I just realized however you can change it in the config file so I was now able to capture a picture with 2048x1536 resolution (at least that’s what’s in the config, when running the “file” command on the .tiff it’s 2104x1560 for some reason).