Camera development progress

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

Posting an ASCII log file or terminal messages as screenshot makes it not only difficult to read but also impossible to cut&paste details for commenting them.

You are absolutely right. I guess I just find the terminal on the phone too cool :wink:
I have added the output in a better way.

1 Like

I have a used L5 Evergreen that I bought seperate, and the camera preview is very slow. Going to read this thread and see what could be causing the issue.

1 Like

P
U
R
I
SPEED feature for camera, it on the way
M

5 Likes

@dos can you help me with this? or do you have a hint/clue?

Looks like it fails to run the postprocessing script.

1 Like

Thanks. It was the issue. :smile:
Now I can get going.

I copied the postprocess.sh from /usr/share/millipixels into my build folder and now it works.
I started using the postprocess.sh there is in the build folder when compiling from source, however it contains a lot fewer lines of code than the postprocess.sh in /usr/share/millipixels,
hence it did not save (or postproccesed) a jpg.

Is this intended?