jjil.algorithm
Class GaussDeblurHoriz
java.lang.Object
jjil.core.PipelineStage
jjil.algorithm.GaussDeblurHoriz
public class GaussDeblurHoriz
- extends PipelineStage
Uses deconvolution to remove blur from a Gray8Image. The blur removed is a
horizontal Gaussian blur with a given standard deviation. The background noise
level in the input image can be adjusted. The output Gray8Image is rescaled so the
maximum and minimum values fill the range from Byte.MIN_VALUE to Byte.MAX_VALUE.
- Author:
- webb
Constructor Summary |
GaussDeblurHoriz(int nStdDev,
int nNoise)
Creates a new instance of InverseFilter. |
Method Summary |
void |
push(Image im)
Deblurs an input Gray8Image which has been blurred by a horizontal Gaussian
of the given standard deviation and which has a background noise level less
than the given level. |
void |
setStdDev(int nStdDev)
Changes current standard deviation value. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GaussDeblurHoriz
public GaussDeblurHoriz(int nStdDev,
int nNoise)
throws Error
- Creates a new instance of InverseFilter.
- Parameters:
nStdDev
- Standard deviation of the Gaussian blur operator to deblur with. The
value is multiplied by 100 so a value of 5 corresponds to a standard deviation
of the Gaussian of 0.05.nNoise
- The expected noise level in the input image. The deconvolution has the
potential to amplify noise levels since it is a high pass filter. The noise
parameter limits this by not dividing by any Gaussian element (in the
frequency domain) less than this value. The Gaussian elements have been scaled
by 256, so a value equal to, say, 64 keeps the maximum amplification of the
deconvolution less than 256/64 = 4.
- Throws:
Error
- if the standard deviation parameter is out of range.
push
public void push(Image im)
throws Error
- Deblurs an input Gray8Image which has been blurred by a horizontal Gaussian
of the given standard deviation and which has a background noise level less
than the given level.
- Specified by:
push
in class PipelineStage
- Parameters:
im
- Input Gray8Image.
- Throws:
Error
- if the input is not a Gray8Image or is not square.
setStdDev
public void setStdDev(int nStdDev)
throws Error
- Changes current standard deviation value.
- Parameters:
nStdDev
- Input standard deviation, multiplied by 100.
- Throws:
Error
- if the parameter is out of range.