Re: How do I de-blur a picture?

2019-07-24 Thread ToddAndMargo via users

On 7/24/19 2:31 AM, Michael Schwendt wrote:

On Tue, 23 Jul 2019 14:36:06 -0700, ToddAndMargo via users wrote:


On 7/23/19 9:45 AM, Kam Leo wrote:

Just asking, have you tried the tools in GIMP?


Yes.  Does not help.


Which is what the end of the article sums up.


My camera was too close.  This is a 1/4" at best dicot flower
from a goji berry bush.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: How do I de-blur a picture?

2019-07-24 Thread Michael Schwendt
On Tue, 23 Jul 2019 14:36:06 -0700, ToddAndMargo via users wrote:

> On 7/23/19 9:45 AM, Kam Leo wrote:
> > Just asking, have you tried the tools in GIMP?  
> 
> Yes.  Does not help.

Which is what the end of the article sums up.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: How do I de-blur a picture?

2019-07-23 Thread ToddAndMargo via users

On 7/23/19 9:45 AM, Kam Leo wrote:

Just asking, have you tried the tools in GIMP?


Yes.  Does not help.
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: How do I de-blur a picture?

2019-07-23 Thread ToddAndMargo via users

On 7/23/19 5:25 AM, William Oliver wrote:

This really isn't a Fedora question but...


Thank you!
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: How do I de-blur a picture?

2019-07-23 Thread Kam Leo
Just asking, have you tried the tools in GIMP?

On Tue, Jul 23, 2019 at 7:56 AM George N. White III 
wrote:

> On Tue, 23 Jul 2019 at 06:05, ToddAndMargo via users <
> users@lists.fedoraproject.org> wrote:
>
>> Hi All,
>>
>> Fedora 30, x64
>>
>> Anyone know of a way to remove the blur from this picture?
>>
>> https://ibb.co/cTPNHLf
>
>
> This image has "out-of-focus" blur for portions of the image that were
> "too" close to the camera.  For
> tools that run on linux see:
> https://www.maketecheasier.com/fix-blurry-photo/
>
>>
>>
>>
>> Many thanks,
>> -T
>> ___
>> users mailing list -- users@lists.fedoraproject.org
>> To unsubscribe send an email to users-le...@lists.fedoraproject.org
>> Fedora Code of Conduct:
>> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
>> List Archives:
>> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
>>
>
>
> --
> George N. White III
>
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
>
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: How do I de-blur a picture?

2019-07-23 Thread George N. White III
On Tue, 23 Jul 2019 at 06:05, ToddAndMargo via users <
users@lists.fedoraproject.org> wrote:

> Hi All,
>
> Fedora 30, x64
>
> Anyone know of a way to remove the blur from this picture?
>
> https://ibb.co/cTPNHLf


This image has "out-of-focus" blur for portions of the image that were
"too" close to the camera.  For
tools that run on linux see:
https://www.maketecheasier.com/fix-blurry-photo/

>
>
>
> Many thanks,
> -T
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct:
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
>


-- 
George N. White III
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: How do I de-blur a picture?

2019-07-23 Thread j.halifax2
Great contribution, Willi! 
Thank u so much as well. :)
jh


-- Původní e-mail --
Od: William Oliver 
Komu: users@lists.fedoraproject.org
Datum: 23. 7. 2019 15:30:05
Předmět: Re: How do I de-blur a picture?
"This really isn't a Fedora question but...

Blurring a pixel is simply replacing it with a weighted average of it
and the surrounding pixels. The mathematical process is called a
"convolution."

Classically, in order to deblur an image, you need to know the blurring 
function (the set of weights on the surrounding pixels, the shape of
the group of pixels used in the blur, and the size of the region used
in the blur). When done directly, this blurring function is called the
"point spread function" for obvious reasons. It turns out that there's
a neat thing about this in that the process of blurring is
computationally expensive when done directly, but if you do a fourier
transform of the image, it's just a multiplication of the image with
the blur function (called the "modulation transfer function" in
frequency space).

Reversing the convolution that resulted in the blurred image is called
"deconvolution."

The down side of doing things in frequency space is that many of the
coefficients are very small, or zero, usually, and 1) you can't divide
by zero, 2) small errors in very small numbers lead to very big errors
when you divide by them. So, if you don't have your point spread
function perfectly characterized, your error blows up. There are all
sorts of ways to try to get around this, both in image space and
frequency space, but the bottom line is that if you know your point
spread function well, you can deblur well, and if you don't, you can't. 

The well-known "unsharp mask" function is basically one iteration of a
multi-iteration deconvolution method in image space that assumes the
blur function is a gaussian/binomial. Thus, it doesn't look too bad if
you do it a little, but looks horrible if you do it a lot -- because
the real blurring function is likely not a gaussian. The more you do
it, the more the error becomes dominant.

You can try to do this without knowing the blurring function. This is
called "blind deconvolution." However, these methods usually force you
to make assumptions about things in the image, and then modify the
image to fit those things. The classic example here is astronomy
photography where you can assume that a distant star it just a dot, or
microscopy where they sell tiny little spheres that you then photograph 
and modify the image so that they look like little spheres. That way
you can estimate the point spread function and go from there.

Deblurring was a big deal in the 1980s when they put up the Hubble
telescope and found out they had polished the mirrors incorrectly. The
US government dumped millions of dollars in (successfully) trying to
correct for the Hubble blur. It then became very popular in
specialized microscopy, such as confocal microscopy, where you are
pushing the optics to their limits.

The other big advance was for smartphones. There are two common ways
to make sure you take good photos. The first is to have excellent
lenses with great optics, and try to do as little post processing as
possible. The second is to have a cheap lens that is well
characterized mathematically and designed to have few of those bad
coefficients, so you can easily post process it to get a good image.
Thus, you can either buy a really good camera with expensive lenses and 
take a good picture to start with, or you can put a cheap lousy lens in 
a smartphone and process the bejeezus out of it.

There are a number of freeware programs out there for deconvolution,
and a whole industry of proprietary stuff. Unfortunately, you usually
have to start by characterizing your point spread function, and that's
always a hassle. Some places have standardized point spread functions
for well-known lenses, but they can be hard to find.

One piece of software that has a number of deconvolution plugins
(primarily for microscopy) is ImageJ or Fiji (a not-quite-fork of
ImageJ). ImageJ is maintained by the National Institutes of Health in
the US, and is free. Fiji is maintained by an academic institution,
but I can't remember which.

So, do searches on "deconvolution," "blind deconvolution",
"deblurring," and "ImageJ deconvolution", "Fiji deconvolution." That
will get you started.

In particular, see:
https://imagej.net/Deconvolution

billo


On Tue, 2019-07-23 at 01:09 -0700, ToddAndMargo via users wrote:
> Hi All,
>
> Fedora 30, x64
>
> Anyone know of a way to remove the blur from this picture?
>
> https://ibb.co/cTPNHLf
>
>
> Many thanks,
> -T
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fed

Re: How do I de-blur a picture?

2019-07-23 Thread William Oliver
This really isn't a Fedora question but...

Blurring a pixel is simply replacing it with a weighted average of it
and the surrounding pixels.  The mathematical process is called a
"convolution."

Classically, in order to deblur an image, you need to know the blurring
function (the set of weights on the surrounding pixels, the shape of
the group of pixels used in the blur, and the size of the region used
in the blur). When done directly, this blurring function is called the
"point spread function" for obvious reasons. It turns out that there's
a neat thing about this in that the process of blurring is
computationally expensive when done directly, but if you do a fourier
transform of the image, it's just a multiplication of the image with
the blur function (called the "modulation transfer function" in
frequency space).

Reversing the convolution that resulted in the blurred image is called
"deconvolution."

The down side of doing things in frequency space is that many of the
coefficients are very small, or zero, usually, and 1) you can't divide
by zero, 2) small errors in very small numbers lead to very big errors
when you divide by them.  So, if you don't have your point spread
function perfectly characterized, your error blows up.  There are all
sorts of ways to try to get around this, both in image space and
frequency space, but the bottom line is that if you know your point
spread function well, you can deblur well, and if you don't, you can't.

The well-known "unsharp mask" function is basically one iteration of a
multi-iteration deconvolution method in image space that assumes the
blur function is a gaussian/binomial.  Thus, it doesn't look too bad if
you do it a little, but looks horrible if you do it a lot -- because
the real blurring function is likely not a gaussian.  The more you do
it, the more the error becomes dominant.

You can try to do this without knowing the blurring function.  This is
called "blind deconvolution."  However, these methods usually force you
to make assumptions about things in the image, and then modify the
image to fit those things.  The classic example here is astronomy
photography where you can assume that a distant star it just a dot, or
microscopy where they sell tiny little spheres that you then photograph
and modify the image so that they look like little spheres.  That way
you can estimate the point spread function and go from there.  

Deblurring was a big deal in the 1980s when they put up the Hubble
telescope and found out they had polished the mirrors incorrectly.  The
US government dumped millions of dollars in (successfully) trying to
correct for the Hubble blur.  It then became very popular in
specialized microscopy, such as confocal microscopy, where you are
pushing the optics to their limits.

The other big advance was for smartphones.  There are two common ways
to make sure you take good photos. The first is to have excellent
lenses with great optics, and try to do as little post processing as
possible.  The second is to have a cheap lens that is well
characterized mathematically and designed to have few of those bad
coefficients, so you can easily post process it to get a good image.
Thus, you can either buy a really good camera with expensive lenses and
take a good picture to start with, or you can put a cheap lousy lens in
a smartphone and process the bejeezus out of it.

There are a number of freeware programs out there for deconvolution,
and a whole industry of proprietary stuff.  Unfortunately, you usually
have to start by characterizing your point spread function, and that's
always a hassle.  Some places have standardized point spread functions
for well-known lenses, but they can be hard to find.

One piece of software that has a number of deconvolution plugins
(primarily for microscopy) is ImageJ or Fiji (a not-quite-fork of
ImageJ). ImageJ is maintained by the National Institutes of Health in
the US, and is free.  Fiji is maintained by an academic institution,
but I can't remember which.

So, do searches on "deconvolution," "blind deconvolution",
"deblurring," and "ImageJ deconvolution", "Fiji deconvolution."  That
will get you started.

In particular, see: 
https://imagej.net/Deconvolution

billo


On Tue, 2019-07-23 at 01:09 -0700, ToddAndMargo via users wrote:
> Hi All,
> 
> Fedora 30, x64
> 
> Anyone know of a way to remove the blur from this picture?
> 
> https://ibb.co/cTPNHLf
> 
> 
> Many thanks,
> -T
> ___
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: 
> https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
___
users mailing list -- users@lists.fedoraproject.org
To 

Re: How do I de-blur a picture?

2019-07-23 Thread John Pilkington

On 23/07/2019 10:20, wwp wrote:

Hello ToddAndMargo,


On Tue, 23 Jul 2019 01:09:56 -0700 ToddAndMargo via users 
 wrote:


Hi All,

Fedora 30, x64

Anyone know of a way to remove the blur from this picture?

https://ibb.co/cTPNHLf


Nothing will ever make your picture as you expect it.
Only expert systems could, by knowing what they see (this kind of
flower), interpret the picture and construct (not re-construct) a
picture out of it. The signal, pixels of a non-blur photograph of this
flower, is not present in the picture, thus, it cannot be retrieved, it can
only be constructed. Even if constructed, it cannot be called "a
non-blur picture of the flower", it will just be an approximation.
Movies showing un-blurring (like a CIA operator treating a
hyper-pixelized blurred satellite picture) are meant to make you
dreaming.


Regards,


+1  That picture isn't blurred;  there's plenty of stuff in focus, just 
not the bit you want.  De-blurring the Hubble telescope was a major NASA 
project, with space walks too.


John P
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: How do I de-blur a picture?

2019-07-23 Thread wwp
Hello ToddAndMargo,


On Tue, 23 Jul 2019 01:09:56 -0700 ToddAndMargo via users 
 wrote:

> Hi All,
> 
> Fedora 30, x64
> 
> Anyone know of a way to remove the blur from this picture?
> 
> https://ibb.co/cTPNHLf

Nothing will ever make your picture as you expect it.
Only expert systems could, by knowing what they see (this kind of
flower), interpret the picture and construct (not re-construct) a
picture out of it. The signal, pixels of a non-blur photograph of this
flower, is not present in the picture, thus, it cannot be retrieved, it can
only be constructed. Even if constructed, it cannot be called "a
non-blur picture of the flower", it will just be an approximation.
Movies showing un-blurring (like a CIA operator treating a
hyper-pixelized blurred satellite picture) are meant to make you
dreaming.


Regards,

-- 
wwp


pgpbYYgThvEeE.pgp
Description: OpenPGP digital signature
___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org


Re: How do I de-blur a picture?

2019-07-23 Thread Tim via users
On Tue, 2019-07-23 at 01:09 -0700, ToddAndMargo via users wrote:
> Anyone know of a way to remove the blur from this picture?
> 
> https://ibb.co/cTPNHLf

I'd say re-photograph it properly.  There are filters like "unsharp
mask" that can crispen up a photo, but that one looks too far out of
focus (to me) to do anything good with it.

-- 
[tim@localhost ~]$ uname -rsvp
Linux 5.0.16-100.fc28.x86_64 #1 SMP Tue May 14 18:22:28 UTC 2019 x86_64

Boilerplate:  All mail to my mailbox is automatically deleted.
There is no point trying to privately email me, I only get to see
the messages posted to the mailing list.

You can't have equality AND special treatment.

___
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org