1vpBoxFilter(3)             Library Functions Manual             vpBoxFilter(3)
2
3
4

NAME

6       vpBoxFilter,  vpLinearFilter,  vpBicubicFilter, vpGaussianFilter - ini‐
7       tialize a filter weight table
8

SYNOPSIS

10       #include <volpack.h>
11
12       vpResult
13       vpBoxFilter(num_taps, num_phases, weights, weights_bytes)
14           int num_taps, num_phases;
15           float *weights;
16           int weights_bytes;
17
18       vpResult
19       vpLinearFilter(num_taps, num_phases, weights, weights_bytes)
20           int num_taps, num_phases;
21           float *weights;
22           int weights_bytes;
23
24       vpResult
25       vpBicubicFilter(b_value,  c_value,   num_taps,   num_phases,   weights,
26               weights_bytes)
27           double b_value, c_value;
28           int num_taps, num_phases;
29           float *weights;
30           int weights_bytes;
31
32       vpResult
33       vpGaussianFilter(sigma, num_taps, num_phases, weights, weights_bytes)
34           double sigma;
35           int num_taps, num_phases;
36           float *weights;
37           int weights_bytes;
38

ARGUMENTS

40       num_taps
41              Number of filter taps.
42
43       num_phases
44              Number of filter phases.
45
46       weights
47              Array containing filter weights.
48
49       weights_bytes
50              Size (in bytes) of array containing filter weights.
51
52       b_value
53              "B" parameter in the formula for a Mitchell bicubic.
54
55       c_value
56              "C" parameter in the formula for a Mitchell bicubic.
57
58       sigma  Standard deviation for a Gaussian.
59

DESCRIPTION

61       These  routines  can be used to initialize filter weight tables for use
62       with vpSetFilter and vpResample.  See  the  vpSetFilter  man  page  for
63       information on the num_taps and num_phases arguments.
64
65       vpBoxFilter  creates a filter table for a box filter (a zero-order fil‐
66       ter).  With num_taps equal to 1 the filter is a  nearest-neighbor  fil‐
67       ter,  suitable for low-quality upsampling.  To create a decimation fil‐
68       ter that averages down, the number of taps should equal the  decimation
69       factor (as nearly as possible).
70
71       vpLinearFilter  creates  a  filter  table for a linear filter (a first-
72       order or tent filter).  With num_taps equal to 2  the  filter  performs
73       linear interpolation.
74
75       vpBicubicFilter  creates  a filter table for a Mitchell bicubic filter.
76       The first two arguments can be used to modify the shape of  the  filter
77       kernel.  Some standard parameter values are:
78
79       b_value = 1, c_value = 0
80              Cubic B-spline.
81
82       b_value = 0, c_value = 0.5
83              Catmull-Rom spline.
84
85       With  four filter taps the cubic B-spline filter is suitable for upsam‐
86       pling.  For more details, see the following paper: Mitchell,  D.P.  and
87       Netravali,  A.N.,  "Reconstruction filters in computer graphics," Proc.
88       SIGGRAPH '88 (Computer Graphics V22 N4), p. 221-8.
89
90       vpGaussianFilter creates a filter table for  a  gaussian  filter.   The
91       first argument is the standard deviation of the gaussian.
92

ERRORS

94       The  normal  return  value is VP_OK.  The following error return values
95       are possible:
96
97       VPERROR_BAD_SIZE
98              The filter weight table size is invalid.
99
100       VPERROR_BAD_VALUE
101              The number of phases is not a positive power of two.
102

SEE ALSO

104       VolPack(3), vpResample(3), vpSetFilter(3)
105
106
107
108VolPack                                                         vpBoxFilter(3)
Impressum