<p>If the downsampling pass is properly designed, it will effectively perform low-pass filtering as part of the downsampling.  There is no need for a separate low-pass filter operation.</p>

<p>Essentially, when you downsample, you are performing a filter over the source (high-res) image pixels, but only evaluating it at the locations of the destination (low-res) pixels.  The footprint of this filter needs to be approximately the spacing between destination pixels, to avoid missing information by skipping over in-between source pixels.  But that means the filter footprint will be several source pixels wide, so it will effectively low-pass the source.</p>

<p>For example, let's suppose you downsample an image by exactly 10x on each axis.  With a box filter (for example's sake), you would set each destination pixel to the average of a 10x10 box of source pixels.  That would wipe out any features smaller than 10px, so it's effectively a low-pass filter.</p>

<p>You mention bicubic interpolation; we have to make a distinction between filtering and interpolation here.  Interpolation is appropriate for upsampling, not downsampling.  Bicubic interpolation works by fitting a bicubic spline patch to a 4x4 neighborhood of pixels, then evaluating the patch at interpolated points. While it may work well enough for downsampling images by a small factor (up to 2x or so), it will fail if you go much further than that.  For instance, if downsampling by 10x as in the previous example, you can see that bicubic will miss the majority of the source pixels, and the result may be quite aliased.</p>

<p>On the other hand, bicubic <em>filtering</em> is just standard filtering, using a kernel that's a bicubic function (as opposed to a box, triangle, Gaussian, Lanczos, etc. kernel).  The Mitchell-Netravali kernel is the classic example of this type.  If used for downsampling, the kernel should be sized appropriately for the destination pixel spacing as discussed earlier, and you would sum over all the pixels in the footprint, not just a 4x4 or other fixed-size neighborhood.</p>

CC BY-SA 3.0
2015-08-08T07:11:05.800Z
2015-08-08T07:11:05.800Z
Nathan Reed
<p>Apparently bicubic pixel interpolation is good for scaling up or down an image (in real time or not).</p>

<p>Is it recommended to use a lowpass filter before downsizing though, or does the bicubic sampling handle aliasing problems at all?</p>

CC BY-SA 3.0
2015-08-07T17:20:12.627Z
I'm a bit confused about your premise ... how is a lowpass filter qualitatively any different than downsampling? I mean, I get that the algorithms are different and all but they both gather samples from neighboring pixels and suppress high frequencies. The big difference is the resolution of the result image, otherwise the two operations are isomorphic. Seems like applying both is redundant.
Jorge Rodriguez
CC BY-SA 3.0
2015-08-07T17:24:12.550Z
Well here's what confuses me.  I know that you can't just downsample an image without getting aliasing.  Doing bicubic interpolation of pixels when making an image larger works really well and looks nice.  Doing the same when making an image smaller SEEMS to work decently, but I wasn't sure if the result is likely to have much aliasing as a result.  I was wondering if technically, you'd need to do some kind of low pass filter on the image before the doing bicubic sampling, or if the bicubic sampling was good enough in practice?  I could see it being a low pass filter of sorts on its own maybe.
Alan Wolfe
CC BY-SA 3.0
2015-08-07T18:30:49.443Z
That Mitchell-Netravali paper I mentioned in the other question addresses this idea specifically - he generalized cubics and then found the parameters that alias the least. That doesn't mean they don't alias at all, but perhaps it would direct you towards which cubic to use to minimize aliasing.
Jorge Rodriguez
<texture>
Do you need to use a lowpass filter before downsizing an image?
Alan Wolfe
# Do you need to use a lowpass filter before downsizing an image?

(Asked by: username_0 on 2015-08-07)

Apparently bicubic pixel interpolation is good for scaling up or down an image (in real time or not).

Is it recommended to use a lowpass filter before downsizing though, or does the bicubic sampling handle aliasing problems at all?

**Tags:** texture

> **Comments:**
> **username_1**: I'm a bit confused about your premise ... how is a lowpass filter qualitatively any different than downsampling? I mean, I get that the algorithms are different and all but they both gather samples from neighboring pixels and suppress high frequencies. The big difference is the resolution of the result image, otherwise the two operations are isomorphic. Seems like applying both is redundant.  
> **username_0**: Well here's what confuses me.  I know that you can't just downsample an image without getting aliasing.  Doing bicubic interpolation of pixels when making an image larger works really well and looks nice.  Doing the same when making an image smaller SEEMS to work decently, but I wasn't sure if the result is likely to have much aliasing as a result.  I was wondering if technically, you'd need to do some kind of low pass filter on the image before the doing bicubic sampling, or if the bicubic sampling was good enough in practice?  I could see it being a low pass filter of sorts on its own maybe.  
> **username_1**: That Mitchell-Netravali paper I mentioned in the other question addresses this idea specifically - he generalized cubics and then found the parameters that alias the least. That doesn't mean they don't alias at all, but perhaps it would direct you towards which cubic to use to minimize aliasing.  

---

## 1 answers

### Answer by username_2 on 2015-08-08. Score: 8 | Accepted answer

If the downsampling pass is properly designed, it will effectively perform low-pass filtering as part of the downsampling. There is no need for a separate low-pass filter operation.

Essentially, when you downsample, you are performing a filter over the source (high-res) image pixels, but only evaluating it at the locations of the destination (low-res) pixels. The footprint of this filter needs to be approximately the spacing between destination pixels, to avoid missing information by skipping over in-between source pixels. But that means the filter footprint will be several source pixels wide, so it will effectively low-pass the source.

For example, let's suppose you downsample an image by exactly 10x on each axis. With a box filter (for example's sake), you would set each destination pixel to the average of a 10x10 box of source pixels. That would wipe out any features smaller than 10px, so it's effectively a low-pass filter.

You mention bicubic interpolation; we have to make a distinction between filtering and interpolation here. Interpolation is appropriate for upsampling, not downsampling. Bicubic interpolation works by fitting a bicubic spline patch to a 4x4 neighborhood of pixels, then evaluating the patch at interpolated points. While it may work well enough for downsampling images by a small factor (up to 2x or so), it will fail if you go much further than that. For instance, if downsampling by 10x as in the previous example, you can see that bicubic will miss the majority of the source pixels, and the result may be quite aliased.

On the other hand, bicubic *filtering* is just standard filtering, using a kernel that's a bicubic function (as opposed to a box, triangle, Gaussian, Lanczos, etc. kernel). The Mitchell-Netravali kernel is the classic example of this type. If used for downsampling, the kernel should be sized appropriately for the destination pixel spacing as discussed earlier, and you would sum over all the pixels in the footprint, not just a 4x4 or other fixed-size neighborhood.


---

