geometry
All modules / geometry
geometry_subdiv2d
approxPolyNfunctionApproximates a polygon with a convex hull with a specified accuracy and number of sides.
arcLengthfunctionCalculates a contour perimeter or a curve length.
boundingRectfunctionCalculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image.
boxPointsfunctionFinds the four vertices of a rotated rect. Useful to draw the rotated rectangle.
buildMSTfunctionBuilds a Minimum Spanning Tree (MST) using the specified algorithm (see `MSTAlgorithm`).
calibrationMatrixValuesfunctionComputes useful camera characteristics from the camera intrinsic matrix.
composeRTfunctionCombines two rotation-and-shift transformations.
computeCorrespondEpilinesfunctionFor points in an image of a stereo pair, computes the corresponding epilines in the other image.
contourAreafunctionCalculates a contour area.
convertPointsFromHomogeneousfunctionConverts points from homogeneous to Euclidean space.
convertPointsToHomogeneousfunctionConverts points from Euclidean to homogeneous space.
convexHullfunctionexample: samples/cpp/geometry.cpp
convexityDefectsfunctionFinds the convexity defects of a contour.
correctMatchesfunctionRefines coordinates of corresponding points.
decomposeEssentialMatfunctionDecompose an essential matrix to possible rotations and translation.
decomposeHomographyMatfunctionexample: samples/cpp/tutorial_code/features/Homography/decompose_homography.cpp
decomposeProjectionMatrixfunctionDecomposes a projection matrix into a rotation matrix and a camera intrinsic matrix.
DistanceTypesclassDistance types for Distance Transform and M-estimators
estimateAffine2DfunctionComputes an optimal affine transformation between two 2D point sets.
estimateAffine2D1functionComputes an optimal affine transformation between two 2D point sets.
estimateAffine3DfunctionComputes an optimal affine transformation between two 3D point sets.
estimateAffine3D1functionComputes an optimal affine transformation between two 3D point sets.
estimateAffinePartial2DfunctionComputes an optimal limited affine transformation with 4 degrees of freedom between
estimateTranslation2DfunctionComputes a pure 2D translation between two 2D point sets.
estimateTranslation3DfunctionComputes an optimal translation between two 3D point sets.
filterHomographyDecompByVisibleRefpointsfunctionFilters homography decompositions based on additional information.
findEssentialMatfunctionCalculates an essential matrix from the corresponding points in two images.
findEssentialMat1functionCalculates an essential matrix from the corresponding points in two images.
findEssentialMat2functionCalculates an essential matrix from the corresponding points in two images from potentially two different cameras.
findEssentialMat3functionCalculates an essential matrix from the corresponding points in two images from potentially two different cameras.
findFundamentalMatfunctionexample: samples/cpp/snippets/epipolar_lines.cpp
findFundamentalMat1functionexample: samples/cpp/snippets/epipolar_lines.cpp
findFundamentalMat2functionexample: samples/cpp/snippets/epipolar_lines.cpp
findHomographyfunctionexample: samples/cpp/tutorial_code/features/Homography/pose_from_homography.cpp
findHomography1functionexample: samples/cpp/tutorial_code/features/Homography/pose_from_homography.cpp
fisheye_distortPointsfunctionDistorts 2D points using fisheye model.
fisheye_distortPoints1functionOverload of distortPoints function to handle cases when undistorted points are got with non-identity
fisheye_estimateNewCameraMatrixForUndistortRectifyfunctionEstimates new camera intrinsic matrix for undistortion or rectification.
fisheye_projectPointsfunctionProjects points using fisheye model
fisheye_solvePnPfunctionFinds an object pose from 3D-2D point correspondences for fisheye camera model.
fisheye_solvePnPRansacfunctionFinds an object pose from 3D-2D point correspondences using the RANSAC scheme for fisheye camera moodel.
fisheye_undistortPointsfunctionUndistorts 2D points using fisheye camera model
fitEllipsefunctionFits an ellipse around a set of 2D points.
fitEllipseAMSfunctionFits an ellipse around a set of 2D points.
fitEllipseDirectfunctionFits an ellipse around a set of 2D points.
fitLinefunctionFits a line to a 2D or 3D point set.
getAffineTransformfunctionCalculates an affine transform from three pairs of the corresponding points.
getClosestEllipsePointsfunctionexample: samples/python/snippets/fitline.py
getDefaultNewCameraMatrixfunctionReturns the default new camera matrix.
getOptimalNewCameraMatrixfunctionReturns the new camera intrinsic matrix based on the free scaling parameter.
getPerspectiveTransformfunctionCalculates a perspective transform from four pairs of the corresponding points.
getRotationMatrix2DfunctionCalculates an affine matrix of 2D rotation.
HuMomentsfunctionCalculates seven Hu invariants.
intersectConvexConvexfunctionexample: samples/cpp/snippets/intersectExample.cpp
invertAffineTransformfunctionInverts an affine transformation.
isContourConvexfunctionTests a contour convexity.
LocalOptimMethodclassNative enum entries for local optim method. Pass an entry to enum-typed arguments or its .value to numeric arguments.
matchShapesfunctionCompares two shapes.
matMulDerivfunctionComputes partial derivatives of the matrix product for each multiplied matrix.
MatrixTypeclassType of matrix used in LevMarq solver
minAreaRectfunctionFinds a rotated rectangle of the minimum area enclosing the input 2D point set.
minEnclosingCirclefunctionFinds a circle of the minimum area enclosing a 2D point set.
minEnclosingConvexPolygonfunctionFinds a convex polygon of minimum area enclosing a 2D point set and returns its area.
minEnclosingTrianglefunctionFinds a triangle of minimum area enclosing a 2D point set and returns its area.
momentsfunctionCalculates all of the moments up to the third order of a polygon or rasterized shape.
MSTAlgorithmclassRepresents the algorithms available for building a Minimum Spanning Tree (MST).
MSTEdgeclassRepresents an edge in a graph for Minimum Spanning Tree (MST) computation.
NeighborSearchMethodclassNative enum entries for neighbor search method. Pass an entry to enum-typed arguments or its .value to numeric arguments.
pointPolygonTestfunctionPerforms a point-in-contour test.
PolishingMethodclassNative enum entries for polishing method. Pass an entry to enum-typed arguments or its .value to numeric arguments.
projectPointsfunctionProjects 3D points to an image plane.
projectPointsSepJfunctionProjects 3D points to an image plane.
recoverPosefunctionRecovers the relative camera rotation and the translation from corresponding points in two images from two different cameras, using chirality check. Returns the number of
recoverPose1functionRecovers the relative camera rotation and the translation from an estimated essential
recoverPose2functionRecovers the relative camera rotation and the translation from an estimated essential
recoverPose3functionRecovers the relative camera rotation and the translation from an estimated essential
RectanglesIntersectTypesclasstypes of intersection between rectangles
RodriguesfunctionConverts a rotation matrix to a rotation vector or vice versa.
rotatedRectangleIntersectionfunctionFinds out if there is any intersection between two rotated rectangles.
RQDecomp3x3functionComputes an RQ decomposition of 3x3 matrices.
SacMethodclasstype of the robust estimation algorithm
SacModelTypeclassNative enum entries for sac model type. Pass an entry to enum-typed arguments or its .value to numeric arguments.
SamplingMethodclassNative enum entries for sampling method. Pass an entry to enum-typed arguments or its .value to numeric arguments.
sampsonDistancefunctionCalculates the Sampson Distance between two points.
ScoreMethodclassNative enum entries for score method. Pass an entry to enum-typed arguments or its .value to numeric arguments.
solveP3PfunctionFinds an object pose ` {}^{c}\mathbf{T}_o ` from 3 3D-2D point correspondences.
solvePnPfunctionexample: samples/cpp/tutorial_code/features/Homography/homography_from_camera_displacement.cpp
solvePnPGenericfunctionFinds an object pose ` {}^{c}\mathbf{T}_o ` from 3D-2D point correspondences.
SolvePnPMethodclassNative enum entries for solve pn pmethod. Pass an entry to enum-typed arguments or its .value to numeric arguments.
solvePnPRansacfunctionFinds an object pose ` {}^{c}\mathbf{T}_o ` from 3D-2D point correspondences using the RANSAC scheme to deal with bad matches.
solvePnPRansac1functionFinds rotation and translation vector.
solvePnPRefineLMfunctionRefine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame
solvePnPRefineVVSfunctionRefine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame
Subdiv2Dclasssubdiv2 d value in the OpenCV API.
triangulatePointsfunctionThis function reconstructs 3-dimensional points (in homogeneous coordinates) by using
undistortImagePointsfunctionCompute undistorted image points position
undistortPointsfunctionComputes the ideal point coordinates from the observed point coordinates.
UsacParamsclassusac params value in the OpenCV API.
VariableTypeclassType of variables used in LevMarq solver
No matches. Try an algorithm name, a module, or a shorter phrase.
Constants
Use the named constant from cv. In particular, OpenCV 5 matrix type codes differ from OpenCV 4.
INTERSECT_NONENo intersection
INTERSECT_PARTIALThere is a partial intersection
INTERSECT_FULLOne of the rectangle is fully enclosed in the other
DIST_USERUser defined distance
DIST_L1distance = |x1-x2| + |y1-y2|
DIST_L2the simple euclidean distance
DIST_Cdistance = max(|x1-x2|,|y1-y2|)
DIST_L12L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1))
DIST_FAIRdistance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998
DIST_WELSCHdistance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846
DIST_HUBERdistance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345
Subdiv2D_PTLOC_ERRORPoint location error
SUBDIV2D_PTLOC_ERRORPoint location error
Subdiv2D_PTLOC_OUTSIDE_RECTPoint outside the subdivision bounding rect
SUBDIV2D_PTLOC_OUTSIDE_RECTPoint outside the subdivision bounding rect
Subdiv2D_PTLOC_INSIDEPoint inside some facet
SUBDIV2D_PTLOC_INSIDEPoint inside some facet
Subdiv2D_PTLOC_VERTEXPoint coincides with one of the subdivision vertices
SUBDIV2D_PTLOC_VERTEXPoint coincides with one of the subdivision vertices
Subdiv2D_PTLOC_ON_EDGEPoint on some edge
SUBDIV2D_PTLOC_ON_EDGEPoint on some edge
Subdiv2D_NEXT_AROUND_ORGSubdiv2D edge type navigation (see: getEdge())
SUBDIV2D_NEXT_AROUND_ORGSubdiv2D edge type navigation (see: getEdge())
Subdiv2D_NEXT_AROUND_DSTsubdiv2 d next around dst constant (0x22), defined by OpenCV for cv::Subdiv2D.
SUBDIV2D_NEXT_AROUND_DSTsubdiv2 d next around dst constant (0x22), defined by OpenCV for cv::Subdiv2D.
Subdiv2D_PREV_AROUND_ORGsubdiv2 d prev around org constant (0x11), defined by OpenCV for cv::Subdiv2D.
SUBDIV2D_PREV_AROUND_ORGsubdiv2 d prev around org constant (0x11), defined by OpenCV for cv::Subdiv2D.
Subdiv2D_PREV_AROUND_DSTsubdiv2 d prev around dst constant (0x33), defined by OpenCV for cv::Subdiv2D.
SUBDIV2D_PREV_AROUND_DSTsubdiv2 d prev around dst constant (0x33), defined by OpenCV for cv::Subdiv2D.
Subdiv2D_NEXT_AROUND_LEFTsubdiv2 d next around left constant (0x13), defined by OpenCV for cv::Subdiv2D.
SUBDIV2D_NEXT_AROUND_LEFTsubdiv2 d next around left constant (0x13), defined by OpenCV for cv::Subdiv2D.
Subdiv2D_NEXT_AROUND_RIGHTsubdiv2 d next around right constant (0x31), defined by OpenCV for cv::Subdiv2D.
SUBDIV2D_NEXT_AROUND_RIGHTsubdiv2 d next around right constant (0x31), defined by OpenCV for cv::Subdiv2D.
Subdiv2D_PREV_AROUND_LEFTsubdiv2 d prev around left constant (0x20), defined by OpenCV for cv::Subdiv2D.
SUBDIV2D_PREV_AROUND_LEFTsubdiv2 d prev around left constant (0x20), defined by OpenCV for cv::Subdiv2D.
Subdiv2D_PREV_AROUND_RIGHTsubdiv2 d prev around right constant (0x02), defined by OpenCV for cv::Subdiv2D.
SUBDIV2D_PREV_AROUND_RIGHTsubdiv2 d prev around right constant (0x02), defined by OpenCV for cv::Subdiv2D.
LMEDSleast-median of squares algorithm
RANSACRANSAC algorithm
RHORHO: RHO algorithm
USAC_DEFAULTUSAC algorithm, default settings
USAC_PARALLELUSAC, parallel version
USAC_FM_8PTSUSAC, fundamental matrix 8 points
USAC_FASTUSAC, fast settings
USAC_ACCURATEUSAC, accurate settings
USAC_PROSACUSAC, sorted points, runs PROSAC
USAC_MAGSACUSAC, runs MAGSAC++
SOLVEPNP_ITERATIVEPose refinement using non-linear Levenberg-Marquardt minimization scheme [Madsen04] [Eade13] \n
SOLVEPNP_EPNPEPnP: Efficient Perspective-n-Point Camera Pose Estimation [lepetit2009epnp]
SOLVEPNP_P3PRevisiting the P3P Problem [ding2023revisiting]
SOLVEPNP_AP3PAn Efficient Algebraic Solution to the Perspective-Three-Point Problem [Ke17]
SOLVEPNP_IPPEInfinitesimal Plane-Based Pose Estimation [Collins14] \n
SOLVEPNP_IPPE_SQUAREInfinitesimal Plane-Based Pose Estimation [Collins14] \n
SOLVEPNP_SQPNPSQPnP: A Consistently Fast and Globally OptimalSolution to the Perspective-n-Point Problem [Terzakis2020SQPnP]
SOLVEPNP_MAX_COUNTSOLVEPNP_MAX_COUNT: Used for count
FM_7POINT7-point algorithm
FM_8POINT8-point algorithm
FM_LMEDSleast-median algorithm. 7-point algorithm is used.
FM_RANSACRANSAC algorithm. It needs at least 15 points. 7-point algorithm is used.
SAMPLING_UNIFORMsampling uniform constant (0), defined by OpenCV for cv.
SAMPLING_PROGRESSIVE_NAPSACsampling progressive napsac constant (1), defined by OpenCV for cv.
SAMPLING_NAPSACsampling napsac constant (2), defined by OpenCV for cv.
SAMPLING_PROSACsampling prosac constant (3), defined by OpenCV for cv.
LOCAL_OPTIM_NULLlocal optim null constant (0), defined by OpenCV for cv.
LOCAL_OPTIM_INNER_LOlocal optim inner lo constant (1), defined by OpenCV for cv.
LOCAL_OPTIM_INNER_AND_ITER_LOlocal optim inner and iter lo constant (2), defined by OpenCV for cv.
LOCAL_OPTIM_GClocal optim gc constant (3), defined by OpenCV for cv.
LOCAL_OPTIM_SIGMAlocal optim sigma constant (4), defined by OpenCV for cv.
SCORE_METHOD_RANSACscore method ransac constant (0), defined by OpenCV for cv.
SCORE_METHOD_MSACscore method msac constant (1), defined by OpenCV for cv.
SCORE_METHOD_MAGSACscore method magsac constant (2), defined by OpenCV for cv.
SCORE_METHOD_LMEDSscore method lmeds constant (3), defined by OpenCV for cv.
NEIGH_FLANN_KNNneigh flann knn constant (0), defined by OpenCV for cv.
NEIGH_GRIDneigh grid constant (1), defined by OpenCV for cv.
NEIGH_FLANN_RADIUSneigh flann radius constant (2), defined by OpenCV for cv.
NONE_POLISHERnone polisher constant (0), defined by OpenCV for cv.
LSQ_POLISHERlsq polisher constant (1), defined by OpenCV for cv.
MAGSACmagsac constant (2), defined by OpenCV for cv.
COV_POLISHERcov polisher constant (3), defined by OpenCV for cv.
MatrixType_AUTOmatrix type auto constant (0), defined by OpenCV for cv::MatrixType.
MATRIX_TYPE_AUTOmatrix type auto constant (0), defined by OpenCV for cv::MatrixType.
MatrixType_DENSEmatrix type dense constant (1), defined by OpenCV for cv::MatrixType.
MATRIX_TYPE_DENSEmatrix type dense constant (1), defined by OpenCV for cv::MatrixType.
MatrixType_SPARSEmatrix type sparse constant (2), defined by OpenCV for cv::MatrixType.
MATRIX_TYPE_SPARSEmatrix type sparse constant (2), defined by OpenCV for cv::MatrixType.
VariableType_LINEARvariable type linear constant (0), defined by OpenCV for cv::VariableType.
VARIABLE_TYPE_LINEARvariable type linear constant (0), defined by OpenCV for cv::VariableType.
VariableType_SO3variable type so3 constant (1), defined by OpenCV for cv::VariableType.
VARIABLE_TYPE_SO3variable type so3 constant (1), defined by OpenCV for cv::VariableType.
VariableType_SE3variable type se3 constant (2), defined by OpenCV for cv::VariableType.
VARIABLE_TYPE_SE3variable type se3 constant (2), defined by OpenCV for cv::VariableType.
MST_PRIMmst prim constant (0), defined by OpenCV for cv.
MST_KRUSKALmst kruskal constant (1), defined by OpenCV for cv.
SAC_METHOD_RANSACThe RANSAC algorithm described in [fischler1981random].
SAC_MODEL_PLANEThe 3D PLANE model coefficients in list [a, b, c, d], corresponding to the coefficients of equation
ax + by + cz + d = 0.SAC_MODEL_SPHEREThe 3D SPHERE model coefficients in list [center_x, center_y, center_z, radius], corresponding to the coefficients of equation
(x - center\_x)^2 + (y - center\_y)^2 + (z - center\_z)^2 = radius^2.