Ocean
|
This class implements functions determining point correspondences or validates their accuracy. More...
Data Structures | |
class | Correspondence |
This class defines a correspondence object holding at most one correspondence candidate. More... | |
class | RedundantCorrespondence |
This class extends the correspondence object to allow at most two correspondence candidates. More... | |
Public Types | |
typedef std::vector< Correspondence > | Correspondences |
Definition of a vector holding correspondence objects. More... | |
typedef std::vector< RedundantCorrespondence > | RedundantCorrespondences |
Definition of a vector holding redundant correspondence sets. More... | |
Static Public Member Functions | |
static unsigned int | determineValidCorrespondences (const HomogenousMatrix4 &extrinsic, const PinholeCamera &pinholeCamera, const Geometry::ObjectPoint *objectPoints, const Geometry::ImagePoint *imagePoints, const size_t correspondences, const bool distortImagePoints, const Scalar sqrPixelError=Scalar(1.5 *1.5), Indices32 *validCorrespondences=nullptr) |
Determines valid correspondences for a set of given object and corresponding image points combined with an extrinsic and intrinsic camera matrix. More... | |
static unsigned int | determineValidCorrespondencesIF (const HomogenousMatrix4 &invertedFlippedExtrinsic, const PinholeCamera &pinholeCamera, const Geometry::ObjectPoint *objectPoints, const Geometry::ImagePoint *imagePoints, const size_t correspondences, const bool distortImagePoints, const Scalar sqrPixelError=Scalar(1.5 *1.5), Indices32 *validCorrespondences=nullptr) |
Determines valid correspondences for a set of given object and corresponding image points combined with an extrinsic and intrinsic camera matrix. More... | |
static void | removeInvalidCorrespondences (const HomogenousMatrix4 &extrinsic, const PinholeCamera &pinholeCamera, Geometry::ObjectPoints &objectPoints, Geometry::ImagePoints &imagePoints, const bool distortImagePoints, const Scalar sqrPixelError=Scalar(1.5 *1.5)) |
Determines valid correspondences in a set of given object and corresponding image points. More... | |
static void | removeInvalidCorrespondencesIF (const HomogenousMatrix4 &invertedFlippedExtrinsic, const PinholeCamera &pinholeCamera, Geometry::ObjectPoints &objectPoints, Geometry::ImagePoints &imagePoints, const bool distortImagePoints, const Scalar sqrPixelError=Scalar(1.5 *1.5)) |
Determines valid correspondences in a set of given object and corresponding image points. More... | |
static RedundantCorrespondences | determineNearestCandidates (const Geometry::ImagePoint *imagePoints, const size_t numberImagePoints, const Geometry::ImagePoint *candidatePoints, const size_t numberCandidatePoints, const Scalar searchWindowRadius, Indices32 *candidateUseCounter=nullptr) |
Determines the nearest candidates for all given image points from an extra set of candidate image points. More... | |
static RedundantCorrespondences | determineNearestCandidates (const Geometry::ImagePoint *imagePoints, const size_t numberImagePoints, const Geometry::ImagePoint *candidatePoints, const size_t numberCandidatePoints, const unsigned int width, const unsigned int height, const Scalar searchWindowRadius, Indices32 *candidateUseCounter=nullptr) |
Determines the nearest candidates for all given image points from an extra set of candidate image points. More... | |
static RedundantCorrespondences | determineNearestCandidates (const HomogenousMatrix4 &extrinsic, const PinholeCamera &pinholeCamera, const Geometry::ImagePoint *imagePoints, const size_t numberImagePoints, const Geometry::ObjectPoint *candidatePoints, const size_t numberCandidatePoints, const bool distortImagePoints, const Scalar searchWindowRadius, Indices32 *candidateUseCounter=nullptr) |
Determines the nearest candidates for all given image points from a set of candidate projected object points (or simply a second set of image points). More... | |
static RedundantCorrespondences | determineNearestCandidatesIF (const HomogenousMatrix4 &invertedFlippedExtrinsic, const PinholeCamera &pinholeCamera, const Geometry::ImagePoint *imagePoints, const size_t numberImagePoints, const Geometry::ObjectPoint *candidatePoints, const size_t numberCandidatePoints, const bool distortImagePoints, const Scalar searchWindowRadius, Indices32 *candidateUseCounter=nullptr) |
Determines the nearest candidates for all given image points from a set of candidate object points. More... | |
static RedundantCorrespondences | determineNearestCandidates (const Geometry::ImagePoint *imagePoints, const size_t numberImagePoints, const Geometry::ImagePoint *candidatePoints, const size_t numberCandidatePoints, const Scalar searchWindowRadius, const Geometry::SpatialDistribution::DistributionArray &distributionCandidatePoints, Indices32 *candidateUseCounter=nullptr) |
Determines the nearest candidates for all given image points from a set of candidate image points. More... | |
static RedundantCorrespondences | determineNearestCandidates (const Geometry::ImagePoint *imagePoints, const size_t numberImagePoints, const Geometry::ImagePoint *candidatePoints, const Line2 *candidateLines, const size_t numberCandidatePoints, const unsigned int width, const unsigned int height, const Scalar searchWindowRadius, const Scalar maximalLineSqrDistance, Indices32 *candidateUseCounter=nullptr) |
Determines the nearest candidates for all given image points from a set of candidate image points. More... | |
static RedundantCorrespondences | determineNearestCandidates (const Geometry::ImagePoint *imagePoints, const size_t numberImagePoints, const Geometry::ImagePoint *candidatePoints, const Line2 *candidateLines, const size_t numberCandidatePoints, const Scalar searchWindowRadius, const Scalar maximalLineSqrDistance, const Geometry::SpatialDistribution::DistributionArray &distributionCandidatePoints, Indices32 *candidateUseCounter=nullptr) |
Determines the nearest candidates for all given image points from a set of candidate image points. More... | |
static Indices32 | filterValidCorrespondences (const Vector2 *firstPoints, const Vector2 *secondPoints, const size_t numberPoints, const Scalar thresholdFactor) |
Finds the valid correspondences of a set of given 2D point correspondences according to the median distance of the entire set. More... | |
static Indices32 | filterValidCorrespondences (const Vectors2 &firstPoints, const Vectors2 &secondPoints, const Indices32 &subsetIndices, const Scalar thresholdFactor) |
Finds the valid correspondences of a set of given 2D point correspondences according to the median distance of a subset of the entire set. More... | |
This class implements functions determining point correspondences or validates their accuracy.
typedef std::vector<Correspondence> Ocean::Tracking::PointCorrespondences::Correspondences |
Definition of a vector holding correspondence objects.
typedef std::vector<RedundantCorrespondence> Ocean::Tracking::PointCorrespondences::RedundantCorrespondences |
Definition of a vector holding redundant correspondence sets.
|
static |
Determines the nearest candidates for all given image points from a set of candidate image points.
The spatial distribution of the candidate points must be provided explicitly.
Further, for each candidate point a given 2D line is provided that predicts the position of a corresponding image points (they must lie on these lines).
imagePoints | Image points to find the candidates for |
numberImagePoints | Number of image points |
candidatePoints | Candidate points from those the nearest correspondences has to be found |
candidateLines | Lines for each candidate point shrinking the search space to an almost 1D problem |
numberCandidatePoints | Number of given candidate points |
searchWindowRadius | Size of the search window (as 'radius') to accept a candidate, with range (0, infinity) |
maximalLineSqrDistance | Maximal square distance between point and candidate line |
distributionCandidatePoints | Distribution of the candidate points (may contain more points as defined by the number of candidate points) |
candidateUseCounter | Optional used-counter of the candidate points |
|
static |
Determines the nearest candidates for all given image points from a set of candidate image points.
This function first distributes all candidate points into an array to speed up the search process.
Further, for each candidate point a given 2D line is provided that predicts the position of a corresponding image points (they must lie on these lines).
imagePoints | Image points to find the candidates for |
numberImagePoints | Number of image points |
candidatePoints | Candidate points from those the nearest correspondences has to be found |
candidateLines | Lines for each candidate point shrinking the search space to an almost 1D problem |
numberCandidatePoints | Number of given candidate points |
width | The width of the image area in pixel |
height | The height of the image area in pixel |
searchWindowRadius | Size of the search window (as 'radius') to accept a candidate, with range (0, infinity) |
maximalLineSqrDistance | Maximal square distance between point and candidate line |
candidateUseCounter | Optional used counter of the candidate points |
|
static |
Determines the nearest candidates for all given image points from a set of candidate image points.
The spatial distribution of the candidate points must be provided explicitly.
imagePoints | Image points to find the candidates for |
numberImagePoints | Number of image points |
candidatePoints | Candidate points to found the nearest correspondences from |
numberCandidatePoints | Number of given candidate points |
searchWindowRadius | Size of the search window (as 'radius') to accept a candidate, with range (0, infinity) |
distributionCandidatePoints | Distribution of the candidate points (may contain more points as defined by the number of candidate points) |
candidateUseCounter | Optional used-counter of the candidate points |
|
static |
Determines the nearest candidates for all given image points from an extra set of candidate image points.
imagePoints | Image points to find the candidates for |
numberImagePoints | Number of image points |
candidatePoints | Candidate points to found the nearest correspondences from |
numberCandidatePoints | Number of given candidate points |
searchWindowRadius | Size of the search window (as 'radius') to accept a candidate, with range (0, infinity) |
candidateUseCounter | Optional used-counter of the candidate points |
|
static |
Determines the nearest candidates for all given image points from an extra set of candidate image points.
This function first distributes all candidate points into an array to speed up the search process.
imagePoints | Image points to find the candidates for |
numberImagePoints | Number of image points |
candidatePoints | Candidate points to found the nearest correspondences from |
numberCandidatePoints | Number of given candidate points |
width | The width of the image area in pixel |
height | The height of the image area in pixel |
searchWindowRadius | Size of the search window (as 'radius') to accept a candidate, with range (0, infinity) |
candidateUseCounter | Optional used-counter of the candidate points |
|
inlinestatic |
Determines the nearest candidates for all given image points from a set of candidate projected object points (or simply a second set of image points).
All object points will be projected into the image plane to find the neighbors for the image points.
extrinsic | Extrinsic camera matrix |
pinholeCamera | The pinhole camera specifying the internal camera parameters and optionally distortion |
imagePoints | Image points to find the candidates for |
numberImagePoints | Number of image points |
candidatePoints | Candidate points to found the nearest correspondences from |
numberCandidatePoints | Number of given candidate points |
distortImagePoints | True, to force the distortion of the image points using the distortion parameters of this camera object |
searchWindowRadius | Size of the search window (as 'radius') to accept a candidate, with range (0, infinity) |
candidateUseCounter | Optional used-counter of the candidate points |
|
static |
Determines the nearest candidates for all given image points from a set of candidate object points.
All object points will be projected into the image plane to find the neighbors for the image points.
invertedFlippedExtrinsic | Inverted and flipped extrinsic camera matrix |
pinholeCamera | The pinhole camera specifying the internal camera parameters and optionally distortion |
imagePoints | Image points to find the candidates for |
numberImagePoints | Number of image points |
candidatePoints | Candidate points to found the nearest correspondences from |
numberCandidatePoints | Number of given candidate points |
distortImagePoints | True, to force the distortion of the image points using the distortion parameters of this camera object |
searchWindowRadius | Size of the search window (as 'radius') to accept a candidate, with range (0, infinity) |
candidateUseCounter | Optional used-counter of the candidate points |
|
inlinestatic |
Determines valid correspondences for a set of given object and corresponding image points combined with an extrinsic and intrinsic camera matrix.
extrinsic | Extrinsic camera matrix |
pinholeCamera | The pinhole camera specifying the internal camera parameters and optionally distortion |
objectPoints | 3D Object points corresponding to the given pose |
imagePoints | 2D Image points corresponding to the image points |
correspondences | Number of point correspondences to be used |
distortImagePoints | True, to force the distortion of the image points using the distortion parameters of this camera object |
sqrPixelError | Maximal allowed squared pixel error for a correspondence to count as valid |
validCorrespondences | Optional resulting valid correspondence indices |
|
static |
Determines valid correspondences for a set of given object and corresponding image points combined with an extrinsic and intrinsic camera matrix.
invertedFlippedExtrinsic | Inverted and flipped extrinsic camera matrix |
pinholeCamera | The pinhole camera specifying the internal camera parameters and optionally distortion |
objectPoints | 3D Object points corresponding to the given pose |
imagePoints | 2D Image points corresponding to the image points |
correspondences | Number of point correspondences to be used |
distortImagePoints | True, to force the distortion of the image points using the distortion parameters of this camera object |
sqrPixelError | Maximal allowed squared pixel error for a correspondence to count as valid |
validCorrespondences | Optional resulting valid correspondence indices |
|
static |
Finds the valid correspondences of a set of given 2D point correspondences according to the median distance of the entire set.
firstPoints | Points of the first set |
secondPoints | Points of the second set, each point corresponds to one in the first set (with same index) |
numberPoints | Number of provided points in each set |
thresholdFactor | Factor that is applied to the median distance to filter valid correspondences |
|
static |
Finds the valid correspondences of a set of given 2D point correspondences according to the median distance of a subset of the entire set.
This function needs a set of indices determining the subset of the given points that are investigated.
firstPoints | Points of the first set |
secondPoints | Points of the second set, each point corresponds to one in the first set (with same index) |
subsetIndices | Subset of the given two point sets that are investigated for correspondence determination |
thresholdFactor | Factor that is applied to the median distance to filter valid correspondences |
|
inlinestatic |
Determines valid correspondences in a set of given object and corresponding image points.
Invalid correspondences will be removed from the given point set. Thus, this function detects outliers.
extrinsic | Extrinsic camera matrix |
pinholeCamera | The pinhole camera specifying the internal camera parameters and optionally distortion |
objectPoints | 3D Object points corresponding to the given pose, each 3D point matches to a 2D point with the same index |
imagePoints | 2D Image points corresponding to the image points, each 2D point matches to a 3D point with the same index |
distortImagePoints | True, to force the distortion of the image points using the distortion parameters of this camera object |
sqrPixelError | Maximal allowed squared pixel error for a correspondence to count as valid |
|
static |
Determines valid correspondences in a set of given object and corresponding image points.
Invalid correspondences will be removed from the given point set. Thus, this function detects outliers.
invertedFlippedExtrinsic | Inverted and flipped extrinsic camera matrix |
pinholeCamera | The pinhole camera specifying the internal camera parameters and optionally distortion |
objectPoints | 3D Object points corresponding to the given pose, each 3D point matches to a 2D point with the same index |
imagePoints | 2D Image points corresponding to the image points, each 2D point matches to a 3D point with the same index |
distortImagePoints | True, to force the distortion of the image points using the distortion parameters of this camera object |
sqrPixelError | Maximal allowed squared pixel error for a correspondence to count as valid |