10
$\begingroup$

Bicubic sampling is pretty good for up sampling an image and making it larger, but is it a good choice for down sampling as well? Are there better choices?

$\endgroup$
  • 1
    $\begingroup$ These two old articles from The Inner Product talk about filters for mipmap generation, which might be relevant to you: Link1, link2. $\endgroup$ – glampert Aug 6 '15 at 19:38
11
$\begingroup$

When Sean and I wrote stb_image_resize we chose Mitchell for downsizing. Mitchell is similar to Cubic, you can read about the cubic class of sampling filters in Mitchell Netravali 1988. They are all pretty similar and will get you very similar results.

I can't find any written record between Sean and I of why we decided to go with Mitchell, but if memory serves we just resampled a bunch of images and used the algorithm that we thought looked best. I wouldn't say that there is one authoritative or best filter, you should use the one that looks best on your data.

Edit: Like joojaa says, a windowed sinc filter is also good, if not quite as cheap. You can find some implementations here.

$\endgroup$
  • 3
    $\begingroup$ There is a authoritatively best filter, its a infinitely wide sinc filter. Its just not possible to use it. untill that time lanczos windowed sinc is a good alternative to michell $\endgroup$ – joojaa Aug 6 '15 at 15:38
  • $\begingroup$ For reference, there's also the Nvidia image tools. $\endgroup$ – glampert Aug 6 '15 at 19:48
  • $\begingroup$ If you are using a cubic-esque or lanczos filter, do those guys work equally well for scaling up as they do for scaling down? $\endgroup$ – Alan Wolfe Aug 6 '15 at 20:14
  • $\begingroup$ I've not tried lanczos so I can't speak to that. We chose catmull-rom for upscaling, which is a cubic, and it worked well. $\endgroup$ – Jorge Rodriguez Aug 7 '15 at 17:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.