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.[1] [2] [3]
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
C
k(x)=
1 | |
6 |
\begin{cases} \begin{array}{l} (12-9B-6C)|x|3+(-18+12B+6C)|x|2\\ +(6-2B) \end{array}&,if|x|<1\\ \begin{array}{l} (-B-6C)|x|3+(6B+30C)|x|2\\ +(-12B-48C)|x|+(8B+24C) \end{array}&,if1\le|x|<2\\ 0&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
P0
P1
P2
P3
P(d)
\begin{align} P(d)&style=\left((-
1 | |
6 |
B-C)P0+(-
3 | |
2 |
B-C+2)P1+(
3 | |
2 |
B+C-2)P2+(
1 | |
6 |
B+C)P3\right)d3\\ &style+\left((
1 | |
2 |
B+2C)P0+(2B+C-3)P1+(-
5 | |
2 |
B-2C+3)P2-CP3\right)d2\\ &style+\left((-
1 | |
2 |
B-C)P0+(
1 | |
2 |
B+C)P2\right)d\\ &style+
1 | |
6 |
BP0+(-
1 | |
3 |
B+1)P1+
1 | |
6 |
BP2\\ \end{align}
P
P1
P2
d
P1
P
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
styleB=C= | 1 |
3 |
The following parameters result in well-known cubic splines used in common image editing programs:
B | C | Cubic spline | Common implementations | |
---|---|---|---|---|
0 | Any | Cardinal splines | ||
0 | 0.5 | Bicubic filter in GIMP | ||
0 | 0.75 | Unnamed | Bicubic filter in Adobe Photoshop[4] | |
1/3 | 1/3 | Mitchell–Netravali | Mitchell filter in ImageMagick[5] | |
1 | 0 | B-spline | Bicubic filter in Paint.net |