jjil.algorithm
Class PsfGray8

java.lang.Object
  extended by jjil.algorithm.PsfGray8

public class PsfGray8
extends java.lang.Object

Provides point spread functions for use in inverse filtering.

Author:
webb

Constructor Summary
PsfGray8()
           
 
Method Summary
static Gray8Image disk(int nImageWidth, int nRadius)
          Computes a disk-shaped point spread function that can be used to do deblurring for circular blur.
static Gray8Image horizBar(int nImageWidth, int nBarHalfWidth)
          Computes a horizontal bar point spread function, with a given width.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PsfGray8

public PsfGray8()
Method Detail

horizBar

public static Gray8Image horizBar(int nImageWidth,
                                  int nBarHalfWidth)
Computes a horizontal bar point spread function, with a given width. This corresponds to a horizontal blur. The output image is scaled so the sum of all values is 256.

Parameters:
nImageWidth - The image width of the image to create. The image is always square so this is also the height.
nBarHalfWidth - The width of the bar, divided by 2 and rounded down. The actual width is twice this width plus 1, centered on the center of the image.
Returns:
A Gray8Image that can be passed to InverseFilter to remove horizontal blur.

disk

public static Gray8Image disk(int nImageWidth,
                              int nRadius)
Computes a disk-shaped point spread function that can be used to do deblurring for circular blur. The output image is scaled so the sum of the values is 256.

Parameters:
nImageWidth - The output image width. The image is always square so this is also the height.
nRadius - The radius of the disk.
Returns:
A Gray8Image that can be passed to InverseFilter to remove circular blur, for example that due to defocus.