down sample nearest method

3 visualizaciones (últimos 30 días)
Gamliel Roos
Gamliel Roos el 10 de Dic. de 2019
Comentada: Sourav Bairagya el 18 de Dic. de 2019
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

Respuestas (1)

Sourav Bairagya
Sourav Bairagya el 17 de Dic. de 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.
  2 comentarios
Gamliel Roos
Gamliel Roos el 17 de Dic. de 2019
Thanks for your answer but how this 'method' (nearest) work in down sampling?
Sourav Bairagya
Sourav Bairagya el 18 de Dic. de 2019
It will copy the nearest pixel value at the query point. First, it will search horizontally which pixels are nearest to that point. Then, it will search vertically the nearest one among those pixels and copy that value to the desired location.

Iniciar sesión para comentar.

Categorías

Más información sobre Interpolation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by