From b570a4ac47842856c8fb91932aa5faa4b2c47801 Mon Sep 17 00:00:00 2001 From: Ovidiu Parvu Date: Sun, 15 Sep 2013 23:40:40 +0100 Subject: [PATCH] Added the C interface function signature and the overloaded minEnclosingTriangle Python function to the documentation. --- .../structural_analysis_and_shape_descriptors.rst | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst b/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst index c091ba3b0..734808486 100644 --- a/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst +++ b/modules/imgproc/doc/structural_analysis_and_shape_descriptors.rst @@ -568,13 +568,23 @@ Finds a triangle of minimum area enclosing a 2D point set. .. ocv:function:: void minEnclosingTriangle( InputArray points, OutputArray triangle, double &area ) +.. ocv:pyfunction:: cv2.minEnclosingTriangle(points[, triangle]) -> triangle + .. ocv:pyfunction:: cv2.minEnclosingTriangle(points[, triangle]) -> triangle, area - :param points: Input vector of 2D points with depth ``CV_32S`` or ``CV_32F``. +.. ocv:cfunction:: int cvMinEnclosingTriangle( const CvArr* points, CvArr* triangle, double* area ) + + :param points: Input vector of 2D points with depth ``CV_32S`` or ``CV_32F``, stored in: + + * ``std::vector<>`` or ``Mat`` (C++ interface) + + * ``CvSeq*`` or ``CvMat*`` (C interface) + + * Nx2 numpy array (Python interface) :param triangle: Output vector of three 2D points defining the vertices of the triangle. The depth of the OutputArray must be ``CV_32F``. - :param area: The area of the minimum enclosing triangle. + :param area: The area of the minimum enclosing triangle. The ``C`` interface of the function allows providing a ``NULL`` pointer for this parameter in order for the value of the area not to be returned. The output for a given 2D point set is shown in the image below. The 2D points are depicted in *red* and the enclosing triangle in *yellow*.