{% extends "base.html" %} {% block title %} pyrDown {% endblock %} {% block description %}
Blurs an image and downsamples it.
{% endblock %} {% block signature %}cv2.pyrDown(src[, dst[, dstsize[, borderType]]]) → dst{% endblock %} {% block parameters %}
src
.cv2.BORDER_*
): Pixel extrapolation method. Default is BORDER_DEFAULT. Choose from:
The function performs the downsampling step of the Gaussian pyramid construction. An image pyramid is a collection of images - all arising from a single original image - that are successively downsampled until some desired stopping point is reached. First, it convolves the source image with the kernel: $$\frac{1}{256} \left[ \begin{array}{ccccc} 1 & 4 & 6 & 4 & 1 \\ 4 & 16 & 24 & 16 & 4 \\ 6 & 24 & 36 & 24 & 6 \\ 4 & 16 & 24 & 16 & 4 \\ 1 & 4 & 6 & 4 & 1 \end{array} \right]$$ Then, it downsamples the image by rejecting even rows and columns.
{% endblock %} {% block notes %}
Size((src.cols+1)/2, (src.rows+1)/2)
, but in any case, the following conditions should be satisfied: