[][src]Function opencv::imgproc::pyr_down

pub fn pyr_down(
    src: &dyn ToInputArray,
    dst: &mut dyn ToOutputArray,
    dstsize: Size,
    border_type: i32
) -> Result<()>

Blurs an image and downsamples it.

By default, size of the output image is computed as Size((src.cols+1)/2, (src.rows+1)/2), but in any case, the following conditions should be satisfied:

block formula

The function performs the downsampling step of the Gaussian pyramid construction. First, it convolves the source image with the kernel:

block formula

Then, it downsamples the image by rejecting even rows and columns.

Parameters

  • src: input image.
  • dst: output image; it has the specified size and the same type as src.
  • dstsize: size of the output image.
  • borderType: Pixel extrapolation method, see #BorderTypes (#BORDER_CONSTANT isn't supported)

C++ default parameters

  • dstsize: Size()
  • border_type: BORDER_DEFAULT