Is this a design error of the OpenCV "pyrDown" function

I see a pyrDown :

 CV_EXPORTS_W void pyrDown( InputArray src, OutputArray dst, const Size& dstsize=Size(), int borderType=BORDER_DEFAULT ); 

so I assume that the third dstsize parameter might be something like this: Size(src.cols/4, src.rows/4 But since docs says:

In any case, the following conditions must be met:

enter image description here

therefore, only the default size Size((src.cols+1)/2, (src.rows+1)/2) is legal. Then why do you need the dstsize parameter? It seems to be useless ...

Here I find a similar question:

http://answers.opencv.org/question/25281/pyrup-only-for-doubling-size/

and @berak commented:

pyramids only work in degrees 2

while I think that the pyramids only work in the power of ONE of 2, is that true?

+5
source share

Source: https://habr.com/ru/post/1207517/


All Articles