"impyramid" and "imresize" functions both are used in Matlab to downsize a function, but what is the difference between them? Which one is better for downsampling and upsampling?
To my understanding impyramid expands or reduces image size by fixed factor of two while with imresize you can give arbitrary scaling factor. With imresize you can also select different interpolation methods while with impyramid that is fixed to given kernel...
As always it is a trade off between quality and computation time. Also the target platform may have to be considered (ie embedded dsp/cpu/gpu/fpga tta/what ever...). On my desktop I get:
>> testResize %(here input 192x256x3)
pyramid time: 3.348ms psnr:32.22dB kernel = [14-a2,14,a,14,14-a2], where a = 0.375
So if one wants fastest possible way one would select imresize with nearest, while cubic appears to give better quality and pyramid the best quality. However, also the contents of the images to be resized may affect how the kernels perform quality wise as well if the gpu is used and if the gpu supports for example HW filtering with given kernel (e.g they usually do with bilinear).
I really would encourage to write own test scripts when figuring out problems like this, so that one can be sure that the own requirements are met. To see how easy that is see the attached test script...