Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Best algorithms for resizing images?

jnoring
Beginner
538 Views

I was recently modifying code our application has to resize images that had previously only been doing downscaling using the super sampling algorithm. My changes made it so upscaling was also a possibility, and when calling ippiResizeCenter_8u_C1R I noticed that it would return an error: ippStsInterpolationErr. I know very little about super sampling, other than for downsampling it removed moire artifacts that we were previously having--why can I not upscale an image with super sampling?

That said, what would be the algorithm with the best qualityfor upscaling? What about the fastest algorithm for upscaling? (and also, while we're on the subject, what's thehighest quality/fastestalgorithm to use for downscaling? And somewhere else on the net I read that you should do a sharpen after downscaling an image--is there any merit to this?)

I tried nearest neighbor and that worked fine for upscaling, although the resulting output was a bit rough.

Bear with me, I'm an image processing n00b. Any advice is welcome.

0 Kudos
2 Replies
levicki
Valued Contributor I
538 Views

IMO, for upsampling, best visual quality can be obtained by using stair interpolation with next best choice being bicubic interpolation. For downsampling anything more than bilinear interpolation would probably be an overkill.

In photo processing, sharpening is usually applied after downsampling. How much of it depends on taste but in any case it should not be integrated with downsampling because some people might not like it.

0 Kudos
nizanh
Beginner
538 Views
Forsize reduction, you should use supersampling. Other methods (nearest, linear, cubic) will create visible 'aliasing' artifacts, especially if the resize factor is 2 or more.
0 Kudos
Reply