Size parameter in Pyrdown?

asked 2015-04-29 03:34:30 -0500

juanmanpr gravatar image

What is the point of the size parameter in the Pyrdown function? It effectively enforces that the output image be the half of the size of the input only, no?

edit retag flag offensive close merge delete

Comments

1

i'm not sure, but imho it is there to give you control over what happens e.g. in case of odd input sizes.

for [103x103] input, both (50,50) and (51,51) are valid image description

berak gravatar imageberak ( 2015-04-29 03:52:34 -0500 )edit

I am guessing that it has something to do with the enforcing of another downscaling step. If it would always be half of previous scale, than algorithms like the cascade classifiers would not be able to define the step of the downsampling :)

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-29 04:14:54 -0500 )edit

Ahhh, what @berak says makes sense. @StevenPuttemans, I am not sure I understand what you said, I think the cascade classifiers and other algorithms are not actually using the pyrDown.

juanmanpr gravatar imagejuanmanpr ( 2015-04-29 08:02:50 -0500 )edit

O since the cascade classifier is creating a image pyramid for multi scale detection it seemed to me that using this functionality was possible. Haven't checked it however...

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-30 02:20:15 -0500 )edit

@berak So, is there a work-around to this or do I have to keep scaling down by 2 till I reach as close to the desired size?

kartikeygupta9097 gravatar imagekartikeygupta9097 ( 2017-01-23 04:02:29 -0500 )edit

Nvr mnd. I found out about the resize() func....

kartikeygupta9097 gravatar imagekartikeygupta9097 ( 2017-01-23 04:23:00 -0500 )edit