Mitchell–Netravali filters

The Mitchell–Netravali filters or BC-splines are a group of reconstruction filters used primarily in computer graphics, which can be used, for example, for anti-aliasing or for scaling raster graphics. They are also known as bicubic filters in image editing programs because they are bi-dimensional cubic splines.

Definition


The Mitchell–Netravali filters were designed as part of an investigation into artifacts from reconstruction filters. The filters are piece-wise cubic filters with four-pixel wide supports. After excluding unsuitable filters from this family, such as discontinuous curves, two parameters $$B$$ and $$C$$ remain, through which the Mitchell–Netravali filters can be configured. The filters are defined as follows:



k(x) = \frac{1}{6} \begin{cases} \begin{array}{l} (12-9B-6C)|x|^3 + (-18+12B+6C)|x|^2 \\ \qquad + (6-2B) \end{array} & \text{, if } |x|<1 \\ \begin{array}{l} (-B-6C)|x|^3 + (6B+30C)|x|^2 \\ \qquad + (-12B-48C)|x| + (8B+24C) \end{array} & \text{, if } 1\le |x|<2 \\ 0 & \text{otherwise} \end{cases} $$

It is possible to construct two-dimensional versions of the Mitchell–Netravali filters by separation. In this case the filters can be replaced by a series of interpolations with the one-dimensional filter. From the color values of the four neighboring pixels $$P_0$$, $$P_1$$, $$P_2$$, $$P_3$$ the color value is then calculated $$P(d)$$ as follows:


 * $$\begin{align}

P(d) &\textstyle = \left((-\frac{1}{6}B-C)P_0 + (-\frac{3}{2}B-C+2)P_1 + (\frac{3}{2}B+C-2)P_2 + (\frac{1}{6}B+C)P_3\right) d^3 \\ &\textstyle + \left((\frac{1}{2}B+2C)P_0 + (2B+C-3)P_1 + (-\frac{5}{2}B-2C+3)P_2 -CP_3\right) d^2 \\ &\textstyle + \left((-\frac{1}{2}B-C)P_0 + (\frac{1}{2}B+C)P_2\right) d \\ &\textstyle + \frac{1}{6}BP_0 + (-\frac{1}{3}B+1)P_1 + \frac{1}{6}BP_2 \\ \end{align}$$

$$P$$ lies between $$P_1$$ and $$P_2$$; $$d$$ is the distance between $$P_1$$ and $$P$$.

Subjective effects
Various artifacts may result from certain choices of parameters B and C, as shown in the following illustration. The researchers recommended values from the family $$B+2C=1$$ (dashed line) and especially $$\textstyle B=C=\frac{1}{3}$$ as a satisfactory compromise.



Implementations
The following parameters result in well-known cubic splines used in common image editing programs: