filter_2Dfreq
Outputs
which are mapped to avs parameters, inputs, and outputs, are for the
khoros library routine.
*********************************************************************************
Documentation for avs module vblse
Input
image Pointer to input image.
mask Pointer to valid data mask image the the
above input image.
psf Pointer to pointspread function image.
count Iteration count (int)
OUTPUT
image pointer to which the resultant image is
attached. The original image is overwritten
and the original data area is freed.
Description
vblse
performs band-limited surface extrapolation or adaptive
apodization. Applications are in spectral estimation, image
reconstruction and image restoration. The method used is the
classical Gerchberg-Saxton method except that the relaxation
constraint is allowed to change bandwidth over the course of
the iterations. In this implementation, the relaxation
bandwidth is a linear combination of a unity bandpass with
the passband of a user specified extrapolation pointspread
function. The ratio of these two passbands is determined by
the percentage of the iterations that have been completed:
intially, the bandwidth is unity, but decreses to exactly
that specified by the user at the last iteration.
See also
vblse(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
Works only on FLOAT images.
Author
Scott Wilson
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vbpf
INPUT
1. image -- xvimage structure, input and output image
,br 2. order -- band-pass filter order;
default value is 1
3. fcut -- cutoff frequency radius;
default value is 0.5
4. width -- Band width in pixels of the filter.
OUTPUT
1. image -- holds the result of the
high-pass filtered image.
image is used for both the input xvimage structure and
the output result xvimage structure. This is done to
save space, but you must be careful not to overwrite
important data.
vbpf always returns 1.
DESCRIPTION
vbpf performs a band-pass filtering operation on an image
in the frequency domain. The filter used is a Butterworth
radially symmetric band-pass filter. The filter cutoff is a
radius normalized to the longest image dimension (lets you
filter non-square images, but with an elliptical cutoff
aref). The order of the filter is an integer specifying the
sharpness of the cutoff. The band width must also be speci-
fied, and is in terms of pixels.
The cutoff frequency is determined by taking 1/2 the length
of the longest side of an image and normalizing that to 1.
The cutoff frequency is then some value between 0 and 1.
Example
take a 256x256 image, divide by 2 = 128, normalize
to 1 and determine the cutoff frequency, A 0.25 cutoff would
correspond to a cutoff at pixel location row or column 160.
SEE ALSO
vbpf(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
vbpf will complain if asked to operate on non-greyscale or
non-COMPLEX input images (images not in thge frequency
domain).
Filters of high order can take a long time to do their work
AUTHOR
Tom Sauer
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vbrf
INPUT
1. image -- xvimage structure, input and output image
2. order -- band-reject filter order;
default value is 1
3. fcut -- cutoff frequency radius;
default value is 0.5
4. width -- Band width in pixels of the filter.
OUTPUT
1. image -- holds the result of the
high-pass filtered image.
image is used for both the input xvimage structure and
the output result xvimage structure. This is done to
save space, but you must be careful not to overwrite
important data.
vbrf always returns 1.
DESCRIPTION
vbrf performs a band-reject filtering operation on an image
in the frequency domain. The filter used is a Butterworth
radially symmetric band-reject filter. The filter cutoff is
a radius normalized to the longest image dimension (lets you
filter non-square images, but with an elliptical cutoff
area). The order of the filter is an integer specifying the
sharpness of the cutoff. The band width must also be speci-
fied, and is in terms of pixels.
The cutoff frequency is determined by taking 1/2 the length
of the longest side of an image and normalizing that to 1.
The cutoff frequency is then some value between 0 and 1.
Example: take a 256x256 image, divide by 2 = 128, normalize
to 1 and determine the cutoff frequency, A 0.25 cutoff would
correspond to a cutoff at pixel location row or column 160.
SEE ALSO
vbrf(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
vbrf will complain if asked to operate on non-greyscale or
non-COMPLEX input images.
Filters of high order can take a long time to do their work.
AUTHOR
Tom Sauer
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vhpf
INPUT
1. image -- xvimage structure
2. order -- high-pass filter order;
3. filtyp -- high-pass filter type; if 0
selects an exponential
filter (default), if 1
selects a butterworth filter
4. fcut -- cutoff frequency radius;
default value is 0.5
OUTPUT
1. image -- holds the result of the
high-pass filtered image.
image is used for both the input xvimage structure and
the output result xvimage structure. This is done to
save space, but you must be careful not to overwrite
important data.
vhpf returns 1 upon success and 0 on failure.
DESCRIPTION
vhpf performs a high-pass filtering operation on an image
in the frequency domain. The filter cutoff is a radius nor-
malized to the longest image dimension (lets you filter
non-square images, but with an elliptical cutoff area). The
order of the filter is an integer specifying the sharpness
of the cutoff.
SEE ALSO
vhpf(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
vhpf will complain if asked to operate on non-COMPLEX input
images.
Filters of high order can take a long time to do their work.
AUTHOR
Scott Wilson
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vinverse
INPUT
1. f1 -- first xvimage structure; FFT of image to be
restored
2. f2 -- second xvimage structure; FFT of reference
image
(optional)
3. f3 -- third xvimage structure; FFT of PSF function
4. bflg -- a flag set if reference image is available
5. thresh -- minimum PSF threshold (optional)
The input xvimage structures must be of the same data
Type
and size.
OUTPUT
1. f1 -- holds the result of the inverse filtering
operation.
2. f3 -- holds the effective Point Spread Function
(PSF) xvimage structure.
The output data type is the same as the input data
type.
f1 is used for both the input xvimage structure and the
output result xvimage structure. This is done to save
space.
vinverse returns a zero upon failure and a one upon
success.
DESCRIPTION
vinverse performs restoration of images in the spatial
domain by inverse 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 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 reffile (reference image) is an image which, if sup-
plied, is subtracted from the input image before the inverse
filter is applied. This is handy for removing some constant
background from the image before the restoration is done.
The PSFfile (PSF function) is the transform of the Point-
Spread Function, or blurring function that is to be decon-
volved from the input image.
The effPSFfile (effective PSF function) is the same as the
PSFfile after the thresholding 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 reasonably close to the real PSF.
SEE ALSO
vinverse(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
all images must be of the same data type (VFF_TYP_COMPLEX)
and size.
AUTHOR
Scott Wilson
COPYRIGHT
Copyright 1992, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vlpf
INPUT
1. image -- xvimage structure
2. order -- low-pass filter order;
default value is 1
3. type -- low-pass filter type; if 0
selects an exponential
filter (default), if 1
selects a butterworth filter
4. fcut -- cutoff frequency radius;
default value is 0.5
OUTPUT
1. image -- holds the result of the
high-pass filtered image.
image is used for both the input xvimage structure and
the output result xvimage structure. This is done to
save space, but you must be careful not to overwrite
important data.
DESCRIPTION
vlpf performs a low-pass filtering operation on an image in
the frequency domain. The filter cutoff is a radius normal-
ized to the longest image dimension (lets you filter non-
square images, but with an elliptical cutoff area). The
order of the filter is an integer specifying the sharpness
of the cutoff.
SEE ALSO
vlpf(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
vlpf will complain if asked to operate on non-COMPLEX data
storage type images.
Filters of high order can take a long time to do their work.
AUTHOR
Scott Wilson
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vsvpsf
INPUT
img pointer to image to be restored.
psf pointer to quantized PSF image.
thresh threshold level for inverse filter (float).
OUTPUT
img contains the restored input image. The origi-
nal image is overwritten.
DESCRIPTION
vsvpsf performs restoration of space-varying blurs. The
technique used is to restore the entire image once for each
of the set of pointspread functions present in the image,
and then merge the result arrays together depending on which
pointspread is operating at each location.
The pointspread image should be a single band image of type
INT with FLOAT maps. The maps should be interpreted as fol-
lows: 1) Each entry in the map (vector) is a 2D sampled
representation of the pointspread function somewhere in the
image, 2) The size of the 2D sampled PSF (in rows and
columns) is map_subrow_size (rows) by
map_col_size/map_subrow_size (cols). This image is usually
obtained by using vquant to quantize the distribution of PSF
in the image and also to produce the mapping information.
A simple thresholded inverse filter (vinverse) is used to
perform the individual restorations.
SEE ALSO
vsvpsf(1), intro(3), vipl(3), verror(3), vutils(3) lvin-
verse, lvquant
RESTRICTIONS
COMPLEX data types are not supported. Yet.
AUTHOR
Scott Wilson
COPYRIGHT
Copyright 1991, University of New Mexico. All rights
reserved.
*********************************************************************************
Documentation for avs module vwiener
INPUT
1. f1 -- first xvimage structure; FFT of image to be
restored
2. f2 -- second xvimage structure; FFT of reference
image (optional)
3. f3 -- third xvimage structure; FFT of PSF function
4. bflg -- a flag set if reference image is available
5. thresh -- minimum PSF threshold (optional)
6. rest -- Weiner parameter
The input xvimage structures must be of the same data
type and size.
OUTPUT
1. f1 -- holds the result of the Weiner filtering
operation. The output data type is the same
as the input data type.
2. f3 -- holds the restoration filter.
f1 is used for both the input xvimage structure and the
output result xvimage structure. This is done to save
space.
vwiener returns a zero upon failure and a one upon
success.
DESCRIPTION
vwiener 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.
SEE ALSO
vwiener(1), intro(3), vipl(3), verror(3), vutils(3)
RESTRICTIONS
all input images must be the same data storage type
(VFF_TYP_COMPLEX) and size.
AUTHOR
Scott Wilson
COPYRIGHT
Copyright 1992, University of New Mexico. All rights
reserved.
*********************************************************************************