diff --git a/stubs/cv2-stubs/__init__.pyi b/stubs/cv2-stubs/__init__.pyi index f720df9b..ce5abb9b 100644 --- a/stubs/cv2-stubs/__init__.pyi +++ b/stubs/cv2-stubs/__init__.pyi @@ -2823,12 +2823,12 @@ def recoverPose(E, points1, points2, cameraMatrix, R=..., t=..., mask: Mat = ... "recoverPose(E, points1, points2, cameraMatrix[, R[, t[, mask]]]) -> retval, R, t, mask\n. @brief Recovers the relative camera rotation and the translation from an estimated essential\n. matrix and the corresponding points in two images, using cheirality check. Returns the number of\n. inliers that pass the check.\n. \n. @param E The input essential matrix.\n. @param points1 Array of N 2D points from the first image. The point coordinates should be\n. floating-point (single or double precision).\n. @param points2 Array of the second image points of the same size and format as points1 .\n. @param cameraMatrix Camera matrix \\f$A = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\\f$ .\n. Note that this function assumes that points1 and points2 are feature points from cameras with the\n. same camera matrix.\n. @param R Output rotation matrix. Together with the translation vector, this matrix makes up a tuple\n. that performs a change of basis from the first camera's coordinate system to the second camera's\n. coordinate system. Note that, in general, t can not be used for this tuple, see the parameter\n. described below.\n. @param t Output translation vector. This vector is obtained by @ref decomposeEssentialMat and\n. therefore is only known up to scale, i.e. t is the direction of the translation vector and has unit\n. length.\n. @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks\n. inliers in points1 and points2 for then given essential matrix E. Only these inliers will be used to\n. recover pose. In the output mask only inliers which pass the cheirality check.\n. \n. This function decomposes an essential matrix using @ref decomposeEssentialMat and then verifies\n. possible pose hypotheses by doing cheirality check. The cheirality check means that the\n. triangulated 3D points should have positive depth. Some details can be found in @cite Nister03.\n. \n. This function can be used to process the output E and mask from @ref findEssentialMat. In this\n. scenario, points1 and points2 are the same input for findEssentialMat.:\n. @code\n. // Example. Estimation of fundamental matrix using the RANSAC algorithm\n. int point_count = 100;\n. vector points1(point_count);\n. vector points2(point_count);\n. \n. // initialize the points here ...\n. for( int i = 0; i < point_count; i++ )\n. {\n. points1[i] = ...;\n. points2[i] = ...;\n. }\n. \n. // cametra matrix with both focal lengths = 1, and principal point = (0, 0)\n. Mat cameraMatrix = Mat::eye(3, 3, CV_64F);\n. \n. Mat E, R, t, mask;\n. \n. E = findEssentialMat(points1, points2, cameraMatrix, RANSAC, 0.999, 1.0, mask);\n. recoverPose(E, points1, points2, cameraMatrix, R, t, mask);\n. @endcode\n\n\n\nrecoverPose(E, points1, points2[, R[, t[, focal[, pp[, mask]]]]]) -> retval, R, t, mask\n. @overload\n. @param E The input essential matrix.\n. @param points1 Array of N 2D points from the first image. The point coordinates should be\n. floating-point (single or double precision).\n. @param points2 Array of the second image points of the same size and format as points1 .\n. @param R Output rotation matrix. Together with the translation vector, this matrix makes up a tuple\n. that performs a change of basis from the first camera's coordinate system to the second camera's\n. coordinate system. Note that, in general, t can not be used for this tuple, see the parameter\n. description below.\n. @param t Output translation vector. This vector is obtained by @ref decomposeEssentialMat and\n. therefore is only known up to scale, i.e. t is the direction of the translation vector and has unit\n. length.\n. @param focal Focal length of the camera. Note that this function assumes that points1 and points2\n. are feature points from cameras with same focal length and principal point.\n. @param pp principal point of the camera.\n. @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks\n. inliers in points1 and points2 for then given essential matrix E. Only these inliers will be used to\n. recover pose. In the output mask only inliers which pass the cheirality check.\n. \n. This function differs from the one above that it computes camera matrix from focal length and\n. principal point:\n. \n. \\f[A =\n. \\begin{bmatrix}\n. f & 0 & x_{pp} \\\\\n. 0 & f & y_{pp} \\\\\n. 0 & 0 & 1\n. \\end{bmatrix}\\f]\n\n\n\nrecoverPose(E, points1, points2, cameraMatrix, distanceThresh[, R[, t[, mask[, triangulatedPoints]]]]) -> retval, R, t, mask, triangulatedPoints\n. @overload\n. @param E The input essential matrix.\n. @param points1 Array of N 2D points from the first image. The point coordinates should be\n. floating-point (single or double precision).\n. @param points2 Array of the second image points of the same size and format as points1.\n. @param cameraMatrix Camera matrix \\f$A = \\vecthreethree{f_x}{0}{c_x}{0}{f_y}{c_y}{0}{0}{1}\\f$ .\n. Note that this function assumes that points1 and points2 are feature points from cameras with the\n. same camera matrix.\n. @param R Output rotation matrix. Together with the translation vector, this matrix makes up a tuple\n. that performs a change of basis from the first camera's coordinate system to the second camera's\n. coordinate system. Note that, in general, t can not be used for this tuple, see the parameter\n. description below.\n. @param t Output translation vector. This vector is obtained by @ref decomposeEssentialMat and\n. therefore is only known up to scale, i.e. t is the direction of the translation vector and has unit\n. length.\n. @param distanceThresh threshold distance which is used to filter out far away points (i.e. infinite\n. points).\n. @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks\n. inliers in points1 and points2 for then given essential matrix E. Only these inliers will be used to\n. recover pose. In the output mask only inliers which pass the cheirality check.\n. @param triangulatedPoints 3D points which were reconstructed by triangulation.\n. \n. This function differs from the one above that it outputs the triangulated 3D point that are used for\n. the cheirality check." ... -@overload +@typing.overload def rectangle(img: Mat, pt1: typing.Tuple[int, int], pt2: typing.Tuple[int, int], color, thickness=..., lineType=..., shift=...) -> typing.Any: 'rectangle(img, pt1, pt2, color[, thickness[, lineType[, shift]]]) -> img\n. @brief Draws a simple, thick, or filled up-right rectangle.\n. \n. The function cv::rectangle draws a rectangle outline or a filled rectangle whose two opposite corners\n. are pt1 and pt2.\n. \n. @param img Image.\n. @param pt1 Vertex of the rectangle.\n. @param pt2 Vertex of the rectangle opposite to pt1 .\n. @param color Rectangle color or brightness (grayscale image).\n. @param thickness Thickness of lines that make up the rectangle. Negative values, like #FILLED,\n. mean that the function has to draw a filled rectangle.\n. @param lineType Type of the line. See #LineTypes\n. @param shift Number of fractional bits in the point coordinates.\n\n\n\nrectangle(img, rec, color[, thickness[, lineType[, shift]]]) -> img\n. @overload\n. \n. use `rec` parameter as alternative specification of the drawn rectangle: `r.tl() and\n. r.br()-Point(1,1)` are opposite corners' ... -@overload +@typing.overload def rectangle(img: Mat, rec: typing.Tuple[int, int, int, int], color, thickness=..., lineType=..., shift=...) -> typing.Any: ...