
vwiener(1)                   Khoros                    vwiener(1)

PROGRAM
     vwiener - Perform image restoration by Wiener (least-
     squares) filtering.

SYNTAX
     vwiener

     -i1            FFT of image to be restored

     -i2            FFT of PSF function

     -o1            FFT of restored image

     -t             minimum PSF threshold

     -w             Weiner parameter

     [-i3]          FFT of reference image

     [-o2]          FFT of restoration filter

     [-V]           Gives the version for vwiener

     [-U]           Gives the usage for vwiener

     [-P]           Prompts for command line options

     [-A [file1]]   Creates the answer file called vwiener.ans or
                    file1

     [-a [file1]]   Uses vwiener.ans or file1 as the answer file

DESCRIPTION
     vwienevwiener performs restoration of images in the spatial
     domain by Wiener filtering in the frequency domain.  The
     idea is to deconvolve the blurring function from the blurred
     image.  A few problems exist in performing this operation,
     as described in great detail in any good image processing
     book.  The Wiener filter performs better than the inverse
     filter when noise is present in the data.

     The major difficulty lies in how small the denominator is
     allowed to be before you call it garbage.  The value chosen
     is supplied as the -t thresh value.  Ideally, this will be
     just above the noise floor in the image, but experimentation
     is the best guide here.

     The restoration parameter controls how smoothly the modified
     PSF blends into the flat cutoff regions generated by the
     thresholding operation.  For more information, see Rosenfeld
     & Kak, page 287.

     The reffile is an image which, if supplied, is subtracted
     from the input image before the weiner filter is applied.
     This is handy for removing some constant background from the
     image before the restoration is done.

     The PSFfile is the transform of the Point-Spread Function,
     or blurring function that is to be deconvolved from the
     input image.

     The effPSFfile is the same as the PSFfile after the thres-
     holding operation has been applied.  Taking the inverse
     Fourier transform of this file gives the effective PSF as
     used in the restoration.  The idea is that is should be rea-
     sonably close to the real PSF.

REQUIRED ARGUMENTS
     -i1    type: infile
            desc: FFT of image to be restored

     -i2    type: infile
            desc: FFT of PSF function

     -o1    type: outfile
            desc: FFT of restored image

     -t     type: float
            desc: minimum PSF threshold

     -w     type: float
            desc: Weiner parameter

OPTIONAL ARGUMENTS
     -i3    type: infile
            desc: FFT of reference image

     -o2    type: outfile
            desc: FFT of restoration filter

EXAMPLES
     vwiener -i1 fft_img1 -i2 fft_psf_img -t 10 -w 5 -o1
     fft_out_img

     This command deconvolves the second input image from the
     first.  Fft_img1 is the fft of the image to deconvolve from,
     and fft_psf_img is the fft of the PSF function of the image
     to deconvolve.  The threshold for the denominator is 10, and
     the resulting fft image is fft_out_img.  The Wiener parame-
     ter is 5.

SEE ALSO
     intro(1), verror(3), vgparms(3), vutils(3), lvwiener(3)

RESTRICTIONS
     all input images must be the same data storage type
     (VFF_TYP_COMPLEX) and size.

COPYRIGHT
     Copyright 1992, University of New Mexico.  All rights
     reserved.

Khoros                    Release: 1.0                          1

