From 38b6c44b4c78077e5a96b1f159db26693197d649 Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 1 Jun 2022 00:51:55 +0100 Subject: [PATCH 1/2] for then given -> for the given --- modules/calib3d/include/opencv2/calib3d.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/calib3d/include/opencv2/calib3d.hpp b/modules/calib3d/include/opencv2/calib3d.hpp index 63eded027f..da27f50869 100644 --- a/modules/calib3d/include/opencv2/calib3d.hpp +++ b/modules/calib3d/include/opencv2/calib3d.hpp @@ -2117,7 +2117,7 @@ described below. therefore is only known up to scale, i.e. t is the direction of the translation vector and has unit length. @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks -inliers in points1 and points2 for then given essential matrix E. Only these inliers will be used to +inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to recover pose. In the output mask only inliers which pass the cheirality check. This function decomposes an essential matrix using @ref decomposeEssentialMat and then verifies @@ -2168,7 +2168,7 @@ length. are feature points from cameras with same focal length and principal point. @param pp principal point of the camera. @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks -inliers in points1 and points2 for then given essential matrix E. Only these inliers will be used to +inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to recover pose. In the output mask only inliers which pass the cheirality check. This function differs from the one above that it computes camera intrinsic matrix from focal length and @@ -2204,7 +2204,7 @@ length. @param distanceThresh threshold distance which is used to filter out far away points (i.e. infinite points). @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks -inliers in points1 and points2 for then given essential matrix E. Only these inliers will be used to +inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to recover pose. In the output mask only inliers which pass the cheirality check. @param triangulatedPoints 3D points which were reconstructed by triangulation. From f28e191d709a7483859d21084ab5708348e9da1c Mon Sep 17 00:00:00 2001 From: Ed J Date: Wed, 1 Jun 2022 00:53:33 +0100 Subject: [PATCH 2/2] cheirality -> chirality --- modules/calib3d/include/opencv2/calib3d.hpp | 12 ++++++------ modules/calib3d/src/five-point.cpp | 2 +- modules/calib3d/src/sqpnp.hpp | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/calib3d/include/opencv2/calib3d.hpp b/modules/calib3d/include/opencv2/calib3d.hpp index da27f50869..c2d23e92f3 100644 --- a/modules/calib3d/include/opencv2/calib3d.hpp +++ b/modules/calib3d/include/opencv2/calib3d.hpp @@ -2099,7 +2099,7 @@ unit length. CV_EXPORTS_W void decomposeEssentialMat( InputArray E, OutputArray R1, OutputArray R2, OutputArray t ); /** @brief Recovers the relative camera rotation and the translation from an estimated essential -matrix and the corresponding points in two images, using cheirality check. Returns the number of +matrix and the corresponding points in two images, using chirality check. Returns the number of inliers that pass the check. @param E The input essential matrix. @@ -2118,10 +2118,10 @@ therefore is only known up to scale, i.e. t is the direction of the translation length. @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to -recover pose. In the output mask only inliers which pass the cheirality check. +recover pose. In the output mask only inliers which pass the chirality check. This function decomposes an essential matrix using @ref decomposeEssentialMat and then verifies -possible pose hypotheses by doing cheirality check. The cheirality check means that the +possible pose hypotheses by doing chirality check. The chirality check means that the triangulated 3D points should have positive depth. Some details can be found in @cite Nister03. This function can be used to process the output E and mask from @ref findEssentialMat. In this @@ -2169,7 +2169,7 @@ are feature points from cameras with same focal length and principal point. @param pp principal point of the camera. @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to -recover pose. In the output mask only inliers which pass the cheirality check. +recover pose. In the output mask only inliers which pass the chirality check. This function differs from the one above that it computes camera intrinsic matrix from focal length and principal point: @@ -2205,11 +2205,11 @@ length. points). @param mask Input/output mask for inliers in points1 and points2. If it is not empty, then it marks inliers in points1 and points2 for the given essential matrix E. Only these inliers will be used to -recover pose. In the output mask only inliers which pass the cheirality check. +recover pose. In the output mask only inliers which pass the chirality check. @param triangulatedPoints 3D points which were reconstructed by triangulation. This function differs from the one above that it outputs the triangulated 3D point that are used for -the cheirality check. +the chirality check. */ CV_EXPORTS_W int recoverPose( InputArray E, InputArray points1, InputArray points2, InputArray cameraMatrix, OutputArray R, OutputArray t, double distanceThresh, InputOutputArray mask = noArray(), diff --git a/modules/calib3d/src/five-point.cpp b/modules/calib3d/src/five-point.cpp index dbdd294c7e..f78fab0b97 100644 --- a/modules/calib3d/src/five-point.cpp +++ b/modules/calib3d/src/five-point.cpp @@ -520,7 +520,7 @@ int cv::recoverPose( InputArray E, InputArray _points1, InputArray _points2, P3(Range::all(), Range(0, 3)) = R1 * 1.0; P3.col(3) = -t * 1.0; P4(Range::all(), Range(0, 3)) = R2 * 1.0; P4.col(3) = -t * 1.0; - // Do the cheirality check. + // Do the chirality check. // Notice here a threshold dist is used to filter // out far away points (i.e. infinite points) since // their depth may vary between positive and negative. diff --git a/modules/calib3d/src/sqpnp.hpp b/modules/calib3d/src/sqpnp.hpp index 97c10e34e7..66c478f371 100644 --- a/modules/calib3d/src/sqpnp.hpp +++ b/modules/calib3d/src/sqpnp.hpp @@ -111,7 +111,7 @@ private: static double det3x3(const cv::Matx& e); /* - * @brief Tests the cheirality for a given solution. + * @brief Tests the chirality for a given solution. * @param solution The solution to evaluate. */ inline bool positiveDepth(const SQPSolution& solution) const;