down sample nearest method
11 views (last 30 days)
I want to down sampling a image for this i use the function: imresize(im,0.5,'nearest'). But i don't understand how the nearest interpolation work in this case, i undestand in upsampling but not in downsampling?
Thanks for your answer
Sourav Bairagya on 17 Dec 2019
The command 'imresize(im,0.5,'nearest')' will first find out the query points i.e. it will map the output image cordinates to the input image coordinate space using the 'scale' provided in the input argument of 'imresize'. Then, using the selected 'method' in the input argument of the function, it will compute the values at those query points. Thus, downsampling is performed.