Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between resize and pryDown/pryUp in opencv?

I am new to opencv and wondering what's the differcen between resize and pryDown/pryUp, and how to choose between them?

like image 533
Mickey Shine Avatar asked Sep 29 '13 03:09

Mickey Shine


1 Answers

pyrDown() and pyrUp() are used for building pyramids.

pyrDown()... performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with [a] kernel [... then] it downsamples the image by rejecting even rows and columns.

and

pyrUp()...performs the upsampling step of the Gaussian pyramid construction... First, it upsamples the source image by injecting even zero rows and columns and then convolves the result with the same kernel as in pyrDown() multiplied by 4.

up/down-sampling is essentially like nearest-neighbor resizing.

resize() is used for resizing with various interpolation modes.

like image 155
Adi Shavit Avatar answered Jan 03 '23 23:01

Adi Shavit