Skip to main content Module geometry Copy item path Source Expand description § Computational geometry primitives module.prelude LevMarq Levenberg-Marquadt solver LevMarq_Report Optimization report LevMarq_Settings Structure to keep LevMarq settings RegionGrowing3D Region Growing algorithm in 3D point cloud. SACSegmentation Sample Consensus algorithm segmentation of 3D point cloud model. Subdiv2D UsacParams DistanceTypes Distance types for Distance Transform and M-estimators LocalOptimMethod MatrixType Type of matrix used in LevMarq solver NeighborSearchMethod PolishingMethod RectanglesIntersectTypes types of intersection between rectangles SacMethod type of the robust estimation algorithm SacModelType SamplingMethod ScoreMethod SolvePnPMethod VariableType Type of variables used in LevMarq solver COV_POLISHER DIST_C distance = max(|x1-x2|,|y1-y2|) DIST_FAIR distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998 DIST_HUBER distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345 DIST_L1 distance = |x1-x2| + |y1-y2| DIST_L2 the simple euclidean distance DIST_L12 L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1)) DIST_USER User defined distance DIST_WELSCH distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846 FM_7POINT 7-point algorithm FM_8POINT 8-point algorithm FM_LMEDS least-median algorithm. 7-point algorithm is used. FM_RANSAC RANSAC algorithm. It needs at least 15 points. 7-point algorithm is used. INTERSECT_FULL One of the rectangle is fully enclosed in the other INTERSECT_NONE No intersection INTERSECT_PARTIAL There is a partial intersection LMEDS least-median of squares algorithm LOCAL_OPTIM_GC LOCAL_OPTIM_INNER_AND_ITER_LO LOCAL_OPTIM_INNER_LO LOCAL_OPTIM_NULL LOCAL_OPTIM_SIGMA LSQ_POLISHER MAGSAC MatrixType_AUTO MatrixType_DENSE MatrixType_SPARSE NEIGH_FLANN_KNN NEIGH_FLANN_RADIUS NEIGH_GRID NONE_POLISHER RANSAC RANSAC algorithm RHO RHO algorithm SAC_METHOD_RANSAC The RANSAC algorithm described in fischler1981random . SAC_MODEL_PLANE The 3D PLANE model coefficients in list [a, b, c, d] ,
corresponding to the coefficients of equation
inline formula. SAC_MODEL_SPHERE The 3D SPHERE model coefficients in list [center_x, center_y, center_z, radius] ,
corresponding to the coefficients of equation
inline formula. SAMPLING_NAPSAC SAMPLING_PROGRESSIVE_NAPSAC SAMPLING_PROSAC SAMPLING_UNIFORM SCORE_METHOD_LMEDS SCORE_METHOD_MAGSAC SCORE_METHOD_MSAC SCORE_METHOD_RANSAC SOLVEPNP_AP3P An Efficient Algebraic Solution to the Perspective-Three-Point Problem Ke17 SOLVEPNP_EPNP EPnP: Efficient Perspective-n-Point Camera Pose Estimation lepetit2009epnp SOLVEPNP_IPPE Infinitesimal Plane-Based Pose Estimation Collins14 SOLVEPNP_IPPE_SQUARE Infinitesimal Plane-Based Pose Estimation Collins14 SOLVEPNP_ITERATIVE Pose refinement using non-linear Levenberg-Marquardt minimization scheme Madsen04 Eade13 SOLVEPNP_MAX_COUNT Used for count SOLVEPNP_P3P Revisiting the P3P Problem ding2023revisiting SOLVEPNP_SQPNP SQPnP: A Consistently Fast and Globally OptimalSolution to the Perspective-n-Point Problem Terzakis2020SQPnP Subdiv2D_NEXT_AROUND_DST Subdiv2D_NEXT_AROUND_LEFT Subdiv2D_NEXT_AROUND_ORG Subdiv2D_NEXT_AROUND_RIGHT Subdiv2D_PREV_AROUND_DST Subdiv2D_PREV_AROUND_LEFT Subdiv2D_PREV_AROUND_ORG Subdiv2D_PREV_AROUND_RIGHT Subdiv2D_PTLOC_ERROR Point location error Subdiv2D_PTLOC_INSIDE Point inside some facet Subdiv2D_PTLOC_ON_EDGE Point on some edge Subdiv2D_PTLOC_OUTSIDE_RECT Point outside the subdivision bounding rect Subdiv2D_PTLOC_VERTEX Point coincides with one of the subdivision vertices USAC_ACCURATE USAC, accurate settings USAC_DEFAULT USAC algorithm, default settings USAC_FAST USAC, fast settings USAC_FM_8PTS USAC, fundamental matrix 8 points USAC_MAGSAC USAC, runs MAGSAC++ USAC_PARALLEL USAC, parallel version USAC_PROSAC USAC, sorted points, runs PROSAC VariableType_LINEAR VariableType_SE3 VariableType_SO3 LevMarqTrait Mutable methods for crate::geometry::LevMarq LevMarqTraitConst Constant methods for crate::geometry::LevMarq LevMarq_ReportTrait Mutable methods for crate::geometry::LevMarq_Report LevMarq_ReportTraitConst Constant methods for crate::geometry::LevMarq_Report LevMarq_SettingsTrait Mutable methods for crate::geometry::LevMarq_Settings LevMarq_SettingsTraitConst Constant methods for crate::geometry::LevMarq_Settings RegionGrowing3DTrait Mutable methods for crate::geometry::RegionGrowing3D RegionGrowing3DTraitConst Constant methods for crate::geometry::RegionGrowing3D SACSegmentationTrait Mutable methods for crate::geometry::SACSegmentation SACSegmentationTraitConst Constant methods for crate::geometry::SACSegmentation Subdiv2DTrait Mutable methods for crate::geometry::Subdiv2D Subdiv2DTraitConst Constant methods for crate::geometry::Subdiv2D approx_poly_dp Approximates a polygonal curve(s) with the specified precision. approx_poly_n Approximates a polygon with a convex hull with a specified accuracy and number of sides. approx_poly_n_def Approximates a polygon with a convex hull with a specified accuracy and number of sides. arc_length Calculates a contour perimeter or a curve length. bounding_rect Calculates the up-right bounding rectangle of a point set or non-zero pixels of gray-scale image. box_points Finds the four vertices of a rotated rect. Useful to draw the rotated rectangle. calibration_matrix_values Computes useful camera characteristics from the camera intrinsic matrix. compose_rt Combines two rotation-and-shift transformations. compose_rt_def Combines two rotation-and-shift transformations. compute_correspond_epilines For points in an image of a stereo pair, computes the corresponding epilines in the other image. contour_area Calculates a contour area. contour_area_def Calculates a contour area. convert_points_from_homogeneous Converts points from homogeneous to Euclidean space. convert_points_from_homogeneous_def Converts points from homogeneous to Euclidean space. convert_points_homogeneous Converts points to/from homogeneous coordinates. convert_points_to_homogeneous Converts points from Euclidean to homogeneous space. convert_points_to_homogeneous_def Converts points from Euclidean to homogeneous space. convex_hull Finds the convex hull of a point set. convex_hull_def Finds the convex hull of a point set. convexity_defects Finds the convexity defects of a contour. correct_matches Refines coordinates of corresponding points. decompose_essential_mat Decompose an essential matrix to possible rotations and translation. decompose_homography_mat Decompose a homography matrix to rotation(s), translation(s) and plane normal(s). decompose_projection_matrix Decomposes a projection matrix into a rotation matrix and a camera intrinsic matrix. decompose_projection_matrix_def Decomposes a projection matrix into a rotation matrix and a camera intrinsic matrix. distort_points Distorts 2D points using fisheye model. distort_points_1 Distorts 2D points using fisheye model. distort_points_1_def Distorts 2D points using fisheye model. distort_points_def Distorts 2D points using fisheye model. estimate_affine_2d Computes an optimal affine transformation between two 2D point sets. estimate_affine_2d_1 estimate_affine_2d_def Computes an optimal affine transformation between two 2D point sets. estimate_affine_3d Computes an optimal affine transformation between two 3D point sets. estimate_affine_3d_1 Computes an optimal affine transformation between two 3D point sets. estimate_affine_3d_1_def Computes an optimal affine transformation between two 3D point sets. estimate_affine_3d_def Computes an optimal affine transformation between two 3D point sets. estimate_affine_partial_2d Computes an optimal limited affine transformation with 4 degrees of freedom between
two 2D point sets. estimate_affine_partial_2d_def Computes an optimal limited affine transformation with 4 degrees of freedom between
two 2D point sets. estimate_new_camera_matrix_for_undistort_rectify Estimates new camera intrinsic matrix for undistortion or rectification. estimate_new_camera_matrix_for_undistort_rectify_def Estimates new camera intrinsic matrix for undistortion or rectification. estimate_translation_2d Computes a pure 2D translation between two 2D point sets. estimate_translation_2d_def Computes a pure 2D translation between two 2D point sets. estimate_translation_3d Computes an optimal translation between two 3D point sets. estimate_translation_3d_def Computes an optimal translation between two 3D point sets. farthest_point_sampling Point cloud sampling by Farthest Point Sampling(FPS). farthest_point_sampling_1 Point cloud sampling by Farthest Point Sampling(FPS). farthest_point_sampling_1_def Point cloud sampling by Farthest Point Sampling(FPS). farthest_point_sampling_def Point cloud sampling by Farthest Point Sampling(FPS). filter_homography_decomp_by_visible_refpoints Filters homography decompositions based on additional information. filter_homography_decomp_by_visible_refpoints_def Filters homography decompositions based on additional information. find_essential_mat Calculates an essential matrix from the corresponding points in two images. find_essential_mat_1 Calculates an essential matrix from the corresponding points in two images. find_essential_mat_2 Calculates an essential matrix from the corresponding points in two images from potentially two different cameras. find_essential_mat_3 find_essential_mat_1_def Calculates an essential matrix from the corresponding points in two images. find_essential_mat_2_def Calculates an essential matrix from the corresponding points in two images from potentially two different cameras. find_essential_mat_def Calculates an essential matrix from the corresponding points in two images. find_fundamental_mat @example samples/cpp/snippets/epipolar_lines.cpp
An example using the findFundamentalMat function find_fundamental_mat_1 @example samples/cpp/snippets/epipolar_lines.cpp
An example using the findFundamentalMat function find_fundamental_mat_2 @example samples/cpp/snippets/epipolar_lines.cpp
An example using the findFundamentalMat function find_fundamental_mat_3 find_fundamental_mat_1_def @example samples/cpp/snippets/epipolar_lines.cpp
An example using the findFundamentalMat function find_fundamental_mat_2_def @example samples/cpp/snippets/epipolar_lines.cpp
An example using the findFundamentalMat function find_fundamental_mat_def @example samples/cpp/snippets/epipolar_lines.cpp
An example using the findFundamentalMat function find_homography Finds a perspective transformation between two planes. find_homography_1 Finds a perspective transformation between two planes. find_homography_2 find_homography_1_def Finds a perspective transformation between two planes. find_homography_def Finds a perspective transformation between two planes. fit_ellipse Fits an ellipse around a set of 2D points. fit_ellipse_ams Fits an ellipse around a set of 2D points. fit_ellipse_direct Fits an ellipse around a set of 2D points. fit_line Fits a line to a 2D or 3D point set. get_affine_transform get_affine_transform_slice Calculates an affine transform from three pairs of the corresponding points. get_closest_ellipse_points Compute for each 2d point the nearest 2d point located on a given ellipse. get_default_new_camera_matrix Returns the default new camera matrix. get_default_new_camera_matrix_def Returns the default new camera matrix. get_optimal_new_camera_matrix Returns the new camera intrinsic matrix based on the free scaling parameter. get_optimal_new_camera_matrix_def Returns the new camera intrinsic matrix based on the free scaling parameter. get_perspective_transform Calculates a perspective transform from four pairs of the corresponding points. get_perspective_transform_def Calculates a perspective transform from four pairs of the corresponding points. get_perspective_transform_slice Calculates a perspective transform from four pairs of the corresponding points. get_perspective_transform_slice_def Calculates a perspective transform from four pairs of the corresponding points. get_rotation_matrix_2d Calculates an affine matrix of 2D rotation. get_rotation_matrix_2d_matx See also get_undistort_rectangles Returns the inscribed and bounding rectangles for the “undisorted” image plane. hu_moments Calculates seven Hu invariants. hu_moments_1 Calculates seven Hu invariants. intersect_convex_convex Finds intersection of two convex polygons intersect_convex_convex_def Finds intersection of two convex polygons invert_affine_transform Inverts an affine transformation. is_contour_convex Tests a contour convexity. mat_mul_deriv Computes partial derivatives of the matrix product for each multiplied matrix. match_shapes Compares two shapes. min_area_rect Finds a rotated rectangle of the minimum area enclosing the input 2D point set. min_enclosing_circle Finds a circle of the minimum area enclosing a 2D point set. min_enclosing_convex_polygon Finds a convex polygon of minimum area enclosing a 2D point set and returns its area. min_enclosing_triangle Finds a triangle of minimum area enclosing a 2D point set and returns its area. moments Calculates all of the moments up to the third order of a polygon or rasterized shape. moments_def Calculates all of the moments up to the third order of a polygon or rasterized shape. normal_estimate Estimate the normal and curvature of each point in point cloud from NN results. normal_estimate_def Estimate the normal and curvature of each point in point cloud from NN results. point_polygon_test Performs a point-in-contour test. project_points Projects 3D points to an image plane. project_points_1 Projects points using fisheye model project_points_2 Projects points using fisheye model project_points_1_def Projects points using fisheye model project_points_2_def Projects points using fisheye model project_points_def Projects 3D points to an image plane. project_points_sep_j Projects 3D points to an image plane. project_points_sep_j_def Projects 3D points to an image plane. random_sampling Point cloud sampling by randomly select points. random_sampling_1 Point cloud sampling by randomly select points. random_sampling_1_def Point cloud sampling by randomly select points. random_sampling_def Point cloud sampling by randomly select points. recover_pose Recovers the relative camera rotation and the translation from corresponding points in two images from two different cameras, using chirality check. Returns the number of
inliers that pass the check. recover_pose_1 Recovers the relative camera rotation and the translation from an estimated essential
matrix and the corresponding points in two images, using chirality check. Returns the number of
inliers that pass the check. recover_pose_2 Recovers the relative camera rotation and the translation from an estimated essential
matrix and the corresponding points in two images, using chirality check. Returns the number of
inliers that pass the check. recover_pose_3 Recovers the relative camera rotation and the translation from an estimated essential
matrix and the corresponding points in two images, using chirality check. Returns the number of
inliers that pass the check. recover_pose_1_def Recovers the relative camera rotation and the translation from an estimated essential
matrix and the corresponding points in two images, using chirality check. Returns the number of
inliers that pass the check. recover_pose_2_def Recovers the relative camera rotation and the translation from an estimated essential
matrix and the corresponding points in two images, using chirality check. Returns the number of
inliers that pass the check. recover_pose_3_def Recovers the relative camera rotation and the translation from an estimated essential
matrix and the corresponding points in two images, using chirality check. Returns the number of
inliers that pass the check. recover_pose_def Recovers the relative camera rotation and the translation from corresponding points in two images from two different cameras, using chirality check. Returns the number of
inliers that pass the check. rodrigues Converts a rotation matrix to a rotation vector or vice versa. rodrigues_def Converts a rotation matrix to a rotation vector or vice versa. rotated_rectangle_intersection Finds out if there is any intersection between two rotated rectangles. rq_decomp3x3 Computes an RQ decomposition of 3x3 matrices. rq_decomp3x3_def Computes an RQ decomposition of 3x3 matrices. sampson_distance Calculates the Sampson Distance between two points. solve_p3p Finds an object pose inline formula from 3 3D-2D point correspondences. solve_pnp Finds an object pose inline formula from 3D-2D point correspondences: solve_pnp_1 Finds an object pose from 3D-2D point correspondences for fisheye camera model. solve_pnp_1_def Finds an object pose from 3D-2D point correspondences for fisheye camera model. solve_pnp_def Finds an object pose inline formula from 3D-2D point correspondences: solve_pnp_generic Finds an object pose inline formula from 3D-2D point correspondences. solve_pnp_generic_def Finds an object pose inline formula from 3D-2D point correspondences. solve_pnp_ransac Finds an object pose inline formula from 3D-2D point correspondences using the RANSAC scheme to deal with bad matches. solve_pnp_ransac_1 C++ default parameters solve_pnp_ransac_2 Finds an object pose from 3D-2D point correspondences using the RANSAC scheme for fisheye camera moodel. solve_pnp_ransac_1_def Note solve_pnp_ransac_2_def Finds an object pose from 3D-2D point correspondences using the RANSAC scheme for fisheye camera moodel. solve_pnp_ransac_def Finds an object pose inline formula from 3D-2D point correspondences using the RANSAC scheme to deal with bad matches. solve_pnp_refine_lm Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame
to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution. solve_pnp_refine_lm_def Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame
to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution. solve_pnp_refine_vvs Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame
to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution. solve_pnp_refine_vvs_def Refine a pose (the translation and the rotation that transform a 3D point expressed in the object coordinate frame
to the camera coordinate frame) from a 3D-2D point correspondences and starting from an initial solution. triangulate_points This function reconstructs 3-dimensional points (in homogeneous coordinates) by using
their observations with a stereo camera. undistort_image_points Compute undistorted image points position undistort_image_points_def Compute undistorted image points position undistort_points Computes the ideal point coordinates from the observed point coordinates. undistort_points_1 Undistorts 2D points using fisheye camera model undistort_points_1_def Undistorts 2D points using fisheye camera model undistort_points_def Computes the ideal point coordinates from the observed point coordinates. voxel_grid_sampling Point cloud sampling by Voxel Grid filter downsampling.