The Naked Scientists

The Naked Scientists Forum

Author Topic: Removing camera shake  (Read 6823 times)

Offline syhprum

  • Neilep Level Member
  • ******
  • Posts: 3822
  • Thanked: 19 times
    • View Profile
Removing camera shake
« on: 05/01/2014 16:27:40 »
Has anyone any experience with Photoshop/Piccure I have been trying to get some results from a badly shaken shot with little results.


 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8132
  • Thanked: 53 times
    • View Profile
Re: Removing camera shake
« Reply #1 on: 05/01/2014 18:16:18 »
The "sharpen" effects in photo-manipulation programs like photoshop is only useful for correcting subtle blurriness : digital sharpening would only of use if the blur due to camera shake was less than 1/1000th the diagonal measurement of the frame.

This is the modest improvement in sharpness which is possible ...



Better results are possible with blurry video : a still image which is average of hundreds of video frames can be created which is astonishingly sharp ...
« Last Edit: 05/01/2014 18:41:14 by RD »
 

Offline syhprum

  • Neilep Level Member
  • ******
  • Posts: 3822
  • Thanked: 19 times
    • View Profile
Re: Removing camera shake
« Reply #2 on: 05/01/2014 18:45:45 »
Piccure is a separate program intended to deal with severe camera shake it operates as a plugin in addition to the normal range of sharpening routines provided by Photoshop.
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8132
  • Thanked: 53 times
    • View Profile
Re: Removing camera shake
« Reply #3 on: 05/01/2014 20:35:55 »
Piccure is a separate program intended to deal with severe camera shake ...

The phrase Piccure use is "micro-shake reduction" ... http://www.piccure.de/index.php/en/product-eng
Their before-after images don't look much better that the example I posted above which is a free sharpen plugin for the photo-editor GIMP , (which does have a built-in sharpen function which isn't quite as good).

I've done a comparison of GIMP Vs PICCURE sharpening (attached) ,
[ I think I can justify the use of the PICCURE image under fair use : commentary / criticism ].
« Last Edit: 05/01/2014 21:04:31 by RD »
 

Offline syhprum

  • Neilep Level Member
  • ******
  • Posts: 3822
  • Thanked: 19 times
    • View Profile
Re: Removing camera shake
« Reply #4 on: 05/01/2014 22:36:55 »
I was trying to make sense of this badly shaken picture. actually I worked with the .BMP version but that was too large to transmit.
Thank you for your interest I will try Gimp tomorrow but I think it is asking too much!
« Last Edit: 05/01/2014 22:40:52 by syhprum »
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8132
  • Thanked: 53 times
    • View Profile
Re: Removing camera shake
« Reply #5 on: 05/01/2014 23:22:39 »
I was trying to make sense of this badly shaken picture ... * test.pdf (31.43 kB)

GIMP won't be able to sharpen that, I don't know of anything that will.
The light trails caused by the camera shake are clearly visible ...



Maybe if you used the image-stacking technique I mentioned earlier , making a series of images by shifting the original image according to the light trail, then creating an average of those series of images     [?] 

[ although the musicians look like they have moved during the exposure and even if undoing the camera shake were possible , it won't undo the musician's motion blur ]

I think you're stuck with an impressionistic image there.
« Last Edit: 06/01/2014 15:06:29 by RD »
 

Offline syhprum

  • Neilep Level Member
  • ******
  • Posts: 3822
  • Thanked: 19 times
    • View Profile
Re: Removing camera shake
« Reply #6 on: 06/01/2014 09:20:08 »
I realise it is probably impossible but I was inspired by some pictures of a phoney sťance I had seen where a very blurred picture of a "spirit" appeared, after much digital reprocessing it was resolved as a stage hand running across the set!
Thanks again for your interest I have had various copies of Photoshop since 1985 but little skill in using it.
 

Offline evan_au

  • Neilep Level Member
  • ******
  • Posts: 4126
  • Thanked: 247 times
    • View Profile
Re: Removing camera shake
« Reply #7 on: 06/01/2014 09:30:36 »
Part of the difficulty in deblurring is working out what is the direction and extent of the blurring - and is it due to poor focus, chromatic aberration or motion blur.
However, in this case you seem to have this part of the problem solved - the main concern is motion blur, and the highlights on the drum kit (expanded above) track the position, duration and direction of the camera shake on a pixel-by-pixel basis!

As I understand it, you create a filter matrix which has the same dimensions as the blur (about 20x20pixels, in this case). Weights are placed in the cells of the matrix so that the output value of a pixel is the weighted average of the pixels that have been blurred from that point in the image, with negative weights on the other pixels which have been blurred into the same output pixel. Place zeros in the cells which do not contribute to the output pixel. The sum of the weights in all of the filter cells should be 1, so it doesn't make the entire picture brighter or darker.

This filter matrix is then positioned sequentially over every pixel position in the original image; multiply the pixel values in the original image by the values in the filter matrix to create one pixel in the output image.

It won't recover all of the image, as:
  • The camera shake is primarily bottom-left to top-right. So it will be more effective at deblurring lines perpendicular to this axis.
  • It will be less effective if the blurring is different in different parts of the picture (eg due to twisting the camera, rather than just uniform movement)
  • the musicians probably moved during the exposure,
  • it won't be able to recover an image smaller than 1 pixel of the blurred image
  • and you will lose 20 pixels from around the outside of the picture.

There are mathematical techniques to automatically extract some of the information about the extent & direction of blur from the image itself - but as I understand it, some of the information is irretrievably lost. So don't expect a result as good as your average TV Spy/Detective/Forensic Science drama.
 

Offline RD

  • Neilep Level Member
  • ******
  • Posts: 8132
  • Thanked: 53 times
    • View Profile
Re: Removing camera shake
« Reply #8 on: 06/01/2014 14:18:26 »
I've found free deconvolution software called IRIS , like REGISTAX it's designed for astro-photography ...


http://www.astrosurf.com/buil/us/iris/deconv/deconv.htm

It may help in "light-trail" situations if it can be made to work with non-astronomical images. 
« Last Edit: 06/01/2014 15:10:35 by RD »
 

The Naked Scientists Forum

Re: Removing camera shake
« Reply #8 on: 06/01/2014 14:18:26 »

 

SMF 2.0.10 | SMF © 2015, Simple Machines
SMFAds for Free Forums
 
Login
Login with username, password and session length