Camera development progress

To be perfectly honest, I prefer this image over anything anyone can take on a “normal” cam that does everything for you. There is humanity and mystery in this photo that I enjoy.

3 Likes

Humanity, mistery and a bad photographer :smiley: But thanks.

I just encountered the bug. :confused:
I Booted the phone when I got up this morning. Then it was in the charger to it was fully charged and then I tried to take a picture and it hang.

I just noticed the new auto-everything features and the video recording feature. Woo!

However, I also noticed that, while auto-gain and auto-exposure are both enabled by default, auto-focus is not. I wondered if this was because it wasn’t quite “ready”.

Sometimes an audible click sound is heard from the camera’s focus mechanism during auto-focusing. The same sound sometimes happens with manual focusing too, but auto-focusing can cause it to happen repeatedly. Is this normal and safe for the hardware?

I am pretty sure I installed Millipixels from the PureOS store, but it is definitely a “dev preview” version. So, did @tomoqv install an even-more-dev version than the one I have, or is there now a version in the store that is not a dev preview? When I search, I can only find the version I already have.

1 Like

The newest version is the first version with video recording.

3 Likes

I dont have an account on the gitlab instance due to pending approval i think or the email got lost getting to my mail server but i noticed you guys are moving over to a postprocessd like setup. If you guys are interested feel free to take as much as you guys need from my megapixels postprocessing scripts that postprocessd took some inspiration from. I added some more things that improved speed while still keeping everything in python so everything was as fast or faster than postprocessd in some cases. Biggest things being the run through libraw will process all the dng images in parallel which is something i see you guys are already doing but instead of saving them into an image format im actually saving them all in a hdf5 file that way reading them back in is quick if there does need to be multi passes. In my case i do a single photo pass and a burst pass so the single photo will just process the main photo that way the end user has something to look at and then will queue up a the burst photo that does any additional postprocesssing and stacking. My stacking implementation is also way faster than the initial setup that both postprocessd and i used as this one will scale the images down for the estimation and apply a correction to use that in the full res images, i also do it in chunks to avoid any issues where memory was running out especially on larger images. This will massively speed up the stacking especially with how high res the camera on the librem 5 is compared to the og PP. None of my changes for things like stacking is exclusive to python so you guys should be able to implement it in C if you guys want or keep it in python since it uses C in the backend anyways. If you do wish to try my megapixels scripts it uses podman to run things but if the tools are available locally it will use them instead, reason for a container was that i was experimenting with pytorch which did not have a build available in the repos and i didnt want to tell people to compile pytorch. The biggest benefit i think is the fact that i can still use bash scripts for the postprocessing without the performance hit allowing people to quickly make some changes and the biggest one i think is being able to change the externanl extension so people can pick between anything they want that is supported by convert or with what extras i included like jxl and avif though of those two only jxl is really performant but that hopefully isnt always the case.


11 Likes

Please send me your email address in private and I’ll get it on gitlab.

Also please no more C :stuck_out_tongue: It’s already giving me headache.

6 Likes

@Luigi311 you are the man

2 Likes

I have made a post about how I maybe can get some more data:

Don’t know if it can provide more info that the devs has already.
But I’ll try. :grinning:

1 Like

I’ve been to Croatia last week and took some really nice photos with Librem 5 without touching any sliders - at least at photo-taking time :wink: Now made a comparison of how the photos look like straight from Millipixels and when developed afterwards in darktable, enjoy:

10 Likes

Nice photos indeed! The L5 jpegs aren’t bad, but in some photos it is quite apparent that they lack clarity. It is like a grey/yellow filter on these photos, which you nicely corrected in the darktable processed images.

I would really like to use my L5 cam more, but unfortunately it is not in a working state as Millipixels hangs after taking a snap just about every time I try.

I’m seeing that as well, but a quick reboot is enough to workaround it.

That would just be white balance being a bit off. Millipixels currently jumps between presets instead of adjusting it smoothly, so it’s pretty much expected to happen sometimes.

1 Like

Is it feasible to store intermediate stages of post-processing in a ramdisk, in order to reduce wear on the flash storage?

I did this on a laptop when I had to get video files from a low-capability device over a network and then re-encode them into a significantly more efficient format, which saved hundreds of gigabytes of writes to an SSD that didn’t have much free space left for wear leveling.

But, I guess phones are more constrained by memory than laptops and it sounds like memory capacity is already an issue for larger images, so it might not be feasible.

Just an offhand thought really.

1 Like

while the initial in-app processing takes only about 2 seconds.

What exactly are you referring to here? When I take a picture, it takes about 10 seconds before the processing wheel stops spinning and I can load up the jpg on my phone.

That’s an older version then. I think this change hasn’t made it into a released/packaged version yet, but it’s been already merged in.

2 Likes

That sound terrific! Does it implement any of the changes to postprocess.sh mentioned here?

No - it’s from a week earlier than that post anyway: https://source.puri.sm/Librem5/millipixels/-/merge_requests/98

1 Like

Nice one, thanks!

Unless miillipixels has changed anything all the images are stored in /tmp which is a ramdisk and is where my script handles all the processing and then moves the final result to the pictures folder so everything is done in ram and not on the emmc.

2 Likes

I have build millipixels from source on my L5 such that I can try to use the ftracing tool which I have mentioned (Ftrace event iterator on Librem5 - Kernel debugging ).

However, when I take a picture with my build the picture is not saved. Am I doing something wrong?
I have not yet made any changes to the source code yet, I used latest commit

I have git cloned.
Followed these steps

$ meson build
$ cd build
$ ninja

and then I run ./millipixels from the build folder.
I have copied the config file here: ~/.config/millipixels/config/purism,librem5r4.ini

I get following output:

Init:

purism@pureos:/media/purism/3065-6464/gitrepoes/millipixels/build$ ./millipixels
Found config file at /home/purism/.config/millipixels/config/purism,librem5r4.ini
Adding camera big from config
matched GRBG8 to GRBG8 3
matched GRBG8 to GRBG8 3
Adding camera selfie from config
matched GBRG16 to GBRG16 14
matched GBRG16 to GBRG16 14

(process:5511): Gtk-WARNING **: 21:15:58.276: Locale not supported by C library.
	Using the fallback 'C' locale.
Found postprocessor script at ./movie.sh
Found postprocessor script at ./postprocess.sh
mp_device_list_find_remove imx7-csi s5k3l6xx 3-002d
20: there's csi, looking for s5k3l6xx 3-002d
20: there's csi capture, looking for s5k3l6xx 3-002d
20: there's imx8mq-mipi-csi2 30a70000.csi, looking for s5k3l6xx 3-002d
20: there's hi846 2-0020, looking for s5k3l6xx 3-002d
19: there's csi, looking for s5k3l6xx 3-002d
19: there's csi capture, looking for s5k3l6xx 3-002d
19: there's imx8mq-mipi-csi2 30b60000.csi, looking for s5k3l6xx 3-002d
19: there's s5k3l6xx 3-002d, looking for s5k3l6xx 3-002d
found!
devname /dev/video1
19: there's csi, looking for s5k3l6xx 3-002d
19: there's csi capture, looking for s5k3l6xx 3-002d
19: there's imx8mq-mipi-csi2 30b60000.csi, looking for s5k3l6xx 3-002d
19: there's s5k3l6xx 3-002d, looking for s5k3l6xx 3-002d
found!
linking flags 0 source 15:0 sink 10:0
MPDevice: MEDIA_IOC_SETUP_LINK error 22, Invalid argument
mp_device_list_find_remove imx7-csi hi846 2-0020
20: there's csi, looking for hi846 2-0020
20: there's csi capture, looking for hi846 2-0020
20: there's imx8mq-mipi-csi2 30a70000.csi, looking for hi846 2-0020
20: there's hi846 2-0020, looking for hi846 2-0020
found!
devname /dev/video0
20: there's csi, looking for hi846 2-0020
20: there's csi capture, looking for hi846 2-0020
20: there's imx8mq-mipi-csi2 30a70000.csi, looking for hi846 2-0020
20: there's hi846 2-0020, looking for hi846 2-0020
found!
linking flags 0 source 15:0 sink 10:0
MPDevice: MEDIA_IOC_SETUP_LINK error 22, Invalid argument
linking flags 1 source 15:0 sink 10:0
MPDevice: MEDIA_IOC_SETUP_LINK error 22, Invalid argument
Setting mode 1052 780

When taking a picture and try to open it via the tumbnail is the app

Making thumbnail
Post process /tmp/millipixels.6PrvoT to /home/purism/Pictures/IMG20230504211604.ext
Could not launch image viewer for 'file:///home/purism/Pictures/IMG20230504211604.jpg': Error when getting information for file ?/home/purism/Pictures/IMG20230504211604.jpg?: No such file or directory

Edit: added ascii output, so the screenshot is now just for the atmosphere)