3
\$\begingroup\$

There was a small snake hiding in the grass. I pointed my camera, but I zoomed too much. When I pressed the button to adjust the focus, the autofocus complained because it was out of range. I tried again, but I pressed too much and I shot a picture out of focus. Then I changed the zooming level, but in that fraction of a second, the snake and the good frame were gone. I tried to sharpen the image with Gimp unsharp mask, but it is too much out of focus. Is there another way to sharpen the image?

enter image description here

\$\endgroup\$
8
  • 12
    \$\begingroup\$ I think you're going to have to put that one down to experience & wait for next time. Sorry. \$\endgroup\$
    – Tetsujin
    Commented Jun 21, 2021 at 16:36
  • 4
    \$\begingroup\$ For comparison… I once spent a week on holiday trying to catch a picture of a bee [or if not one bee, a close relative] on a specific flower it would visit half a dozen times a day & give me the "perfect" opportunity. I think I got one usable shot out of perhaps 300 fails. \$\endgroup\$
    – Tetsujin
    Commented Jun 21, 2021 at 17:58
  • 4
    \$\begingroup\$ If only you had had a light field camera ... \$\endgroup\$ Commented Jun 22, 2021 at 1:00
  • 4
    \$\begingroup\$ If you have a lot of other images of snakes in grass, you could train a neural network to perform super resolution. This technique is shown there : cs229.stanford.edu/proj2020spr/report/… \$\endgroup\$
    – Jeffrey
    Commented Jun 22, 2021 at 2:49
  • 1
    \$\begingroup\$ BTW, I did throw that image through "everything I could think of", manual, auto & AI-based before my first comment. With some, I could get the grass at the back sharp enough to cut yourself on, but the snake & in front are beyond recovery. \$\endgroup\$
    – Tetsujin
    Commented Jun 22, 2021 at 11:32

2 Answers 2

32
\$\begingroup\$

Yes of course it can be post processed. It might make it “better.”

But it will never make it the picture you wish it was.

The good news is that there will be other snakes on other days. Plenty of chances to make better snake pictures lie in the future if you want.

There are good reasons to work on pictures that probably can’t be saved. One is to practice using post processing tools. You will understand what is possible. And what is not. And develop intuition for what might be.

In the long run, most of the pictures we make turn out worse than we wanted. Experience teaches us that the way to get the good ones is to focus on trying to make them and not worry about the ones that got away.

The only way not to make pictures that are not good enough is to not make pictures.

\$\endgroup\$
3
  • \$\begingroup\$ Since this appears to be a case of almost-purely defocus, it's more or less trivial to find a kernel function which remaps intensities back to the focus point for each object point. \$\endgroup\$ Commented Jun 23, 2021 at 11:51
  • 1
    \$\begingroup\$ @CarlWitthoft That might make it better. It won’t make it the picture the photographer wishes they had made. I know there are people who find fixing pictures more interesting than making pictures that don’t need fixing. They tend to get better at fixing pictures more quickly than at making them. Anyway I don’t believe there is a silver bullet, and it is better to commit to the hard work now rather than pretend Charlie Brown is going to kick the football. YMMV. \$\endgroup\$ Commented Jun 23, 2021 at 17:06
  • \$\begingroup\$ I don't understand your comment. The OP only asked to get rid of blur, and a good spherical defocus kernel will clean up the image beyond what our eyes can perceive. \$\endgroup\$ Commented Jun 23, 2021 at 17:36
4
\$\begingroup\$

Better than sharpen, you can deblur the image. You could use techniques that are not usual in consumer photography such as blind deconvolution, or patch-based techniques such as BM3D deblur which can deblur from one single image. There are other techniques.

You can use Matlab (a standard tool in computer vision) to apply those techniques (implementations of those exist), and Photoshop can use Matlab functions, which is practical for applications on images.

Example with blind deconvolution:

blind deconvolution

Example with BM3D:

BM3D deblur

\$\endgroup\$
10
  • 2
    \$\begingroup\$ @ToddWilcox Of course they will - you can deblur R,G,B separately, then deblur a grayscale version, and do some weighted fusion of the results. \$\endgroup\$ Commented Jun 23, 2021 at 11:52
  • 10
    \$\begingroup\$ This answer could be much more convincing if you took the OP's photo, applied the technique, and showed the results. If what you propose is truly feasible, then certainly it shouldn't be too much trouble to demonstrate it. In my experience, more often than not, techniques developed for scientific image processing do not work for photography, and do no produce an image which is aesthetically acceptable (even if some details could be enhanced). E.g. your examples don't have depth of field. \$\endgroup\$
    – Szabolcs
    Commented Jun 23, 2021 at 12:26
  • 12
    \$\begingroup\$ -1 for the very strong statement "My opinion is that your image can definitely be salvaged.", provided without evidence or instructions on how to make it happen. The examples you show have been convolved with a constant kernel. The second one has clearly been convolved computationally (it's not an out-of-focus image). \$\endgroup\$
    – Szabolcs
    Commented Jun 23, 2021 at 12:33
  • 2
    \$\begingroup\$ Importantly, the pyramids image is pretty much all at "infinity", optically speaking, whereas the photograph in the question has a much deeper field (i.e. much of it is closer than the subject of interest). \$\endgroup\$ Commented Jun 23, 2021 at 20:21
  • 2
    \$\begingroup\$ Can you show an actual example of one of these methods applied to the OP's image? \$\endgroup\$
    – Szabolcs
    Commented Jun 24, 2021 at 13:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.