1
$\begingroup$

I'm experimenting with image resizing techniques and algorithms. Specifically, I'm significantly downsizing images, e. g. from 2048x1536 to 64x48 - 32 times.
Now, say I'm using a 4x4 kernel. Right now I'm upscaling the image to be by a factor of power of 4 larger than the target (2048x1536 becomes 4096x3072), and then process the image 3 times, each time obtaining a new image 4 times smaller than the source. Seems ineffecient. Is there a trick to it?

$\endgroup$
2
$\begingroup$

It is arguably inefficient. You could achieve the same results with a single processing step using a single kernel. You can do this by convolving all of the kernels together, then applying your resize using this larger kernel.

A similar process to this is used in most digital painting packages. The resizing usually offers some fixed kernel sizes (e.g. bilinear / bicubic - these may be referred to as 'smoother' / 'sharper') as well as some form of intelligent resize (sometimes called 'smart' or 'best quality') where the resampling kernel size is a factor of the image size.

If you need more information you should add some details about what precisely you are trying to achieve.

$\endgroup$
  • $\begingroup$ So basically I need to construct a kernel that has just the right size for the target image? I simply need to downsize images, the twist being that the target size is basically an icon. $\endgroup$ – Violet Giraffe Jun 3 '14 at 19:05
  • $\begingroup$ By the way, can you, by any chance, advise the most suitable algorithm / kernel for retaining a recognizable (not too soft) image after extreme downscale? $\endgroup$ – Violet Giraffe Jun 3 '14 at 19:07
  • 1
    $\begingroup$ I would investigate Lanczos resampling - en.wikipedia.org/wiki/Lanczos_resampling. For background you may want to read up on sinc filters. $\endgroup$ – PAK-9 Jun 4 '14 at 10:33

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.