Camera development progress

It would totally work short term, and even we’d probably pragmatically accept it.

Long term though, we want the wider community to benefit from it (and to participate), so we need that integrated with libcamera.

3 Likes

One of the problems for not having autofocus available is that older people (like myself) with farsightedness can not really take a focused picture if they do not have their glasses with them. In such a scenario the advice “use manual focus” is not realistic.

2 Likes

I don’t know how it’s made in Android, iOS and other systems, but isn’t it something machine learning AIs can solve best? Not only because it can “learn” how pixels have to look (like Skalman said), but also to get very fast good results for nearly no energy needed. I just have no idea how much work it would be (and I think it is a lot - including training). Such AI may also can do other stuff like auto focus on faces which are not centered etc.

I am just interested in theoretical ways (also what’s realistic and what’s “only theoretical possible”). So hopefully someone can and want to tell me more.

It totally is - my camera has a display resolution much smaller than the sensor resolution, and it shows a zoomed in fragment of the image while focusing. Without it anyone would be out of luck.

No, it’s very well known what well-focused pixels look like: they are full of local contrast. That’s solvable by a simple pass over a portion of the image, instead having to involve neural networks. Maybe if you’re aiming at the algorithm detecting what portions of the picture are “interesting” (like the faces you mention), but that’s a problem on an entirely different level.

5 Likes

So it compares contrast of different zooms. Highest average contrast in a specific area will result in the correct focus. Sounds not as complicated as I thought. Thanks for your explanation.

OK so here is a new attempt at the Stockholm view from Västerbron, only this time I adjusted the brightness setting as @dcz suggested, to avoid the image getting too bright:

It looks much better now, but I still suspect the camera can do better than this. Is it possible to get higher resolution somehow?

An image viewer program says the resolution is 2104 x 1560 pixels, the size of the jpg file is about 170 KB.

16 Likes

Yes, it’s possible to adjust the resolution in Megapixels config file. That didn’t work very reliably though, so it’s not the default.

2 Likes

Your photo is 3,2 megapixel while camera can reach around 13 or 15 megapixel (forgot the correct number). So you can reach 4-5x higher resolution in theory.

Btw, did you focus on the water next to you or was there any problem with manual focus? Everything behind is unsharp.

1 Like

The resolution can be doubled in both dimensions. There are only 3 resolutions of full frame possible, the remaining one is half in both dimensions.

Focus is kinda funny, my 5MPix camera with a sensor of similar size takes similar pictures when perfectly focused. I haven’t taken focused pics on the L5 yet though.

2 Likes

Then 4x higher resolution (~13 megapixel) was right. Was thinking this way, but not totally sure. Thanks to confirm.

That’s why I asked. :wink:

I wanted the focus to be on the things far away in the distance like the church spires and so on in the city, and I did try to adjust the focus setting but I did not quite manage. Some other attempts were even less sharp than this. Looking at the picture now I agree with you that it looks like the water nearby looks more sharp, but that was not my intention.

Maybe there was a particular focus setting that would have given a sharper image, and my fat fingers just failed to find it. It was tricky because the setting I wanted was somewhere near the end of the slider (but not all the way to the extreme), it would have helped if the GUI had let me “zoom in” the slider to fine-tune the focus setting.

4 Likes

With recent byzantium updates, focus on my megapixel stopped working. If anybody else is experiencing that, what worked for me was:

  • sudo apt purge megapixel
  • sudo apt install megapixel
    I noticed I did not have suggested dependencies, so I installed them too
  • sudo apt install dcraw imagemagick libimage-exiftool-perl

    edit:
    Actually, while launching megapixels in the terminal the focus works, but when started from the “app launcher” (clicking the icon in phosh) does not
    edit 2:
    I finally got it. It seems that focus control requires root (asks for the password in the terminal). The problem should have appeared when sudo stopped being passwordless by default
2 Likes

When it comes to Google’s concept of using AI in their cameras (or anywhere else for that matter), I am very suspicious. They may use good algorithms. But I doubt that there is any real AI taking place. It’s probably all just a marketing scam when they use the word AI.

Computer algorithms can be taught how to integrate information in new ways based on pre-programmed algorithms written by human programmers, but not how to exercise real and new innovation.

To simulate human personality traits and to pull off apparent new learning to human audiences, Google’s human programmers often introduce randomness to some algorithms. This causes AI to often return unpredictable results. But by introducing randomness in those cases, the results are most often dumbed-down, not improved. The human traits of true innovation and un-predictable genius are completely missing in such cases. After that, all that remains are the pre-programmed algorithms of some intelligent, maybe even genius human programmers. But the ability to truely learn to learn as AI claims to do (and as the human brain does), is not even a part of those equations. After that, all that is left is shear processing power, the kind that we all know gives computers superior computing capabilities compared to us humans (per the limits of their programming).

I bring this up only to give Librem 5 camera programmers some critical information. Your competition is only other humans just like yourself. Your competition is not some god-like super being, created by Google. In the ways that really matter, today’s AI is only the dumbing-down of the algorithm by adding some randomness. True innovation is never returned by AI generated learning algorithms unless by dumb luck. I don’t think that counting on dumb luck to move humanity forward is going to help us much. AI is mostly a marketing concept to create the illusion that computers can innovate better than humans can.

1 Like

Yeah, that it worked at all was a hack. I don’t actually know how to solve this at the moment, so it might take time. Relevant ticket: https://source.puri.sm/Librem5/linux-next/-/issues/280

My personal stance is that nearly all usage of the word “AI” outside of philosophy is misleading. What does it even mean? Most of the time, you won’t find any indications that a pocket calculator is not AI, nor that your uni student friend isn’t one.

It’s such a technical term that it’s hard for the layman to grasp the technical meaning (as if there was a single one), and so it’s extremely pliable, and thus it means whatever Humpty Dumpty wants it to mean. Ironical use is OK.

2 Likes

Just read somewhere that AI is something that is done in powerpoints and machine learning what is done in tech. And that does not mean either has reached the level that most people imagine they have. It’s one thing to make a small specific thing function better and repeat that (say, enhance image in a certain way using advanced statistical algorithms) than to actually have a anything resembling a learning or developing entity (never mind something with a consciousness, awareness or ability to do general stuff beyond what it was designed to do).

2 Likes

Even this is a level too high. AI also could named as AIS while S means “simulation”. Even dump NPCs in games are currently called AI. But does that mean people cannot understand the difference? Yes, it is missleading, but people should know (also outside of nerd-bubbles) that we cannot create any true AI like in Terminator. And that’s the point: as far as someone get close to any true AI, they would call it “true” AI or “real” AI or similar. So I don’t see the point of this discussion. :thinking:

1 Like

Don’t worry, it will all come back into focus… :wink:

Related issue:

9 Likes

I will donate 100 bucks to @dcz for all the work done in Libcamera and Frontend, but also for archiving new features like Libcamera-gpu-accelerated plus 10 bits & raw.
Dorota-Czaplejewicz a Purism programmer. H e r o s :wink:

3 Likes

How you are doing that exactly. Please, if necessary, reply by PM.

3 Likes