Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

pyrUp() and pyrDown() only work with a factor of 2, you can't do arbitrary up / downscaling like that

(use cv::resize() then !)

you're supposed to use it recursively, like:

Mat a = ...
Mat b; pyrUp(a,b); // * 2
Mat c; pyrUp(b,c); // * 4
Mat d; pyrUp(c,d); // * 8

(there is a Size param in those functions, but you're only allowed to variate it +- 1 pixel, to compensate for odd image sizes when downscaling)