diff --git a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst index d486bc8ca2..128200a033 100644 --- a/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst +++ b/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.rst @@ -286,6 +286,8 @@ For points in an image of a stereo pair, computes the corresponding epilines in .. ocv:cfunction:: void cvComputeCorrespondEpilines( const CvMat* points, int which_image, const CvMat* fundamental_matrix, CvMat* correspondent_lines ) +.. ocv:pyfunction:: cv2.computeCorrespondEpilines(points, whichImage, F[, lines]) -> lines + :param points: Input points. :math:`N \times 1` or :math:`1 \times N` matrix of type ``CV_32FC2`` or ``vector`` . :param whichImage: Index of the image (1 or 2) that contains the ``points`` . diff --git a/modules/highgui/doc/user_interface.rst b/modules/highgui/doc/user_interface.rst index 3b822e4883..37cc790136 100644 --- a/modules/highgui/doc/user_interface.rst +++ b/modules/highgui/doc/user_interface.rst @@ -81,6 +81,9 @@ The function ``imshow`` displays an image in the specified window. If the window If window was created with OpenGL support, ``imshow`` also support :ocv:class:`ogl::Buffer` , :ocv:class:`ogl::Texture2D` and :ocv:class:`gpu::GpuMat` as input. +.. note:: This function should be followed by ``waitKey`` function which displays the image for specified milliseconds. Otherwise, it won't display the image. + + namedWindow --------------- Creates a window. diff --git a/modules/imgproc/doc/filtering.rst b/modules/imgproc/doc/filtering.rst index e7382ece04..6d89e206b9 100755 --- a/modules/imgproc/doc/filtering.rst +++ b/modules/imgproc/doc/filtering.rst @@ -759,7 +759,7 @@ Dilates an image by using a specific structuring element. :param dst: output image of the same size and type as ``src``. - :param element: structuring element used for dilation; if ``element=Mat()`` , a ``3 x 3`` rectangular structuring element is used. + :param kernel: structuring element used for dilation; if ``element=Mat()`` , a ``3 x 3`` rectangular structuring element is used. Kernel can be created using :ocv:func:`getStructuringElement` :param anchor: position of the anchor within the element; default value ``(-1, -1)`` means that the anchor is at the element center. @@ -782,11 +782,16 @@ The function supports the in-place mode. Dilation can be applied several ( ``ite :ocv:func:`erode`, :ocv:func:`morphologyEx`, :ocv:func:`createMorphologyFilter` + :ocv:func:`getStructuringElement` + .. Sample code:: * : An example using the morphological dilate operation can be found at opencv_source_code/samples/cpp/morphology2.cpp + + + erode ----- Erodes an image by using a specific structuring element. @@ -801,7 +806,7 @@ Erodes an image by using a specific structuring element. :param dst: output image of the same size and type as ``src``. - :param element: structuring element used for erosion; if ``element=Mat()`` , a ``3 x 3`` rectangular structuring element is used. + :param kernel: structuring element used for erosion; if ``element=Mat()`` , a ``3 x 3`` rectangular structuring element is used. Kernel can be created using :ocv:func:`getStructuringElement`. :param anchor: position of the anchor within the element; default value ``(-1, -1)`` means that the anchor is at the element center. @@ -823,7 +828,8 @@ The function supports the in-place mode. Erosion can be applied several ( ``iter :ocv:func:`dilate`, :ocv:func:`morphologyEx`, - :ocv:func:`createMorphologyFilter` + :ocv:func:`createMorphologyFilter`, + :ocv:func:`getStructuringElement` .. Sample code:: @@ -956,7 +962,7 @@ Returns Gaussian filter coefficients. :param ksize: Aperture size. It should be odd ( :math:`\texttt{ksize} \mod 2 = 1` ) and positive. :param sigma: Gaussian standard deviation. If it is non-positive, it is computed from ``ksize`` as \ ``sigma = 0.3*((ksize-1)*0.5 - 1) + 0.8`` . - :param ktype: Type of filter coefficients. It can be ``CV_32f`` or ``CV_64F`` . + :param ktype: Type of filter coefficients. It can be ``CV_32F`` or ``CV_64F`` . The function computes and returns the :math:`\texttt{ksize} \times 1` matrix of Gaussian filter coefficients: @@ -985,6 +991,32 @@ Two of such generated kernels can be passed to +getGaborKernel +----------------- +Returns Gabor filter coefficients. + +.. ocv:function:: Mat getGaborKernel( Size ksize, double sigma, double theta, double lambd, double gamma, double psi = CV_PI*0.5, int ktype = CV_64F ) + +.. ocv:pyfunction:: cv2.getGaborKernel(ksize, sigma, theta, lambd, gamma[, psi[, ktype]]) -> retval + + :param ksize: Size of the filter returned. + + :param sigma: Standard deviation of the gaussian envelope. + + :param theta: Orientation of the normal to the parallel stripes of a Gabor function. + + :param lambd: Wavelength of the sinusoidal factor. + + :param gamma: Spatial aspect ratio. + + :param psi: Phase offset. + + :param ktype: Type of filter coefficients. It can be ``CV_32F`` or ``CV_64F`` . + +For more details about gabor filter equations and parameters, see: `Gabor Filter `_. + + + getKernelType ------------- Returns the kernel type. @@ -1099,7 +1131,9 @@ Performs advanced morphological transformations. :param dst: Destination image of the same size and type as ``src`` . - :param element: Structuring element. + :param kernel: Structuring element. It can be created using :ocv:func:`getStructuringElement`. + + :param anchor: Anchor position with the kernel. Negative values mean that the anchor is at the kernel center. :param op: Type of a morphological operation that can be one of the following: @@ -1157,7 +1191,8 @@ Any of the operations can be done in-place. In case of multi-channel images, eac :ocv:func:`dilate`, :ocv:func:`erode`, - :ocv:func:`createMorphologyFilter` + :ocv:func:`createMorphologyFilter`, + :ocv:func:`getStructuringElement` .. Sample code:: diff --git a/modules/photo/doc/inpainting.rst b/modules/photo/doc/inpainting.rst index 149da0350b..feb5edf2ca 100644 --- a/modules/photo/doc/inpainting.rst +++ b/modules/photo/doc/inpainting.rst @@ -23,7 +23,7 @@ Restores the selected region in an image using the region neighborhood. :param flags: Inpainting method that could be one of the following: - * **INPAINT_NS** Navier-Stokes based method. + * **INPAINT_NS** Navier-Stokes based method [Navier01] * **INPAINT_TELEA** Method by Alexandru Telea [Telea04]_. @@ -36,3 +36,9 @@ for more details. * : An example using the inpainting technique can be found at opencv_source_code/samples/cpp/inpaint.cpp * : PYTHON : An example using the inpainting technique can be found at opencv_source_code/samples/python2/inpaint.py + + +.. [Telea04] Telea, Alexandru. "An image inpainting technique based on the fast marching method." Journal of graphics tools 9, no. 1 (2004): 23-34. + +.. [Navier01] Bertalmio, Marcelo, Andrea L. Bertozzi, and Guillermo Sapiro. "Navier-stokes, fluid dynamics, and image and video inpainting." In Computer Vision and Pattern Recognition, 2001. CVPR 2001. Proceedings of the 2001 IEEE Computer Society Conference on, vol. 1, pp. I-355. IEEE, 2001. + diff --git a/modules/video/doc/motion_analysis_and_object_tracking.rst b/modules/video/doc/motion_analysis_and_object_tracking.rst index a896f6ecbb..4483d5c9e9 100644 --- a/modules/video/doc/motion_analysis_and_object_tracking.rst +++ b/modules/video/doc/motion_analysis_and_object_tracking.rst @@ -170,6 +170,8 @@ Finds the geometric transform (warp) between two images in terms of the ECC crit .. ocv:function:: double findTransformECC( InputArray templateImage, InputArray inputImage, InputOutputArray warpMatrix, int motionType=MOTION_AFFINE, TermCriteria criteria=TermCriteria(TermCriteria::COUNT+TermCriteria::EPS, 50, 0.001)) +.. ocv:pyfunction:: cv2.findTransformECC(templateImage, inputImage, warpMatrix[, motionType[, criteria]]) -> retval, warpMatrix + :param templateImage: single-channel template image; ``CV_8U`` or ``CV_32F`` array. :param inputImage: single-channel input image which should be warped with the final ``warpMatrix`` in order to provide an image similar to ``templateImage``, same type as ``temlateImage``.