Camera development progress

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?

I don’t think running the build without installing it is supported. Why won’t you build a deb file with your changes? You can even use the GitLab CI to do that for you.

1 Like

Master @dos any e.t.a for 10bits main camera sensor driver? HDR…

Multiple reasons. I’m not too much of a fan of these build systems so I always try to keep it as simple as possible and omit whatever I can to lean the process.

In this case millipixels is build after the “ninja” command, hence the only thing I had to do was to figure out where to place the config-file and postprocess-file. Difficult enough, but luckily you could help me out. :wink: :smile:

I do not know the ninja build system, but the “install” command if I understand correct will overwrite my version of millipixels installed by default? I would really like this not to be the case, then I could end up with a version not being able to take pictures and it would also not be possible to test multiple versions at the same time when the “hanging-bug” occurs.

With the current setup I can compile “my” version of the millipixels in the cloned git folder and I can therefor have two completely distinct versions. I can make adjustments on the go and compile it on the phone. Takes a couple of seconds and I’m ready to test. No need for Gitlab, no deb-files to be installed, and no overwrites of the mainline apps.

Maybe I missing some smart parts of ninja? but it seems that I have all I need so far. :smile:

BTW, one observation I have made is that when the hanging-bug occurred for me last time within the millipixels I’ve compiled, I tried the mainline version and it hang there too. So it seems to be a more “global” problem. But I think that this was already suspected. So maybe no new knowlegde.

1 Like

You can install into a specified prefix and leave the system-wide version intact.

BTW, one observation I have made is that when the hanging-bug occurred for me last time within the millipixels I’ve compiled, I tried the mainline version and it hang there too. So it seems to be a more “global” problem. But I think that this was already suspected. So maybe no new knowlegde.

The hanging problem has been fixed in Millipixels 0.22 released 3 days ago.

3 Likes

Nice, trying it out now.

1 Like

I’ll try to look at that.

Very nice. :smile: I’ll still be playing around to integrate our trace event iterator, but I don’t expect it to contribute to anything. However it is a cool case to test it out.

I can confirm that I have experienced one case where the old version hang and the new version could take pictures. :grinning: