Man Linux: Main Page and Category List

vpBoxFilter, vpLinearFilter, vpBicubicFilter, vpGaussianFilter - initialize a filter weight table

#include <volpack.h> vpResultvpBoxFilter(num_taps,num_phases,weights,weights_bytes)intnum_taps,num_phases; float *weights; intweights_bytes; vpResultvpLinearFilter(num_taps,num_phases,weights,weights_bytes)intnum_taps,num_phases; float *weights; intweights_bytes; vpResultvpBicubicFilter(b_value,c_value,num_taps,num_phases,weights,weights_bytes)doubleb_value,c_value; intnum_taps,num_phases; float *weights; intweights_bytes; vpResultvpGaussianFilter(sigma,num_taps,num_phases,weights,weights_bytes)doublesigma; intnum_taps,num_phases; float *weights; intweights_bytes;

num_tapsNumber of filter taps.num_phasesNumber of filter phases.weightsArray containing filter weights.weights_bytesSize (in bytes) of array containing filter weights.b_value"B" parameter in the formula for a Mitchell bicubic.c_value"C" parameter in the formula for a Mitchell bicubic.sigmaStandard deviation for a Gaussian.

These routines can be used to initialize filter weight tables for use withvpSetFilterandvpResample. See thevpSetFilterman page for information on thenum_tapsandnum_phasesarguments.vpBoxFiltercreates a filter table for a box filter (a zero-order filter). Withnum_tapsequal to 1 the filter is a nearest-neighbor filter, suitable for low-quality upsampling. To create a decimation filter that averages down, the number of taps should equal the decimation factor (as nearly as possible).vpLinearFiltercreates a filter table for a linear filter (a first- order or tent filter). Withnum_tapsequal to 2 the filter performs linear interpolation.vpBicubicFiltercreates a filter table for a Mitchell bicubic filter. The first two arguments can be used to modify the shape of the filter kernel. Some standard parameter values are:b_value= 1,c_value=0Cubic B-spline.b_value= 0,c_value=0.5Catmull-Rom spline. With four filter taps the cubic B-spline filter is suitable for upsampling. For more details, see the following paper: Mitchell, D.P. and Netravali, A.N., "Reconstruction filters in computer graphics," Proc. SIGGRAPH ’88 (Computer Graphics V22 N4), p. 221-8.vpGaussianFiltercreates a filter table for a gaussian filter. The first argument is the standard deviation of the gaussian.

The normal return value is VP_OK. The following error return values are possible: VPERROR_BAD_SIZE The filter weight table size is invalid. VPERROR_BAD_VALUE The number of phases is not a positive power of two.

VolPack(3), vpResample(3), vpSetFilter(3)