Camera development progress

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’d containerize all my browsers and force them to resize to fit the window they’re in via GSettings

I’ve tested a bit more. With my (one line) script of

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

1 Like

Posted 10h ago…

Yes : megapixels working on Librem5

Since the cat is out of the bag, I might as well call for alpha-contributions.

The repository is: and it’s rather hacky.

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


Perhaps it’s time to edit the title of this post!

@dos’s selfie camera, indoors at night, “with some gain and exposure adjustments”:

@dos, “taking photos with the viewfinder” is “easier now”:

Very nice, @dos!


A macro shot from @dos (terminal action required for focusing):

( )


I’m taking a lot of photos lately, like a kid who just got their first camera and has to capture everything around :smiley:

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 :slight_smile:


Have some more from today’s morning:

Plus a bonus where you can clearly see unfiltered autofocus pixels:

Those blue pixels will allow for phase detection auto focus… once it gets implemented in the software :wink:


The pixelated one looks like an old-school commercial Christmas card. Nice effect, actually.

1 Like

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 :slight_smile:


The repo from where we are working on megapixels is this one, but you can pull the debs generated from the pipeline:

Also you need the latest kernel for the Librem 5; 5.12.0-1-librem5


I’m on 5.11.0-1-librem5, I guess that’s why save is not working. I’ll wait until a new kernel will be officially available though :slight_smile:

edit: Yeah I just realized I’m using this repo, I just copied the wrong link in the post, fixing it now

1 Like

Byzantium is not needed at the moment, but that’s likely to change.

1 Like

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 :slight_smile:


i’ve a great feeling about this … who doesn’t like cat pics ? :slight_smile:

@dos continues the Megapixels trials… Check out the latest:

:cat2: :cat2: :cat2:

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

Awesome works guys!

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


Btw, each commit has a ready-to-go .deb file attached in the pipeline.