|
| template<typename TDescriptor , typename TDistance , TDistance(*)(const TDescriptor &, const TDescriptor &) tDistanceFunction> |
| static CorrespondencePairs | determineCorrespondingDescriptors (const TDescriptor *forwardDescriptors, const size_t numberForwardDescriptors, const TDescriptor *backwardDescriptors, const size_t numberBackwardDescriptors, const TDistance maximalDistance, Worker *worker) |
| | Determines unidirectional correspondences pairs between two sets of descriptors.
|
| |
| template<typename TDescriptor , typename TDistance , TDistance(*)(const TDescriptor &, const TDescriptor &) tDistanceFunction> |
| static CorrespondencePairs | determineCorrespondingFeatures (const AnyCamera &camera, const HomogenousMatrix4 &world_T_camera, const Vector3 *objectPoints, const TDescriptor *objectPointDescriptors, const size_t numberObjectFeatures, const Vector2 *imagePoints, const TDescriptor *imagePointDescriptors, const size_t numberImageFeatures, const TDistance maximalDistance, const Scalar maximalProjectionError) |
| | Determines guided unidirectional correspondence pairs between image features and object features.
|
| |
| template<typename TFirst , typename TSecond > |
| static void | extractCorrespondenceElements (const CorrespondencePairs &correspondencePairs, const TFirst *firstElements, const size_t sizeFirstElements, const TSecond *secondElements, const size_t sizeSecondElements, std::vector< TFirst > &correspondenceFirstElements, std::vector< TSecond > &correspondenceSecondElements) |
| | Extracts corresponding elements based on correspondence pairs.
|
| |
| static size_t | countBijectiveCorrespondences (const Index32 *usedPointIndices, const size_t size) |
| | Counts the number of bijective correspondences based on provided indices of used points (either image points or object points).
|
| |
| static size_t | countNonBijectiveCorrespondences (const Index32 *usedPointIndices, const size_t size) |
| | Counts the number of non-bijective correspondences based on provided indices of used points (either image points or object points).
|
| |
| static void | removeNonBijectiveCorrespondences (const AnyCamera &camera, const HomogenousMatrix4 &world_T_camera, const Vector3 *objectPoints, const Vector2 *imagePoints, Indices32 &objectPointIndices, Indices32 &imagePointIndices, const bool checkImagePoints) |
| | Removes non-bijective correspondences from 2D/3D correspondences.
|
| |
|
| template<typename TDescriptor , typename TDistance , TDistance(*)(const TDescriptor &, const TDescriptor &) tDistanceFunction, unsigned int tLocks> |
| static void | determineCorrespondingDescriptorsSubset (const TDescriptor *forwardDescriptors, const size_t numberForwardDescriptors, const TDescriptor *backwardDescriptors, const size_t numberBackwardDescriptors, const TDistance maximalDistance, Index32 *forwardIndicesForBackwardDescriptors, Lock *locks, const unsigned int subsetFirstForwardDescriptor, const unsigned int subsetNumberForwardDescriptors) |
| | Determines a subset of all unidirectional correspondences pairs between two sets of descriptors.
|
| |
This class provides unidirectional feature correspondences.
| static size_t Ocean::Tracking::UnidirectionalCorrespondences::countBijectiveCorrespondences |
( |
const Index32 * |
usedPointIndices, |
|
|
const size_t |
size |
|
) |
| |
|
static |
Counts the number of bijective correspondences based on provided indices of used points (either image points or object points).
In case a point index shows up more than once, the point is not part of a bijective correspondence.
Provide the indices of used image points in case the correspondence were determine by iterating over all object points and finding the best matching image point, in such a case an image point could be used more than once:
objectPoint0 -> imagePoint0
objectPoint2 -> imagePoint1 the imagePoint1 is not part of a bijective correspondence
objectPoint4 -> imagePoint1
objectPoint7 -> imagePoint5
objectPoint8 -> imagePoint3
Provide the indices of used object points in case the correspondence were determine by iterating over all image points and finding the best matching object point, in such a case an object point could be used more than once:
imagePoint0 -> objectPoint0
imagePoint1 -> objectPoint2 the objectPoint2 is not part of a bijective correspondence
imagePoint2 -> objectPoint2
imagePoint4 -> objectPoint3
- Parameters
-
| usedPointIndices | The indices of the points to be checked, must be valid |
| size | The number of indices, with range [1, infinity) |
- Returns
- The number of bijective correspondences, with range [0, size]
template<typename TDescriptor , typename TDistance , TDistance(*)(const TDescriptor &, const TDescriptor &) tDistanceFunction, unsigned int tLocks>
| void Ocean::Tracking::UnidirectionalCorrespondences::determineCorrespondingDescriptorsSubset |
( |
const TDescriptor * |
forwardDescriptors, |
|
|
const size_t |
numberForwardDescriptors, |
|
|
const TDescriptor * |
backwardDescriptors, |
|
|
const size_t |
numberBackwardDescriptors, |
|
|
const TDistance |
maximalDistance, |
|
|
Index32 * |
forwardIndicesForBackwardDescriptors, |
|
|
Lock * |
locks, |
|
|
const unsigned int |
subsetFirstForwardDescriptor, |
|
|
const unsigned int |
subsetNumberForwardDescriptors |
|
) |
| |
|
staticprotected |
Determines a subset of all unidirectional correspondences pairs between two sets of descriptors.
- Parameters
-
| forwardDescriptors | The first (forward) set of descriptors, must be valid |
| numberForwardDescriptors | The number of descriptors in the first set, with range [1, infinity) |
| backwardDescriptors | The second (backward) set of descriptors, must be valid |
| numberBackwardDescriptors | The number of descriptors in the second set, with range [1, infinity) |
| maximalDistance | The maximal distance between two descriptors to count as match, with range [0, infinity) |
| forwardIndicesForBackwardDescriptors | The individual indices of matching forward descriptors, one for each backward descriptor |
| locks | The 'tLocks' locks elements, must be valid if 'tLocks >= 1' |
| subsetFirstForwardDescriptor | The first forward descriptor to be handled, with range [0, numberForwardDescriptors-1] |
| subsetNumberForwardDescriptors | The number of forward descriptors to be handled, with range [1, numberForwardDescriptors-subsetFirstForwardDescriptor] |
- Returns
- The resulting pairs with unidirectional correspondences
- Template Parameters
-
| TDescriptor | The data type of the descriptors |
| TDistance | The data type of the distance between two descriptors |
| tDistanceFunction | The function returning the distance between two descriptors |
| tLocks | The number of provided lock objects, with range [0, infinity) |
template<typename TDescriptor , typename TDistance , TDistance(*)(const TDescriptor &, const TDescriptor &) tDistanceFunction>
Determines guided unidirectional correspondence pairs between image features and object features.
The resulting matches are guided based on a given rough 6-DOF camera pose.
- Parameters
-
| camera | The camera profile defining the projection, must be valid |
| world_T_camera | The rough 6-DOF pose of the camera, with default camera pointing towards the negative z-space with y-axis upwards |
| objectPoints | The 3D locations of the 3D object features, one for each object feature, must be valid |
| objectPointDescriptors | The descriptors of the 3D object features, one for each object feature, must be valid |
| numberObjectFeatures | The number of 3D object features, with range [1, infinity) |
| imagePoints | The 2D location of the 2D image features, one for each image feature, must be valid |
| imagePointDescriptors | The descriptors of the 2D image features, one for each image feature, must be valid |
| numberImageFeatures | The number of 2D image features, with range [1, infinity) |
| maximalDistance | The maximal distance between two descriptors (an object descriptor and an image descriptor) to count as match, with range [0, infinity) |
| maximalProjectionError | The maximal projection error between image features and projected object features to count as candidate (allows to balance the number of candidates based on the precision of the given camera pose), in pixels, with range [0, infinity) |
- Template Parameters
-
| TDescriptor | The data type of the descriptors |
| TDistance | The data type of the distance between two descriptors |
| tDistanceFunction | The function returning the distance between two descriptors |