Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Custom size pyramidup and pyramiddown in python?

I have found C++ pyrUp and pyrDown functions which accepts the custom size i.e.

`pyrUp( tmp, dst, Size( tmp.cols*2, tmp.rows*2 )`

I need a similar python function where I can specify the size of downscaled or upscaled image as I want to down scale 75% while the default function does 50% and I want to upscale by 25% instead of 50%.

Custom size pyramidup and pyramiddown in python?

I have found C++ pyrUp and pyrDown functions which accepts the custom size i.e.

`pyrUp( tmp, dst, Size( tmp.cols*2, tmp.rows*2 )`

I need a similar python function where I can specify the size of downscaled or upscaled image as I want to down scale 75% while the default function does 50% and I want to upscale by 25% instead of 50%.

Edit: Can we do 3/4 subsampling by using the following function.....

cv2.pyrUp(src[, dst[, dstsize[, borderType]]]) → dst

Custom size pyramidup and pyramiddown in python?

I have found C++ pyrUp and pyrDown functions which accepts the custom size i.e.

`pyrUp( tmp, dst, Size( tmp.cols*2, tmp.rows*2 )`

I need a similar python function where I can specify the size of downscaled or upscaled image as I want to down scale 75% while the default function does 50% and I want to upscale by 25% instead of 50%.

Edit: Can we do 3/4 subsampling subsampling/upsampling by using the following function.....

cv2.pyrUp(src[, dst[, dstsize[, borderType]]]) → dst


cv2.pyrDown(src[, dst[, dstsize[, borderType]]]) → dst
click to hide/show revision 4
retagged

updated 2016-12-11 05:44:59 -0600

berak gravatar image

Custom size pyramidup and pyramiddown in python?

I have found C++ pyrUp and pyrDown functions which accepts the custom size i.e.

`pyrUp( tmp, dst, Size( tmp.cols*2, tmp.rows*2 )`

I need a similar python function where I can specify the size of downscaled or upscaled image as I want to down scale 75% while the default function does 50% and I want to upscale by 25% instead of 50%.

Edit: Can we do 3/4 subsampling/upsampling by using the following function.....

cv2.pyrUp(src[, dst[, dstsize[, borderType]]]) → dst


cv2.pyrDown(src[, dst[, dstsize[, borderType]]]) → dst