Image enhancing on the Librem 5

To not further derail the original topic, created a new thread.

@reC, I agree with almost everything you wrote there.
Boy, would I love to be able hack my Pentax DSLR. FOSS firmware etc…!
Just one thing I disagree, and it made me thinking :slight_smile:

Ai

Yuck! Please don’t say that.
AI is 90% marketing blah, the other 10% are scary.
Machine Learning might be used to optimize the post processing algorithms, but I assure you, you get a very long way by using “classic” algorithms to combine/enhance the data of several sensors, and we have sufficiently smart FOSS people to do that without a billion dollar budget.

And everything that goes beyond that is something that I even don’t want in a camera. I don’t want some neural network to hallucinate details into my sensor data, no matter how much better than reality it might look.

BTW, the code the team around Dr. Katie Bouman and Andrew Chael created to picture a black hole is released under GPL. So, if you really want to go to the limit and beyond, just adapt that code for the intended purpose :wink:
(And yes, I know that the electromagnetic waves they processed were not in the visual spectrum. The code doesn’t care)

Hm… :thinking: :thinking: :thinking:
While we don’t have multiple sensors on a rotating globe, we have one image sensor, plus a gyrometer. :crazy_face: And a shaky hand :grin:
Sounds like a real fun project to achieve both stabilization and image enhancing this way.
My aforementioned Pentax can do something similar. It shifts its sensor by one pixel and takes a second picture, combines the two. Et voilà.

3 Likes

I’m no image sensor expert (just a photographer) but that kind of reminds me of the HDR mode of some cameras.

1 Like

Not really. In a limited sense, that might also enhance the dynamic range, but the purpose is to have a less blurry result. See here.
Actually, it takes four pictures. And I never tried it as I’m content with standard. Heck, I even use 14MP instead of 24MP by default :wink:

By contrast, high dynamic range can also be “simulated”, but not by shifting pixels, but by taking a series of pictures with different lightness. The lightest picture will contain more details in the dark corners, but will only be a white blobb in the sunny areas, and vice versa.

Meanwhile I’m a bit shocked about what Huawei does. It’s both impressive and terrifying.

1 Like

i know what you mean. i was refering to the Ai as the part that “halucinates” something over reality or instead of it - to make it “look” more pleasing.

don’t mistake HOW i expressed myself with how i’m feeling. english is not my first language … i’m actually repelled by alot of marketing BS.

what i’m even more repelled by when i think about it is - how far into the “cristal globe” the ones that invented classic copyright/patents have actually seen… to be able to stifle 90% of real progress in one fell swoop … and then came the GPL and GFDL to the rescue. and after that all the Copyleft besties …

you know that RMS is actually a certified genius right ? both Takeda and Mc.Arthur prizes … in this-life-time

i mean - how can you say you own knowledge when all you have done is agregated a VERY small portion of it …

1 Like

I agree.

This was funny :wink:

I think efficiency is important too.

1 Like

@Caliga in regards to pure photography i’m more partial to the full analogue aspect of the semi-early photo taking proceses of developing on the spot such as the ‘wonderous’ picture from the beginning of the movie “wonder-woman” - yes the monorchrome one with Steve Trevor and Diana Prince and the other guys - that first appeared at the end of “2016’s Batman vs Superman” and the one that Diana keeps drolling over every time she gets and oportunity …

it’s such a natural and surreal manifestation of what spontaneous photography should be like. not taking the hours of manual post production in the digital realm. plus it has no Ai and no software headaches. :warning:

1 Like

Okay, but I think there is a middle way.
Low tech: You get what you get.
Hi tech: use smart algorithms to reduce the error/noise that is in the data due to the limitations of our sensors and optics. That, to me, is not manipulation.
Photoshop: manipulate the image to show something that was not there.
AI: well, possibly a mixture of the previous two. However, if it only reduces error, it’s merely a buzzword, but not really AI. If it replaces the photo artist who removes pimples, you might call it AI, even though it is not intelligent. Anyhow, that’s what I’ll never want.

2 Likes

Whoa, huge respect to the scientists! The code is even documented :open_mouth:

I really doubt your Pentax can do anything similar to the magic those astronomers did :slight_smile: The heart of their technique and the key to unblurring things is the increase of the resolving power of their lens by making the lens out of pieces thousands of kilometers apart. The limiting factor of bluriness of consumer camera photos is light sensitivity and the correct focal plane setting, with a sprinkling of other effects. I will be extremely surprised if any consumer camera lens reaches the resolving power limit.

All in all, the code might not care, but it’s built for a different purpose and for completely different data, so it’s not very useful here. Nevertheless, there are other projects, like fcamera, or Magic Lantern. Please let me know if there are other projects that are useful for processing raw sensor data that I don’t know about!

@dcz I wasn’t really serious about that black hole code part. I wrote “if you really want to go to the limit and beyond”, because it also involves some machine learning. Also, note that I then said we only have ONE sensor, so unless you give us Librem 5 v2 with a quadruple camera, I do realize the purpose of the code does not match. :wink:

What my camera does is shifting the magnetically held sensor to improve resolution and to compensate shaking hands. And I think the gyro can help to achieve similar effects.
For example, take 3 pics and auto-select the one with least shaking.
Or use the movement data to enhance the resolution, like it came from multiple sensors.
The former should be simple, the latter an interesting experiment I’ll do as soon as I have too much time to spare :sunglasses:

Hey, that’s a cool idea. I’m looking forward to doing the testing!

1 Like

I’m perfectly content with the FOSS camera app in LineageOS and just hope that we can get something similar in mobile Linux. Yes, I know that the proprietary camera apps are better at guessing what I want in a photo and they do better image processing. I’ve never tried a mobile device with a special AI chip to process images like the Google Pixel 3, Apple iPhone XS and Huawei P30. I’m sure that I would be blown away by what they can do, but I have made a fundamental decision that I don’t need the latest and greatest tech to be happy and I care more about freedom and can live with a few out-of-focus and grainy night time photos.

What worries me is that AI will be perceived as essential in the future, and we can’t avoid it.

2 Likes

On so-called AI, enhancing the moon: What he says.

1 Like

I’m interested to hear what you mean by that.

1 Like

Many people are already using Google Assistant, Samsung’s Bixby, Apple’s Siri, Amazon’s Alexa, Huawei’s Xiaoyi, etc. to interact with their phones. Soon it will be perceived as essential for every mobile device to have a voice assistant that can answer any question and control the device without touching it. I personally thought that fingerprint sensors / face recognition were unnecessary, but now most people won’t buy a phone without it, and it will be the same with voice assistants in a couple years. The only way that you get a good voice assistant is if it is linked to a networked AI that is collecting your data to better train the AI over time. In a couple years, people will expect to be able to point their camera at any object and get both an identification and more info about that object. Augmented Reality will be the killer feature in the future that many people won’t be able to live without, and it will be powered by AI.

I don’t know what kind of processing Google and Huawei do with their AI chips and secret software to make photos better, but I know that no free/open hardware like the Librem 5 is going to have it. We are going to be at a perpetual disadvantage.

I thought AI was really cool until I realized how it would be put to use, and now I fear its consequences for society, because it requires so much of our data.

1 Like

Mostly face detection. Possibly some color correction. I don’t think this is unavoidable at all.

Even then, with the loads of publicly available free photos on the net, I don’t see a reason it couldn’t be implemented with Free Software.

The only issue may be the one where we don’t know how to distribute training data in human-understandable form, letting flooding the user with lifetimes of information, which kind of defeats the point. But understanding “finished” neural networks is an active area of research, so it’s not certain yet.

2 Likes

Sorry, heading off topic…

I mean, I kind of agree with you. It’s a crazy amount of data companies are recklessly sucking up and storing. However, I think any processing of all that data is concerning, whether they sick the ‘AI’ on it or not. :dog:

Back on topic, @Caliga the idea of choosing the best picture out of multiple shots sounded pretty cool.

I would just like the camera to process the photos reasonably fast by default, and preferably without a *shopped moon over the moon shaped lamp in the background. :grin: I guess it could be interesting to have an enhancement mode or something that does some further processing.

I would presume noise reduction too.

Is the camera app going to be based on something like that? Is it likely to have manual controls and RAW file output?

1 Like

I am a reluctant iPhone XS Max user. The camera is not as advanced as Google and Huwawei’s latest and greatest, but it’s perhaps third place.

What I want is something that uses AI to take a photo that looks closer to what I see with my naked eye. Removing noise, improving lighting, contrast, colors, etc. so that it looks “natural.”

Currently, I use AI-powered post-processing tools such as Photolemur, and the AI suite by Topaz Labs to try and do this.

Later, if I want to create an artsy version of the photo, I’ll use the Prisma AI app or similar.

I’d like easy to use FOSS alternatives to all the above.

Or, maybe I need to change my mindset to one of finding the best FOSS tools available and just being creative within their constraints.

1 Like

If such a thing existed, you can be sure it’d be on high end cameras. And it isn’t. There are “auto” modes for many things, but they can still get things wrong under certain circumstances.

Many cell phone pictures suffer from wrong white balance, or the lighting is so poor that ISO needs to be ramped up, which makes the picture “noisy.”

2 Likes

Professional apps will never be FOSS, it requires specific type of RND teams and constant innovation.
FOSS simply cannot sustain such high costs of making this software from scratch.
That’s why the best thing is GIMP, which is far away from Photoshop/Lightroom, and if we are talking about
professional video/sound/3d editing software, there are no open source alternatives for it at all.
There are some apps, but their features are from the 90s compared to non-free counterparts.

Avoiding making professional work just because the software is not FOSS is not a very smart decision.
Kind of like a “I will punish the bus company, and will walk instead” approach.

1 Like

Luckily, a sufficient amount of free software developers does not know this.

3 Likes