| OpenCV 5.0.0alpha Open Source Computer Vision

Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions
3d.hpp File Reference
`#include "opencv2/core.hpp"`
`#include "opencv2/core/utils/logger.hpp"`
`#include "opencv2/3d/depth.hpp"`
`#include "opencv2/3d/odometry.hpp"`
`#include "opencv2/3d/odometry_frame.hpp"`
`#include "opencv2/3d/odometry_settings.hpp"`
`#include "opencv2/3d/volume.hpp"`
`#include "opencv2/3d/ptcloud.hpp"`
Include dependency graph for 3d.hpp:
This graph shows which files directly or indirectly include this file:

## Classes
class | cv::LevMarq
| Levenberg-Marquadt solver. More...
class | cv::Octree
| Octree for 3D vision. More...
struct | cv::LevMarq::Report
| Optimization report. More...
struct | cv::LevMarq::Settings
| Structure to keep LevMarq settings. More...
struct | cv::TriangleRasterizeSettings
| Structure to keep settings for rasterization. More...
struct | cv::UsacParams

## Namespaces
namespace | cv
namespace | cv::fisheye
| The methods in this namespace use a so-called fisheye camera model.

## Enumerations
enum | { cv::LMEDS = 4 , cv::RANSAC = 8 , cv::RHO = 16 , cv::USAC_DEFAULT = 32 , cv::USAC_PARALLEL = 33 , cv::USAC_FM_8PTS = 34 , cv::USAC_FAST = 35 , cv::USAC_ACCURATE = 36 , cv::USAC_PROSAC = 37 , cv::USAC_MAGSAC = 38 }
| type of the robust estimation algorithm More...
enum | { cv::FM_7POINT = 1 , cv::FM_8POINT = 2 , cv::FM_LMEDS = 4 , cv::FM_RANSAC = 8 }
| the algorithm for finding fundamental matrix More...
enum | cv::LocalOptimMethod { cv::LOCAL_OPTIM_NULL =0 , cv::LOCAL_OPTIM_INNER_LO =1 , cv::LOCAL_OPTIM_INNER_AND_ITER_LO =2 , cv::LOCAL_OPTIM_GC =3 , cv::LOCAL_OPTIM_SIGMA =4 }
enum class | cv::MatrixType { cv::MatrixType::AUTO = 0 , cv::MatrixType::DENSE = 1 , cv::MatrixType::SPARSE = 2 }
| Type of matrix used in LevMarq solver. More...
enum | cv::NeighborSearchMethod { cv::NEIGH_FLANN_KNN =0 , cv::NEIGH_GRID =1 , cv::NEIGH_FLANN_RADIUS =2 }
enum | cv::PolishingMethod { cv::NONE_POLISHER =0 , cv::LSQ_POLISHER =1 , cv::MAGSAC =2 , cv::COV_POLISHER =3 }
enum | cv::SamplingMethod { cv::SAMPLING_UNIFORM =0 , cv::SAMPLING_PROGRESSIVE_NAPSAC =1 , cv::SAMPLING_NAPSAC =2 , cv::SAMPLING_PROSAC =3 }
enum | cv::ScoreMethod { cv::SCORE_METHOD_RANSAC =0 , cv::SCORE_METHOD_MSAC =1 , cv::SCORE_METHOD_MAGSAC =2 , cv::SCORE_METHOD_LMEDS =3 }
enum | cv::SolvePnPMethod { cv::SOLVEPNP_ITERATIVE = 0 , cv::SOLVEPNP_EPNP = 1 , cv::SOLVEPNP_P3P = 2 , cv::SOLVEPNP_DLS = 3 , cv::SOLVEPNP_UPNP = 4 , cv::SOLVEPNP_AP3P = 5 , cv::SOLVEPNP_IPPE = 6 , cv::SOLVEPNP_IPPE_SQUARE = 7 , cv::SOLVEPNP_SQPNP = 8 }
enum | cv::TriangleCullingMode { cv::RASTERIZE_CULLING_NONE = 0 , cv::RASTERIZE_CULLING_CW = 1 , cv::RASTERIZE_CULLING_CCW = 2 }
| Face culling settings: what faces are drawn after face culling. More...
enum | cv::TriangleGlCompatibleMode { cv::RASTERIZE_COMPAT_DISABLED = 0 , cv::RASTERIZE_COMPAT_INVDEPTH = 1 }
| GL compatibility settings. More...
enum | cv::TriangleShadingType { cv::RASTERIZE_SHADING_WHITE = 0 , cv::RASTERIZE_SHADING_FLAT = 1 , cv::RASTERIZE_SHADING_SHADED = 2 }
| Triangle fill settings. More...
enum | cv::UndistortTypes { cv::PROJ_SPHERICAL_ORTHO = 0 , cv::PROJ_SPHERICAL_EQRECT = 1 }
| cv::undistort mode More...
enum class | cv::VariableType { cv::VariableType::LINEAR = 0 , cv::VariableType::SO3 = 1 , cv::VariableType::SE3 = 2 }
| Type of variables used in LevMarq solver. More...

## Functions
void | cv::composeRT (InputArray rvec1, InputArray tvec1, InputArray rvec2, InputArray tvec2, OutputArray rvec3, OutputArray tvec3, OutputArray dr3dr1=noArray(), OutputArray dr3dt1=noArray(), OutputArray dr3dr2=noArray(), OutputArray dr3dt2=noArray(), OutputArray dt3dr1=noArray(), OutputArray dt3dt1=noArray(), OutputArray dt3dr2=noArray(), OutputArray dt3dt2=noArray())
| Combines two rotation-and-shift transformations.
void | cv::computeCorrespondEpilines (InputArray points, int whichImage, InputArray F, OutputArray lines)
| For points in an image of a stereo pair, computes the corresponding epilines in the other image.
void | cv::convertPointsFromHomogeneous (InputArray src, OutputArray dst, int dtype=-1)
| Converts points from homogeneous to Euclidean space.
void | cv::convertPointsHomogeneous (InputArray src, OutputArray dst)
| Converts points to/from homogeneous coordinates.
void | cv::convertPointsToHomogeneous (InputArray src, OutputArray dst, int dtype=-1)
| Converts points from Euclidean to homogeneous space.
void | cv::correctMatches (InputArray F, InputArray points1, InputArray points2, OutputArray newPoints1, OutputArray newPoints2)
| Refines coordinates of corresponding points.
void | cv::decomposeEssentialMat (InputArray E, OutputArray R1, OutputArray R2, OutputArray t)
| Decompose an essential matrix to possible rotations and translation.
int | cv::decomposeHomographyMat (InputArray H, InputArray K, OutputArrayOfArrays rotations, OutputArrayOfArrays translations, OutputArrayOfArrays normals)
| Decompose a homography matrix to rotation(s), translation(s) and plane normal(s).
void | cv::decomposeProjectionMatrix (InputArray projMatrix, OutputArray cameraMatrix, OutputArray rotMatrix, OutputArray transVect, OutputArray rotMatrixX=noArray(), OutputArray rotMatrixY=noArray(), OutputArray rotMatrixZ=noArray(), OutputArray eulerAngles=noArray())
| Decomposes a projection matrix into a rotation matrix and a camera intrinsic matrix.
void | cv::fisheye::distortPoints (InputArray undistorted, OutputArray distorted, InputArray K, InputArray D, double alpha=0)
| Distorts 2D points using fisheye model.
void | cv::fisheye::distortPoints (InputArray undistorted, OutputArray distorted, InputArray Kundistorted, InputArray K, InputArray D, double alpha=0)
void | cv::drawFrameAxes (InputOutputArray image, InputArray cameraMatrix, InputArray distCoeffs, InputArray rvec, InputArray tvec, float length, int thickness=3)
| Draw axes of the world/object coordinate system from pose estimation.
Mat | cv::estimateAffine2D (InputArray from, InputArray to, OutputArray inliers=noArray(), int method=RANSAC, double ransacReprojThreshold=3, size_t maxIters=2000, double confidence=0.99, size_t refineIters=10)
| Computes an optimal affine transformation between two 2D point sets.
Mat | cv::estimateAffine2D (InputArray pts1, InputArray pts2, OutputArray inliers, const UsacParams &params)
cv::Mat | cv::estimateAffine3D (InputArray src, InputArray dst, double *scale=nullptr, bool force_rotation=true)
| Computes an optimal affine transformation between two 3D point sets.
int | cv::estimateAffine3D (InputArray src, InputArray dst, OutputArray out, OutputArray inliers, double ransacThreshold=3, double confidence=0.99)
| Computes an optimal affine transformation between two 3D point sets.
cv::Mat | cv::estimateAffinePartial2D (InputArray from, InputArray to, OutputArray inliers=noArray(), int method=RANSAC, double ransacReprojThreshold=3, size_t maxIters=2000, double confidence=0.99, size_t refineIters=10)
| Computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets.
void | cv::fisheye::estimateNewCameraMatrixForUndistortRectify (InputArray K, InputArray D, const Size &image_size, InputArray R, OutputArray P, double balance=0.0, const Size &new_size=Size(), double fov_scale=1.0)
| Estimates new camera intrinsic matrix for undistortion or rectification.
int | cv::estimateTranslation3D (InputArray src, InputArray dst, OutputArray out, OutputArray inliers, double ransacThreshold=3, double confidence=0.99)
| Computes an optimal translation between two 3D point sets.
void | cv::filterHomographyDecompByVisibleRefpoints (InputArrayOfArrays rotations, InputArrayOfArrays normals, InputArray beforePoints, InputArray afterPoints, OutputArray possibleSolutions, InputArray pointsMask=noArray())
| Filters homography decompositions based on additional information.
Mat | cv::findEssentialMat (InputArray points1, InputArray points2, double focal=1.0, Point2d pp=Point2d(0, 0), int method=RANSAC, double prob=0.999, double threshold=1.0, int maxIters=1000, OutputArray mask=noArray())
Mat | cv::findEssentialMat (InputArray points1, InputArray points2, InputArray cameraMatrix, int method=RANSAC, double prob=0.999, double threshold=1.0, int maxIters=1000, OutputArray mask=noArray())
| Calculates an essential matrix from the corresponding points in two images.
Mat | cv::findEssentialMat (InputArray points1, InputArray points2, InputArray cameraMatrix1, InputArray cameraMatrix2, InputArray dist_coeff1, InputArray dist_coeff2, OutputArray mask, const UsacParams &params)
Mat | cv::findEssentialMat (InputArray points1, InputArray points2, InputArray cameraMatrix1, InputArray distCoeffs1, InputArray cameraMatrix2, InputArray distCoeffs2, int method=RANSAC, double prob=0.999, double threshold=1.0, OutputArray mask=noArray())
| Calculates an essential matrix from the corresponding points in two images from potentially two different cameras.
Mat | cv::findFundamentalMat (InputArray points1, InputArray points2, int method, double ransacReprojThreshold, double confidence, int maxIters, OutputArray mask=noArray())
| Calculates a fundamental matrix from the corresponding points in two images.
Mat | cv::findFundamentalMat (InputArray points1, InputArray points2, int method=FM_RANSAC, double ransacReprojThreshold=3., double confidence=0.99, OutputArray mask=noArray())
Mat | cv::findFundamentalMat (InputArray points1, InputArray points2, OutputArray mask, const UsacParams &params)
Mat | cv::findFundamentalMat (InputArray points1, InputArray points2, OutputArray mask, int method=FM_RANSAC, double ransacReprojThreshold=3., double confidence=0.99)
Mat | cv::findHomography (InputArray srcPoints, InputArray dstPoints, int method=0, double ransacReprojThreshold=3, OutputArray mask=noArray(), const int maxIters=2000, const double confidence=0.995)
| Finds a perspective transformation between two planes.
Mat | cv::findHomography (InputArray srcPoints, InputArray dstPoints, OutputArray mask, const UsacParams &params)
Mat | cv::findHomography (InputArray srcPoints, InputArray dstPoints, OutputArray mask, int method=0, double ransacReprojThreshold=3)
Mat | cv::getDefaultNewCameraMatrix (InputArray cameraMatrix, Size imgsize=Size(), bool centerPrincipalPoint=false)
| Returns the default new camera matrix.
Mat | cv::getOptimalNewCameraMatrix (InputArray cameraMatrix, InputArray distCoeffs, Size imageSize, double alpha, Size newImgSize=Size(), Rect *validPixROI=0, bool centerPrincipalPoint=false)
| Returns the new camera intrinsic matrix based on the free scaling parameter.
void | cv::getUndistortRectangles (InputArray cameraMatrix, InputArray distCoeffs, InputArray R, InputArray newCameraMatrix, Size imgSize, Rect_< double > &inner, Rect_< double > &outer)
| Returns the inscribed and bounding rectangles for the "undisorted" image plane.
void | cv::initInverseRectificationMap (InputArray cameraMatrix, InputArray distCoeffs, InputArray R, InputArray newCameraMatrix, const Size &size, int m1type, OutputArray map1, OutputArray map2)
| Computes the projection and inverse-rectification transformation map. In essense, this is the inverse of initUndistortRectifyMap to accomodate stereo-rectification of projectors ('inverse-cameras') in projector-camera pairs.
void | cv::fisheye::initUndistortRectifyMap (InputArray K, InputArray D, InputArray R, InputArray P, const cv::Size &size, int m1type, OutputArray map1, OutputArray map2)
| Computes undistortion and rectification maps for image transform by cv::remap(). If D is empty zero distortion is used, if R or P is empty identity matrixes are used.
void | cv::initUndistortRectifyMap (InputArray cameraMatrix, InputArray distCoeffs, InputArray R, InputArray newCameraMatrix, Size size, int m1type, OutputArray map1, OutputArray map2)
| Computes the undistortion and rectification transformation map.
float | cv::initWideAngleProjMap (InputArray cameraMatrix, InputArray distCoeffs, Size imageSize, int destImageWidth, int m1type, OutputArray map1, OutputArray map2, enum UndistortTypes projType=PROJ_SPHERICAL_EQRECT, double alpha=0)
| initializes maps for remap for wide-angle
static float | cv::initWideAngleProjMap (InputArray cameraMatrix, InputArray distCoeffs, Size imageSize, int destImageWidth, int m1type, OutputArray map1, OutputArray map2, int projType, double alpha=0)
void | cv::loadMesh (const String &filename, OutputArray vertices, OutputArrayOfArrays indices, OutputArray normals=noArray(), OutputArray colors=noArray(), OutputArray texCoords=noArray())
| Loads a mesh from a file.
void | cv::loadPointCloud (const String &filename, OutputArray vertices, OutputArray normals=noArray(), OutputArray rgb=noArray())
| Loads a point cloud from a file.
void | cv::matMulDeriv (InputArray A, InputArray B, OutputArray dABdA, OutputArray dABdB)
| Computes partial derivatives of the matrix product for each multiplied matrix.
void | cv::fisheye::projectPoints (InputArray objectPoints, OutputArray imagePoints, const Affine3d &affine, InputArray K, InputArray D, double alpha=0, OutputArray jacobian=noArray())
| Projects points using fisheye model.
void | cv::fisheye::projectPoints (InputArray objectPoints, OutputArray imagePoints, InputArray rvec, InputArray tvec, InputArray K, InputArray D, double alpha=0, OutputArray jacobian=noArray())
void | cv::projectPoints (InputArray objectPoints, InputArray rvec, InputArray tvec, InputArray cameraMatrix, InputArray distCoeffs, OutputArray imagePoints, OutputArray dpdr, OutputArray dpdt, OutputArray dpdf=noArray(), OutputArray dpdc=noArray(), OutputArray dpdk=noArray(), OutputArray dpdo=noArray(), double aspectRatio=0.)
void | cv::projectPoints (InputArray objectPoints, InputArray rvec, InputArray tvec, InputArray cameraMatrix, InputArray distCoeffs, OutputArray imagePoints, OutputArray jacobian=noArray(), double aspectRatio=0)
| Projects 3D points to an image plane.
int | cv::recoverPose (InputArray E, InputArray points1, InputArray points2, InputArray cameraMatrix, OutputArray R, OutputArray t, double distanceThresh, InputOutputArray mask=noArray(), OutputArray triangulatedPoints=noArray())
int | cv::recoverPose (InputArray E, InputArray points1, InputArray points2, InputArray cameraMatrix, OutputArray R, OutputArray t, InputOutputArray mask=noArray())
| 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.
int | cv::recoverPose (InputArray E, InputArray points1, InputArray points2, OutputArray R, OutputArray t, double focal=1.0, Point2d pp=Point2d(0, 0), InputOutputArray mask=noArray())
int | cv::recoverPose (InputArray points1, InputArray points2, InputArray cameraMatrix1, InputArray distCoeffs1, InputArray cameraMatrix2, InputArray distCoeffs2, OutputArray E, OutputArray R, OutputArray t, int method=cv::RANSAC, double prob=0.999, double threshold=1.0, InputOutputArray mask=noArray())
| 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.
void | cv::Rodrigues (InputArray src, OutputArray dst, OutputArray jacobian=noArray())
| Converts a rotation matrix to a rotation vector or vice versa.
Vec3d | cv::RQDecomp3x3 (InputArray src, OutputArray mtxR, OutputArray mtxQ, OutputArray Qx=noArray(), OutputArray Qy=noArray(), OutputArray Qz=noArray())
| Computes an RQ decomposition of 3x3 matrices.
double | cv::sampsonDistance (InputArray pt1, InputArray pt2, InputArray F)
| Calculates the Sampson Distance between two points.
void | cv::saveMesh (const String &filename, InputArray vertices, InputArrayOfArrays indices, InputArray normals=noArray(), InputArray colors=noArray(), InputArray texCoords=noArray())
| Saves a mesh to a specified file.
void | cv::savePointCloud (const String &filename, InputArray vertices, InputArray normals=noArray(), InputArray rgb=noArray())
| Saves a point cloud to a specified file.
int | cv::solveP3P (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, int flags)
| Finds an object pose from 3 3D-2D point correspondences.
bool | cv::fisheye::solvePnP (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int flags=SOLVEPNP_ITERATIVE, TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 10, 1e-8))
| Finds an object pose from 3D-2D point correspondences for fisheye camera moodel.
bool | cv::solvePnP (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int flags=SOLVEPNP_ITERATIVE)
| Finds an object pose from 3D-2D point correspondences.
int | cv::solvePnPGeneric (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs, bool useExtrinsicGuess=false, int flags=SOLVEPNP_ITERATIVE, InputArray rvec=noArray(), InputArray tvec=noArray(), OutputArray reprojectionError=noArray())
| Finds an object pose from 3D-2D point correspondences.
bool | cv::solvePnPRansac (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, bool useExtrinsicGuess=false, int iterationsCount=100, float reprojectionError=8.0, double confidence=0.99, OutputArray inliers=noArray(), int flags=SOLVEPNP_ITERATIVE)
| Finds an object pose from 3D-2D point correspondences using the RANSAC scheme.
bool | cv::solvePnPRansac (InputArray objectPoints, InputArray imagePoints, InputOutputArray cameraMatrix, InputArray distCoeffs, OutputArray rvec, OutputArray tvec, OutputArray inliers, const UsacParams &params=UsacParams())
void | cv::solvePnPRefineLM (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec, InputOutputArray tvec, TermCriteria criteria=TermCriteria(TermCriteria::EPS+TermCriteria::COUNT, 20, FLT_EPSILON))
| 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.
void | cv::solvePnPRefineVVS (InputArray objectPoints, InputArray imagePoints, InputArray cameraMatrix, InputArray distCoeffs, InputOutputArray rvec, InputOutputArray tvec, TermCriteria criteria=TermCriteria(TermCriteria::EPS+TermCriteria::COUNT, 20, FLT_EPSILON), double VVSlambda=1)
| 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.
void | cv::triangleRasterize (InputArray vertices, InputArray indices, InputArray colors, InputOutputArray colorBuf, InputOutputArray depthBuf, InputArray world2cam, double fovY, double zNear, double zFar, const TriangleRasterizeSettings &settings=TriangleRasterizeSettings())
| Renders a set of triangles on a depth and color image.
void | cv::triangleRasterizeColor (InputArray vertices, InputArray indices, InputArray colors, InputOutputArray colorBuf, InputArray world2cam, double fovY, double zNear, double zFar, const TriangleRasterizeSettings &settings=TriangleRasterizeSettings())
| Overloaded version of triangleRasterize() with color-only rendering.
void | cv::triangleRasterizeDepth (InputArray vertices, InputArray indices, InputOutputArray depthBuf, InputArray world2cam, double fovY, double zNear, double zFar, const TriangleRasterizeSettings &settings=TriangleRasterizeSettings())
| Overloaded version of triangleRasterize() with depth-only rendering.
void | cv::triangulatePoints (InputArray projMatr1, InputArray projMatr2, InputArray projPoints1, InputArray projPoints2, OutputArray points4D)
| This function reconstructs 3-dimensional points (in homogeneous coordinates) by using their observations with a stereo camera.
void | cv::undistort (InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray newCameraMatrix=noArray())
| Transforms an image to compensate for lens distortion.
void | cv::fisheye::undistortImage (InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray Knew=cv::noArray(), const Size &new_size=Size())
| Transforms an image to compensate for fisheye lens distortion.
void | cv::undistortImagePoints (InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, TermCriteria=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 5, 0.01))
| Compute undistorted image points position.
void | cv::fisheye::undistortPoints (InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray R=noArray(), InputArray P=noArray(), TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER+TermCriteria::EPS, 10, 1e-8))
| Undistorts 2D points using fisheye model.
void | cv::undistortPoints (InputArray src, OutputArray dst, InputArray cameraMatrix, InputArray distCoeffs, InputArray R=noArray(), InputArray P=noArray(), TermCriteria criteria=TermCriteria(TermCriteria::MAX_ITER, 5, 0.01))
| Computes the ideal point coordinates from the observed point coordinates.