ImageGear23.Processing.Advanced Assembly > ImageGear.FreqIP Namespace > ImGearFrequencyProcessing Class : InverseRestore Method |
'Declaration Public Shared Sub InverseRestore( _ ByVal page As ImGearRasterPage, _ ByVal spreadFunctionVector() As Double, _ ByVal spreadFunctionVectorSize As Integer, _ ByVal threshold As Double _ )
'Usage Dim page As ImGearRasterPage Dim spreadFunctionVector() As Double Dim spreadFunctionVectorSize As Integer Dim threshold As Double ImGearFrequencyProcessing.InverseRestore(page, spreadFunctionVector, spreadFunctionVectorSize, threshold)
public static void InverseRestore( ImGearRasterPage page, double[] spreadFunctionVector, int spreadFunctionVectorSize, double threshold )
public: static void InverseRestore( ImGearRasterPage* page, double[]* spreadFunctionVector, int spreadFunctionVectorSize, double threshold )
public: static void InverseRestore( ImGearRasterPage^ page, array<double>^ spreadFunctionVector, int spreadFunctionVectorSize, double threshold )
The deconvolution involves dividing the Fourier transform of the blurred image by the Fourier transform of PSF. If the transform of PSF has very small values, then the division result from those small values could easily dominate the entire result. The approach used to get around this issue is to limit the smallest value of the transform of PSF, thus we require a threshold value, threshold, to be passed in as a parameter. Ideally, this value will be just above the noise level in the image. This method places zeros in the output for those data points where the magnitude of PSF transform is below the threshold. In this respect, InverseRestore is actually an implementation of a pseudo-inverse filter.
Before using this method, like other frequency processing methods, InitializeFFTW method must be called first to initialize the support for FFTW.
Can be applied only to 8bit grayscale images with one channel.
Method ImGearFrequencyProcessingVerifier.CanApplyInverseRestore method can be called to check whether the operation can be performed or not.