Ocean
|
This class implements a database for 3D object points, 2D image points and 6DOF camera poses. More...
Data Structures | |
class | ConstImagePointAccessorIds |
This class implements an accessor object for image points based on a set of image point ids. More... | |
class | ConstImagePointAccessorTopology |
This class implements an accessor object for image points based on a topology between poses and image points. More... | |
class | ConstObjectPointAccessorIds |
This class implements an accessor object for object points based on a set of object point ids. More... | |
class | ConstPoseAccessorIds |
This class implements an accessor object for poses based on a set of pose ids. More... | |
class | ConstPoseAccessorTopology |
This class implements an accessor object for poses based on a topology between poses and image points. More... | |
class | Data |
The base class for all data object storing a set of image point ids. More... | |
class | ImagePointData |
This class implements a data object storing the information connected with an id of an image point. More... | |
class | ImagePointObject |
This class implements an object storing an id of an image point. More... | |
class | ObjectPointData |
The data object encapsulating a 3D object point. More... | |
class | ObjectPointObject |
This class implements an object storing an id of an object point. More... | |
class | PoseData |
The data object encapsulating a 6DOF camera pose. More... | |
class | PoseImagePointPair |
This class stores a pair of pose id and image point id. More... | |
class | PoseObject |
This class implements an object storing an id of an pose object. More... | |
class | TopologyTriple |
This class defines the topology between a camera pose id, an object point id and an image point id. More... | |
Public Types | |
typedef std::map< Index32, Vector2 > | IdPointMap |
Definition of a map mapping ids to 2D image point object. More... | |
typedef std::pair< Index32, Vector2 > | IdPointPair |
Definition of a pair of ids and 2D image points. More... | |
typedef std::vector< IdPointPair > | IdPointPairs |
Definition of a vector holding pairs of ids and 2D image points. More... | |
typedef std::map< Index32, IdPointPairs > | IdIdPointPairsMap |
Definition of a map mapping ids to 2D image point id pairs. More... | |
typedef std::map< Index32, Vectors2 > | ImagePointsMap |
Definition of a map mapping ids to 2D vectors. More... | |
typedef std::vector< Vectors2 > | ImagePointGroups |
Definition of a vector holding 2D vectors. More... | |
typedef std::vector< PoseImagePointPair > | PoseImagePointTopology |
Definition of a vector holding several pairs of pose and image point ids. More... | |
typedef std::vector< std::pair< Index32, PoseImagePointTopology > > | PoseImagePointTopologyGroups |
Definition of a vector holding several groups of pairs of pose and image point ids. More... | |
typedef std::vector< TopologyTriple > | TopologyTriples |
Definition of a vector holding object of topology triple. More... | |
Public Member Functions | |
Database () | |
Creates a new empty database object. More... | |
Database (const Database &database) | |
Copy constructor. More... | |
Database (Database &&database) noexcept | |
Move constructor. More... | |
Lock & | lock () |
Returns a reference to the lock object of this database object. More... | |
template<bool tThreadSafe> | |
bool | isEmpty () const |
Returns whether this database holds at least one image point, one object point or one camera pose. More... | |
template<bool tThreadSafe> | |
size_t | poseNumber () const |
Returns the number of poses of this database. More... | |
template<bool tThreadSafe> | |
size_t | objectPointNumber () const |
Returns the number of object point ids in this database. More... | |
template<bool tThreadSafe> | |
size_t | imagePointNumber () const |
Returns the number of image point ids in this database. More... | |
template<bool tThreadSafe> | |
const Vector2 & | imagePoint (const Index32 imagePointId) const |
Returns the location of an image point which is specified by the id of the image point. More... | |
template<bool tThreadSafe> | |
Vectors2 | imagePoints (const Indices32 &imagePointIds) const |
Returns the positions of 2D image points specified by the ids of the image points. More... | |
template<bool tThreadSafe> | |
Vectors2 | imagePoints (const IndexSet32 &imagePointIds) const |
Returns the positions of 2D image points specified by the ids of the image points. More... | |
template<bool tThreadSafe> | |
bool | hasObservation (const Index32 poseId, const Index32 objectPointId, Vector2 *point=nullptr, Index32 *pointId=nullptr) const |
Returns whether an object point is visible in a specified frame, and optional the location and id of the corresponding image point. More... | |
template<bool tThreadSafe> | |
const Vector3 & | objectPoint (const Index32 objectPointId) const |
Returns the location of an object point which is specified by the id of the object point. More... | |
template<bool tThreadSafe> | |
const Vector3 & | objectPoint (const Index32 objectPointId, Scalar &objectPointPriority) const |
Returns the location and priority of an object point which is specified by the id of the object point. More... | |
template<bool tThreadSafe> | |
Scalar | objectPointPriority (const Index32 objectPointId) const |
Returns the priority of an object point which is specified by the id of the object point. More... | |
template<bool tThreadSafe> | |
Vectors3 | objectPoints () const |
Returns the positions of all 3D object points. More... | |
template<bool tThreadSafe, bool tMatchPosition> | |
Vectors3 | objectPoints (const Vector3 &referencePosition, Indices32 *objectPointIds=nullptr, const Scalar minimalPriority=Scalar(-1)) const |
Returns the positions of all 3D object points that match or that do not match the position of a specified reference object point and which have a specified minimal priority value. More... | |
template<bool tThreadSafe> | |
Vectors3 | objectPoints (const Indices32 &objectPointIds) const |
Returns the positions of 3D object points specified by the ids of the object points. More... | |
template<bool tThreadSafe> | |
const HomogenousMatrix4 & | pose (const Index32 poseId) const |
Returns the 6DOF pose of a camera frame which is specified by the id of the pose. More... | |
template<bool tThreadSafe> | |
HomogenousMatrices4 | poses (const Index32 *poseIds, const size_t size) const |
Returns the 6DOF pose values for all specified pose ids. More... | |
template<bool tThreadSafe> | |
SquareMatrices3 | rotationalPoses (const Index32 *poseIds, const size_t size) const |
Returns the 3DOF rotational part of the 6DOF pose values for all specified pose ids. More... | |
template<bool tThreadSafe, bool tMatchPose> | |
HomogenousMatrices4 | poses (const HomogenousMatrix4 &referencePose, Indices32 *poseIds=nullptr) const |
Returns all 6DOF poses which match a given reference pose or which do not match a given reference pose. More... | |
template<bool tThreadSafe> | |
HomogenousMatrices4 | poses (const Index32 lowerPoseId, const Index32 upperPoseId) const |
Returns all 6DOF poses (valid or invalid) lying between a specified range of pose ids. More... | |
template<bool tThreadSafe, bool tMatchPose> | |
Indices32 | poseIds (const HomogenousMatrix4 &referencePose, HomogenousMatrices4 *poses=nullptr) const |
Returns the ids of specific 6DOF poses. More... | |
template<bool tThreadSafe> | |
bool | poseBorders (Index32 &lowerPoseId, Index32 &upperPoseId) const |
Returns the smallest id (the id of the lower frame border) and the largest id (the id of the upper frame border) of all poses that are known in this database. More... | |
template<bool tThreadSafe> | |
bool | validPoseBorders (Index32 &rangeLowerPoseId, Index32 &rangeUpperPoseId) const |
Returns the smallest id (the id of the lower frame border) and the largest id (the id of the upper frame border) with a valid pose (from all known poses in this database. More... | |
template<bool tThreadSafe> | |
bool | validPoseRange (const Index32 lowerPoseId, const Index32 startPoseId, const Index32 upperPoseId, Index32 &rangeLowerPoseId, Index32 &rangeUpperPoseId) const |
Determines the pose id range (around a specified start frame) for which the database holds valid poses. More... | |
template<bool tThreadSafe> | |
bool | largestValidPoseRange (const Index32 lowerPoseId, const Index32 upperPoseId, Index32 &rangeLowerPoseId, Index32 &rangeUpperPoseId) const |
Determines the largest pose id range for which the database holds valid poses. More... | |
template<bool tThreadSafe, bool tMatchPosition, bool tNeedValidPose> | |
bool | poseWithMostCorrespondences (const Index32 lowerPoseId, const Index32 upperPoseId, Index32 *poseId=nullptr, unsigned int *correspondences=nullptr, const Vector3 &referenceObjectPoint=invalidObjectPoint()) const |
Determines the pose id for which the database holds the most number of point correspondences (between e.g., valid or invalid object points and image points). More... | |
template<bool tThreadSafe, bool tMatchPosition, bool tNeedValidPose> | |
bool | poseWithLeastCorrespondences (const Index32 lowerPoseId, const Index32 upperPoseId, Index32 *poseId=nullptr, unsigned int *correspondences=nullptr, const Vector3 &referenceObjectPoint=invalidObjectPoint()) const |
Determines the pose id for which the database holds the least number of point correspondences (between e.g., valid or invalid object points and image points). More... | |
template<bool tThreadSafe> | |
bool | poseWithMostObservations (const IndexSet32 &poseCandidates, const IndexSet32 &majorObjectPointIds, const IndexSet32 &minorObjectPointIds, Index32 &poseId, Indices32 *visibleMajorObjectPointIds=nullptr, Indices32 *visibleMinorObjectPointIds=nullptr) const |
Determines the pose id from a set of given pose id candidates for which the database holds the most observations from a set of given object point ids. More... | |
template<bool tThreadSafe> | |
unsigned int | numberObservations (const Index32 poseId, const Indices32 &objectPointIds) const |
Counts the number of observations of a given set of object point ids for a specific camera frame. More... | |
template<bool tThreadSafe, bool tMatchPosition, bool tNeedValidPose> | |
unsigned int | numberCorrespondences (const Index32 poseId, const Vector3 &referenceObjectPoint, const Scalar minimalPriority=Scalar(-1)) const |
Counts the number of correspondences (e.g., valid or invalid) between image and object points for a specified pose. More... | |
template<bool tThreadSafe, bool tMatchPosition, bool tNeedValidPose> | |
Indices32 | numberCorrespondences (const Index32 lowerPoseId, const Index32 upperPoseId, const Vector3 &referenceObjectPoint, const Scalar minimalPriority=Scalar(-1), Worker *worker=nullptr) const |
Counts the number of valid correspondences between image and object points for several poses individually. More... | |
template<bool tThreadSafe> | |
bool | hasImagePoint (const Index32 imagePointId, Vector2 *imagePoint=nullptr) const |
Returns whether this database holds a specified image point. More... | |
template<bool tThreadSafe> | |
Index32 | addImagePoint (const Vector2 &imagePoint) |
Adds a new 2D image point to this database. More... | |
template<bool tThreadSafe> | |
void | removeImagePoint (const Index32 imagePointId) |
Removes an image point from this database. More... | |
template<bool tThreadSafe> | |
bool | hasObjectPoint (const Index32 objectPointId, Vector3 *objectPoint=nullptr) const |
Returns whether this database holds a specified object point. More... | |
template<bool tThreadSafe> | |
Index32 | addObjectPoint (const Vector3 &objectPoint, const Scalar priority=Scalar(-1)) |
Adds a new 3D object point to this database. More... | |
template<bool tThreadSafe> | |
void | addObjectPoint (const Index32 objectPointId, const Vector3 &objectPoint, const Scalar priority=Scalar(-1)) |
Adds a new 3D object point to this database. More... | |
Index32 | addObjectPointFromDatabase (const Database &secondDatabase, const Index32 secondDatabaseObjectPointId, const SquareMatrix3 &imagePointTransformation=SquareMatrix3(true), const Index32 newObjectPointId=invalidId, const Index32 secondDatabaseLowerPoseId=invalidId, const Index32 secondDatabaseUpperPoseId=invalidId, const bool forExistingPosesOnly=false) |
Adds an object point from another database, adds all connected image points, registers unknown poses, and adds the topology. More... | |
template<bool tThreadSafe> | |
void | removeObjectPoint (const Index32 objectPointId) |
Removes an object point from this database. More... | |
template<bool tThreadSafe> | |
void | removeObjectPointAndAttachedImagePoints (const Index32 objectPointId) |
Removes an object point from this database and also removes all image points attached to the object point. More... | |
template<bool tThreadSafe> | |
void | renameObjectPoint (const Index32 oldObjectPointId, const Index32 newObjectPointId) |
Renames an object point, changes the id of the object point respectively. More... | |
template<bool tThreadSafe> | |
void | mergeObjectPoints (const Index32 remainingObjectPointId, const Index32 removingObjectPointId, const Vector3 &newPoint, const Scalar newPriority) |
Merges two object points together, afterwards one object point will be removed. More... | |
template<bool tThreadSafe> | |
bool | hasPose (const Index32 poseId, HomogenousMatrix4 *pose=nullptr) const |
Returns whether this database holds a specified camera pose. More... | |
template<bool tThreadSafe> | |
bool | addPose (const Index32 poseId, const HomogenousMatrix4 &pose=HomogenousMatrix4(false)) |
Adds a new camera pose by specifying the unique id of the new pose. More... | |
template<bool tThreadSafe> | |
void | removePose (const Index32 poseId) |
Removes a pose from this database. More... | |
template<bool tThreadSafe> | |
Index32 | poseFromImagePoint (const Index32 imagePointId) const |
Determines the camera pose (camera frame) in which a specified image point is visible (to which the image point has been added). More... | |
template<bool tThreadSafe> | |
size_t | numberImagePointsFromObjectPoint (const Index32 objectPointId) const |
Returns the number of image point observations which belong to a given object point. More... | |
template<bool tThreadSafe> | |
void | observationsFromObjectPoint (const Index32 objectPointId, Indices32 &poseIds, Indices32 &imagePointIds, Vectors2 *imagePoints=nullptr) const |
Returns all observations (combination of poses and image points) which belong to a given object point. More... | |
template<bool tThreadSafe> | |
void | observationsFromObjectPoint (const Index32 objectPointId, const Indices32 &poseIdCandidates, Indices32 &validPoseIndices, Indices32 *imagePointIds, Vectors2 *imagePoints=nullptr) const |
Returns all observations (combination of poses and image points) which belong to a given object point and a set of pose candidates. More... | |
template<bool tThreadSafe> | |
Index32 | objectPointFromImagePoint (const Index32 imagePointId) const |
Returns the object point which belongs to a given image point. More... | |
template<bool tThreadSafe> | |
const IndexSet32 & | imagePointsFromPose (const Index32 poseId) const |
Returns all image points which belong to a given camera pose. More... | |
template<bool tThreadSafe> | |
const IndexSet32 & | imagePointsFromObjectPoint (const Index32 objectPointId) const |
Returns all image points which belong to a given object point. More... | |
template<bool tThreadSafe> | |
IndexSet32 | posesFromObjectPoint (const Index32 objectPointId) const |
Returns all poses which belong to a given object point. More... | |
template<bool tThreadSafe> | |
void | attachImagePointToObjectPoint (const Index32 imagePointId, const Index32 objectPointId) |
Attaches an existing image point to an existing object points (defines the topology between an image point and an object point). More... | |
template<bool tThreadSafe> | |
void | detachImagePointFromObjectPoint (const Index32 imagePointId) |
Detaches an image point from an object point (withdraws the topology). More... | |
template<bool tThreadSafe> | |
void | attachImagePointToPose (const Index32 imagePointId, const Index32 poseId) |
Attaches an existing image point to an existing camera pose (defines the topology between an image point and a camera pose). More... | |
template<bool tThreadSafe> | |
void | detachImagePointFromPose (const Index32 imagePointId) |
Detaches an image point from a camera pose (withdraws the topology). More... | |
template<bool tThreadSafe> | |
void | setImagePoint (const Index32 imagePointId, const Vector2 &imagePoint) |
Sets (changes) an image point. More... | |
template<bool tThreadSafe> | |
void | setObjectPoint (const Index32 objectPointId, const Vector3 &objectPoint) |
Sets (changes) an object point without modifying the priority value of the object point. More... | |
template<bool tThreadSafe> | |
void | setObjectPoints (const Index32 *objectPointIds, const Vector3 *objectPoints, const size_t number) |
Sets (changes) a set of object points without modifying the priority value of the object points. More... | |
template<bool tThreadSafe> | |
void | setObjectPoints (const Index32 *objectPointIds, const size_t number, const Vector3 &referenceObjectPoint) |
Sets (changes) a set of object points without modifying the priority value of the object points. More... | |
template<bool tThreadSafe> | |
void | setObjectPoints (const Vector3 &objectPoint=invalidObjectPoint()) |
Sets (changes) all object points to one unique position without modifying the priority value of the object points. More... | |
template<bool tThreadSafe> | |
void | setObjectPoint (const Index32 objectPointId, const Vector3 &objectPoint, const Scalar priority) |
Sets (changes) an object point. More... | |
template<bool tThreadSafe> | |
void | setObjectPointPriority (const Index32 objectPointId, const Scalar priority) |
Sets (changes) the priority value of an object point. More... | |
template<bool tThreadSafe> | |
void | setPose (const Index32 poseId, const HomogenousMatrix4 &pose) |
Sets (changes) a pose. More... | |
template<bool tThreadSafe> | |
void | setPoses (const Index32 *poseIds, const HomogenousMatrix4 *poses, const size_t number) |
Sets (changes) a set of poses. More... | |
template<bool tThreadSafe> | |
void | setPoses (const ShiftVector< HomogenousMatrix4 > &poses) |
Sets (changes) a set of poses. More... | |
template<bool tThreadSafe> | |
void | setPoses (const HomogenousMatrix4 &pose) |
Sets (changes) all poses to one unique pose value. More... | |
template<bool tThreadSafe> | |
const IndexSet32 & | imagePointIds (const Index32 poseId) const |
Returns the ids of all image points visible in a specified camera pose (camera frame). More... | |
template<bool tThreadSafe> | |
Indices32 | imagePointIds (const Index32 poseId, Indices32 &objectPointIds) const |
Returns the ids of all image points which are projections of a set of object point in a specific camera frame. More... | |
template<bool tThreadSafe> | |
Vectors2 | imagePoints (const Index32 poseId, Indices32 *imagePointIds=nullptr) const |
Returns all image points which are located in a specified frame. More... | |
template<bool tThreadSafe> | |
Indices32 | imagePointIds (Vectors2 *imagePoints=nullptr) const |
Returns the ids of all image points that are part of this database. More... | |
template<bool tThreadSafe> | |
Indices32 | objectPointIds (Vectors3 *objectPoints=nullptr, Scalars *priorities=nullptr) const |
Returns the ids of all object points that are part of this database. More... | |
template<bool tThreadSafe> | |
Indices32 | objectPointIds (const IndexSet32 &outlierObjectPointIds) const |
Returns the ids of all object points that are part of this database and which are not provided by the explicit set of outlier object point ids. More... | |
template<bool tThreadSafe> | |
Indices32 | poseIds (HomogenousMatrices4 *world_T_cameras=nullptr) const |
Returns the ids of all poses that are part of this database. More... | |
template<bool tThreadSafe, bool tMatchPosition> | |
Indices32 | objectPointIds (const Vector3 &referencePosition, Vectors3 *objectPoints=nullptr, const Scalar minimalPriority=Scalar(-1)) const |
Returns all object points with a specific location and priority value larger or equal to a given threshold. More... | |
template<bool tThreadSafe, bool tMatchPosition> | |
Indices32 | objectPointIds (const IndexSet32 &outlierObjectPointIds, const Vector3 &referencePosition, Vectors3 *objectPoints=nullptr, const Scalar minimalPriority=Scalar(-1)) const |
Returns the ids of all object points with a specific location and having a priority value larger or equal to a given threshold as long as the object point is not defined in the explicit set of outlier object point ids. More... | |
template<bool tThreadSafe, bool tMatchPosition> | |
IndexPairs32 | objectPointIdsWithNumberOfObservations (const Vector3 &referencePosition, const Scalar minimalPriority=Scalar(-1), Worker *worker=nullptr) const |
Returns pairs of object point ids combined with counts of valid observations. More... | |
template<bool tThreadSafe> | |
Indices32 | objectPointIds (const Index32 poseId, Vectors3 *objectPoints=nullptr) const |
Returns all ids of object points which are visible in a specified frame. More... | |
template<bool tThreadSafe, bool tMatchPosition> | |
Indices32 | objectPointIds (const Index32 poseId, const Vector3 &referencePosition, const Scalar minimalPriority=Scalar(-1), Vectors3 *objectPoints=nullptr) const |
Returns all ids of object points which are visible in a specified frame and which match or do not match a specified reference position. More... | |
template<bool tThreadSafe> | |
Indices32 | objectPointIds (const Indices32 poseIds, Vectors3 *objectPoints=nullptr) const |
Returns all ids of object points which are visible in several specified frames. More... | |
template<bool tThreadSafe, bool tMatchPosition, bool tVisibleInAllPoses> | |
Indices32 | objectPointIds (const Index32 lowerPoseId, const Index32 upperPoseId, const Vector3 &referencePosition=invalidObjectPoint(), const Scalar minimalPriority=Scalar(-1), Vectors3 *objectPoints=nullptr) const |
Returns all ids of object points which are visible in a specified frame range. More... | |
template<bool tThreadSafe, bool tMatchPosition, bool tVisibleInAllPoses> | |
Indices32 | objectPointIds (const Indices32 &poseIds, const Vector3 &referencePosition=invalidObjectPoint(), const Scalar minimalPriority=Scalar(-1), Vectors3 *objectPoints=nullptr) const |
Returns all ids of object points which are visible in specified keyframes. More... | |
template<bool tThreadSafe> | |
Vectors2 | imagePointsWithObjectPoints (const Index32 poseId, Indices32 &objectPointIds) const |
Returns all image points which are located in a specified frame and are projections of object points. More... | |
template<bool tThreadSafe> | |
Vectors2 | imagePointsFromObjectPoints (const Index32 poseId, Indices32 &objectPointIds, Indices32 *imagePointIds=nullptr) const |
Returns all image points which are located in a specified frame and which are projections of a set of given object points. More... | |
template<bool tThreadSafe> | |
Vectors2 | imagePointsFromObjectPoints (const Index32 poseId, const Indices32 &objectPointIds, Indices32 &validIndices, Indices32 *imagePointIds=nullptr) const |
Returns all image points which are located in a specified frame and which are projections of a set of given object points. More... | |
template<bool tThreadSafe> | |
Vectors2 | imagePointsFromObjectPoints (const Index32 poseId, const Index32 *objectPointIds, const size_t numberObjectPointIds, Indices32 &validIndices, Indices32 *imagePointIds=nullptr) const |
Returns all image points which are located in a specified frame and which are projections of a set of given object points. More... | |
template<bool tThreadSafe> | |
ImagePointGroups | imagePointGroups (const Indices32 poseIds, Indices32 &objectPointIds) const |
Determines the groups of image points matching to unique object points in individual camera poses. More... | |
template<bool tThreadSafe> | |
IdIdPointPairsMap | imagePoints (const Index32 poseId, const bool previous, const size_t minimalObservations=2, const size_t maximalObservations=0) const |
Returns object points with corresponding image points entirely visible in a specific range of camera poses. More... | |
template<bool tThreadSafe> | |
void | imagePoints (const Index32 pose0, const Index32 pose1, Vectors2 &points0, Vectors2 &points1, Indices32 *objectPointIds=nullptr) const |
Determines the image points which are projections from the same object points and are visible in two individual camera poses. More... | |
template<bool tThreadSafe, bool tMatchPosition> | |
void | imagePointsObjectPoints (const Index32 poseId, Vectors2 &imagePoints, Vectors3 &objectPoints, const Vector3 &referencePosition=invalidObjectPoint(), const size_t minimalObservations=0, Indices32 *imagePointIds=nullptr, Indices32 *objectPointIds=nullptr) const |
Returns corresponding object points and image points for a given camera pose. More... | |
template<bool tThreadSafe, bool tMatchPosition> | |
void | imagePointsObjectPoints (const Index32 poseId, const IndexSet32 &priorityIds, Vectors2 &priorityImagePoints, Vectors3 &priorityObjectPoints, Vectors2 &remainingImagePoints, Vectors3 &remainingObjectPoints, const Vector3 &referencePosition=invalidObjectPoint(), const size_t minimalObservations=0, Indices32 *priorityImagePointIds=nullptr, Indices32 *priorityObjectPointIds=nullptr, Indices32 *remainingImagePointIds=nullptr, Indices32 *remainingObjectPointIds=nullptr) const |
Returns two groups of corresponding object points and image points for a given camera pose. More... | |
template<bool tThreadSafe, bool tMatchPose> | |
void | posesImagePoints (const Index32 objectPointId, HomogenousMatrices4 &poses, Vectors2 &imagePoints, const HomogenousMatrix4 &referencePose=HomogenousMatrix4(false), Indices32 *poseIds=nullptr, Indices32 *imagePointIds=nullptr, const Index32 lowerPoseId=invalidId, const Index32 upperPoseId=invalidId) const |
Returns corresponding poses and image points for a given object point from the entire range of possible camera poses. More... | |
template<bool tThreadSafe> | |
TopologyTriples | topologyTriples (const Indices32 &poseIds) const |
Returns topology triples with valid image points ids, object points ids and pose ids for a set of given pose ids. More... | |
template<bool tThreadSafe> | |
void | clear () |
Clears the database including all camera poses, object points, image points and any topology. More... | |
template<bool tThreadSafe> | |
void | reset (const Vector3 &referenceObjectPoint=invalidObjectPoint(), const HomogenousMatrix4 &referencePose=HomogenousMatrix4(false)) |
Resets the geometric information of this database for 3D object points and 6DOF camera poses. More... | |
template<typename T , bool tThreadSafe> | |
void | reset (const size_t numberPoses, const Index32 *poseIds, const HomogenousMatrixT4< T > *poses, const size_t numberObjectPoints, const Index32 *objectPointIds, const VectorT3< T > *objectPoints, const T *objectPointPriorities, const size_t numberImagePoints, const Index32 *imagePointIds, const VectorT2< T > *imagePoints, const Index32 *topologyPoseIds, const Index32 *topologyObjectPointIds) |
Resets this database with given poses, object points, image points, and topology. More... | |
Database & | operator= (const Database &database) |
Assign operator copying a second database to this database object. More... | |
Database & | operator= (Database &&database) noexcept |
Move operator moving a second database to this database object. More... | |
operator bool () const | |
Returns whether this database holds at least one image point, one object point or one camera pose. More... | |
Static Public Member Functions | |
static Vector3 | invalidObjectPoint () |
Returns an invalid object point. More... | |
static Indices32 | filterTopologyTriplesPoses (const TopologyTriples &topologyTriples, const IndexSet32 &poseIds) |
Filters a set of given topology triples due to a set of given pose ids. More... | |
static Indices32 | filterTopologyTriplesObjectPoints (const TopologyTriples &topologyTriples, const IndexSet32 &objectPointIds) |
Filters a set of given topology triples due to a set of given object point ids. More... | |
static Indices32 | filterTopologyTriplesImagePoints (const TopologyTriples &topologyTriples, const IndexSet32 &imagePointIds) |
Filters a set of given topology triples due to a set of given image point ids. More... | |
static Indices32 | reliableObjectPoints (const TopologyTriples &topologyTriples, const unsigned int minimalObservations) |
Determines reliable object points from a set of given topology triples (by determining all object points with a minimal number of observations). More... | |
static PoseImagePointTopologyGroups | objectPointTopology (const TopologyTriples &topologyTriples, const Indices32 *indices=nullptr) |
Converts the set of topology triples into a representation which is forced/oriented by object points so that the camera poses and image points can be accessed for a specific object points. More... | |
Static Public Attributes | |
static const Index32 | invalidId = Index32(-1) |
Definition of an invalid id. More... | |
Protected Types | |
typedef std::map< Index32, PoseData > | PoseMap |
Definition of an (ordered) map mapping pose ids to pose data objects, we use an ordered map as poses have an order. More... | |
typedef std::unordered_map< Index32, ObjectPointData > | ObjectPointMap |
Definition of an (unordered) map mapping object point ids to object point data objects. More... | |
typedef std::unordered_map< Index32, ImagePointData > | ImagePointMap |
Definition of an (unordered) map mapping image point ids to image point data objects. More... | |
typedef std::unordered_map< Index32, Index32 > | Index32To32Map |
Definition of an (unordered) map mapping 32 bit ids to 32 bit ids. More... | |
typedef std::unordered_map< Index64, Index32 > | Index64To32Map |
Definition of an (unordered) map mapping 64 bit ids to 32 bit ids. More... | |
Protected Member Functions | |
template<bool tMatchPosition, bool tNeedValidPose> | |
void | numberCorrespondencesSubset (const Index32 lowerPoseId, const Vector3 *referenceObjectPoint, const Scalar minimalPriority, unsigned int *correspondences, const unsigned int firstPose, const unsigned int numberPoses) const |
Counts the number of valid correspondences between image and object points for a subset of several poses individually. More... | |
template<bool tMatchPosition> | |
void | objectPointIdsWithNumberOfObservationsSubset (const Index32 *objectPointIds, const Vector3 *referencePosition, const Scalar minimalPriority, IndexPairs32 *pairs, Lock *lock, const unsigned int firstObjectPoint, const unsigned int numberObjectPoints) const |
Returns pairs of object point ids combined with counts of valid observations. More... | |
unsigned int | numberValidPoses (const Index32 objectPointId, const IndexSet32 &imagePointIds) const |
Counts the number of valid poses of a given object point. More... | |
Static Protected Member Functions | |
static Index32 | firstIndex (const Index64 index) |
Returns the first 32 bit index of a 64 bit index. More... | |
static Index32 | secondIndex (const Index64 index) |
Returns the second 32 bit index of a 64 bit index. More... | |
static Index64 | index64 (const Index32 first, const Index32 second) |
Returns the 64 bit index composed of two 32 bit indices. More... | |
Protected Attributes | |
PoseMap | databasePoseMap |
The map mapping unique pose ids to pose data instances. More... | |
ObjectPointMap | databaseObjectPointMap |
The map mapping unique object point ids to object point data instances. More... | |
ImagePointMap | databaseImagePointMap |
The map mapping unique image points ids to image point data instances. More... | |
Index64To32Map | databasePoseObjectPointMap |
The map mapping a pair of pose id and object point id to image point ids. More... | |
unsigned int | databasePoses |
The number of poses. More... | |
Index32 | databaseObjectPointIdCounter |
The counter for unique object point ids. More... | |
Index32 | databaseImagePointIdCounter |
The counter for unique image point ids. More... | |
Lock | databaseLock |
The lock for the entire database. More... | |
This class implements a database for 3D object points, 2D image points and 6DOF camera poses.
Any 2D image point is located in a camera frame, while any camera frame has an own camera pose.
Corresponding image points in consecutive camera frames can belong to the same 3D object point.
This database stores ids for image points, object points, priority values of object points, camera poses and field of views of camera poses.
Further, the topology between the individual database elements can be defined.
The locations of the image points (2D positions within the camera frames) must be valid always.
The locations of the object points or the transformation values of the camera poses may be invalid as in this case the location of the transformation has not been determined yet.
An id of an image point has the following connections:
image point id -> 2D point location (always valid) -> camera pose id (the id of the camera pose in which frame the image point is located) -> 3D object point id (the id of the object point which projects to the image point)
Due to performance issues object points and camera poses store mappings to their corresponding image points.
An id of an object point has the following connections:
object point id -> 3D point location (may be invalid) -> Priority value -> image point ids (the ids of all image points which are projections of the object points)
An id of a camera pose has the following connections:
camera pose id -> 6DOF pose (may be invalid) -> Field of View value -> image point ids (the ids of all image points visible in the camera frame belonging to the camera pose)
Finally, the database stores a mapping between a pair of pose ids and object points ids and image points ids:
pose id, object point id -> image point id
The internal data structure of this database allows arbitrary element access with almost O(log n).
Due to the performance issue connections between the individual objects are necessary.
typedef std::map<Index32, IdPointPairs> Ocean::Tracking::Database::IdIdPointPairsMap |
Definition of a map mapping ids to 2D image point id pairs.
typedef std::map<Index32, Vector2> Ocean::Tracking::Database::IdPointMap |
Definition of a map mapping ids to 2D image point object.
typedef std::pair<Index32, Vector2> Ocean::Tracking::Database::IdPointPair |
Definition of a pair of ids and 2D image points.
typedef std::vector<IdPointPair> Ocean::Tracking::Database::IdPointPairs |
Definition of a vector holding pairs of ids and 2D image points.
typedef std::vector<Vectors2> Ocean::Tracking::Database::ImagePointGroups |
Definition of a vector holding 2D vectors.
|
protected |
Definition of an (unordered) map mapping image point ids to image point data objects.
typedef std::map<Index32, Vectors2> Ocean::Tracking::Database::ImagePointsMap |
Definition of a map mapping ids to 2D vectors.
|
protected |
Definition of an (unordered) map mapping 32 bit ids to 32 bit ids.
|
protected |
Definition of an (unordered) map mapping 64 bit ids to 32 bit ids.
|
protected |
Definition of an (unordered) map mapping object point ids to object point data objects.
typedef std::vector<PoseImagePointPair> Ocean::Tracking::Database::PoseImagePointTopology |
Definition of a vector holding several pairs of pose and image point ids.
typedef std::vector< std::pair<Index32, PoseImagePointTopology> > Ocean::Tracking::Database::PoseImagePointTopologyGroups |
Definition of a vector holding several groups of pairs of pose and image point ids.
|
protected |
Definition of an (ordered) map mapping pose ids to pose data objects, we use an ordered map as poses have an order.
typedef std::vector<TopologyTriple> Ocean::Tracking::Database::TopologyTriples |
Definition of a vector holding object of topology triple.
|
inline |
Creates a new empty database object.
|
inline |
Copy constructor.
database | The database object to be copied |
|
inlinenoexcept |
Move constructor.
database | The database object to be moved |
|
inline |
Adds a new 2D image point to this database.
imagePoint | The image point to be added |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Adds a new 3D object point to this database.
This function does not use the internal id counter for object points to create a new id.
Instead, this function takes an explicit object point id.
Beware: Do not mix calls with the add-objectPoint-function creating the id on its own.
objectPointId | The unique id of the new object point, must not exist already |
objectPoint | The object point to be added |
priority | The priority value of the object point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Adds a new 3D object point to this database.
This function uses the internal id counter for object points to create a new id.
Beware: Do not mix calls with the add-objectPoint-function not creating the id on its own.
objectPoint | The object point to be added |
priority | The priority value of the object point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Adds an object point from another database, adds all connected image points, registers unknown poses, and adds the topology.
Thus, this function mainly merges a track from a second database to this database. Beware: This function is not thread-safe (as we need to prevent possible dead locks).
secondDatabase | The second database from which the track (the object point and all connected information) will be copied |
secondDatabaseObjectPointId | The id of the object point in the second database to be copied |
imagePointTransformation | A transformation which will be applied to each connected image point (from the second database) before the image point is added to this database, an identity transformation to keep the image points as they are, the transformation defines: thisDatabaseImagePoint = imagePointTransformation * secondDatabaseImagePoint, must not be singular |
newObjectPointId | Optional explicit id of the new object point in this database, must not exist in this database if defined, an invalid id to generate a new id automatically |
secondDatabaseLowerPoseId | Optional pose id defining the lower border of the pose range from which observations (image points) of the object point will be copied, an invalid id to copy all possible observations, with range [0, secondDatabaseUpperPoseId] or invalidId |
secondDatabaseUpperPoseId | Optional pose id defining the upper border of the pose range from which observations (image points) of the object point will be copied, an invalid id to copy all possible observations, with range [secondDatabaseLowerPoseId, infinity) or invalidId |
forExistingPosesOnly | True, to avoid the creation of new poses in this database (and to skip observations/image points); False, to create new poses in this database if not existing already |
|
inline |
Adds a new camera pose by specifying the unique id of the new pose.
Beware: The given unique id must not exist in the database, define the pose id so that it matches to e.g., a unique frame index.
poseId | The unique id of the new pose, must be valid |
pose | The pose to be set, may be invalid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Attaches an existing image point to an existing object points (defines the topology between an image point and an object point).
imagePointId | The id of the image point which will be attached to the specified object points, must be valid |
objectPointId | The id of the object points which will receive the connection to the given image point, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Attaches an existing image point to an existing camera pose (defines the topology between an image point and a camera pose).
imagePointId | The id of the image point which will be attached to the specified object points, must be valid |
poseId | The id of the pose which will receive the connection to the given image point, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Clears the database including all camera poses, object points, image points and any topology.
tThreadSafe | True, to call this function thread-safe |
|
inline |
Detaches an image point from an object point (withdraws the topology).
imagePointId | the id of the image point from which the topology to the object point will be removed, must be valid |
|
inline |
Detaches an image point from a camera pose (withdraws the topology).
imagePointId | the id of the image point from which the topology to the camera pose will be removed, must be valid |
|
inlinestatic |
Filters a set of given topology triples due to a set of given image point ids.
topologyTriples | The set of topology triplies which will be filtered |
imagePointIds | The ids of the image points defining which triples are returned (the indices respectively) |
|
inlinestatic |
Filters a set of given topology triples due to a set of given object point ids.
topologyTriples | The set of topology triplies which will be filtered |
objectPointIds | The ids of the object points defining which triples are returned (the indices respectively) |
|
inlinestatic |
Filters a set of given topology triples due to a set of given pose ids.
topologyTriples | The set of topology triplies which will be filtered |
poseIds | The ids of the camera pose defining which triples are returned (the indices respectively) |
Returns the first 32 bit index of a 64 bit index.
index | The 64 bit index |
|
inline |
Returns whether this database holds a specified image point.
imagePointId | The unique id of the image point which will be checked |
imagePoint | Optional resulting image point value of the defined image point id |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns whether this database holds a specified object point.
objectPointId | The unique id of the object point which will be checked |
objectPoint | Optional resulting object point value of the defined object point id |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns whether an object point is visible in a specified frame, and optional the location and id of the corresponding image point.
poseId | The id of the camera pose for which the visibility of the object point is checked, must be valid |
objectPointId | The unique id of the object point, must be valid |
point | Optional resulting location of the image point, if any |
pointId | Optional resulting unique id of the image point, if any |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns whether this database holds a specified camera pose.
poseId | The unique id of the pose which will be checked |
pose | Optional resulting pose value of the defined pose id |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the location of an image point which is specified by the id of the image point.
Beware: The requested image point must exist in this database.
imagePointId | The unique id of the image point, must be valid |
tThreadSafe | True, to call this function thread-safe |
Database::ImagePointGroups Ocean::Tracking::Database::imagePointGroups | ( | const Indices32 | poseIds, |
Indices32 & | objectPointIds | ||
) | const |
Determines the groups of image points matching to unique object points in individual camera poses.
Image points within one group correspond to one object point while the order of the image points correspond with the order of the given camera poses.
poseIds | The ids of the camera pose in which the object points are visible which form the groups of image points. |
objectPointIds | Resulting ids of object points which are visible in all camera pose and to which the resulting groups of image points correspond |
tThreadSafe | True, to call this function thread-safe |
const IndexSet32 & Ocean::Tracking::Database::imagePointIds | ( | const Index32 | poseId | ) | const |
Returns the ids of all image points visible in a specified camera pose (camera frame).
poseId | The id of the camera pose in which the image points are visible, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the ids of all image points which are projections of a set of object point in a specific camera frame.
poseId | The id of the camera pose in which the image points will be located |
objectPointIds | The ids of the object points for which the image points are requested, this set will be modified so that the set finally contains only object points which have a connected image point (in the specified frame) |
tThreadSafe | True, to call this function thread-safe |
Indices32 Ocean::Tracking::Database::imagePointIds | ( | Vectors2 * | imagePoints = nullptr | ) | const |
Returns the ids of all image points that are part of this database.
imagePoints | Optional resulting image points, one for each resulting image point id, nullptr if not of interest |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the number of image point ids in this database.
void Ocean::Tracking::Database::imagePoints | ( | const Index32 | pose0, |
const Index32 | pose1, | ||
Vectors2 & | points0, | ||
Vectors2 & | points1, | ||
Indices32 * | objectPointIds = nullptr |
||
) | const |
Determines the image points which are projections from the same object points and are visible in two individual camera poses.
pose0 | The id of the first camera pose, must be valid |
pose1 | The id of the second camera pose, must be valid and must not be 'pose0' |
points0 | The resulting image points visible in the first camera pose |
points1 | The resulting image points visible in the second camera pose, each point corresponds to one point from 'points0' |
objectPointIds | Optional resulting ids of the object points which are visible in both camera poses |
tThreadSafe | True, to call this function thread-safe |
Database::IdIdPointPairsMap Ocean::Tracking::Database::imagePoints | ( | const Index32 | poseId, |
const bool | previous, | ||
const size_t | minimalObservations = 2 , |
||
const size_t | maximalObservations = 0 |
||
) | const |
Returns object points with corresponding image points entirely visible in a specific range of camera poses.
poseId | The id of the camera pose which is the start position of the range of camera poses |
previous | True, if the range covers the previous camera poses; False, if the range covers the subsequent camera poses |
minimalObservations | The minimal number of successive camera poses in which an object point must be visible |
maximalObservations | Optional the maximal number of successive camera poses (more poses will not be investigated), 0 or with range [minimalObservations, infinity) |
tThreadSafe | True, to call this function thread-safe |
Vectors2 Ocean::Tracking::Database::imagePoints | ( | const Index32 | poseId, |
Indices32 * | imagePointIds = nullptr |
||
) | const |
Returns all image points which are located in a specified frame.
poseId | The id of the camera pose in which frame the image points are requested |
imagePointIds | Optional resulting ids of the resulting image points one id for each point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the positions of 2D image points specified by the ids of the image points.
imagePointIds | The ids of the image points for which the positions will be returned, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the positions of 2D image points specified by the ids of the image points.
imagePointIds | The ids of the image points for which the positions will be returned, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns all image points which belong to a given object point.
Beware: The resulting reference is valid as long as the database is not modified.
objectPointId | The id of the object point for which the connected image points are requested, must be valid |
tThreadSafe | True, to call this function thread-safe |
Vectors2 Ocean::Tracking::Database::imagePointsFromObjectPoints | ( | const Index32 | poseId, |
const Index32 * | objectPointIds, | ||
const size_t | numberObjectPointIds, | ||
Indices32 & | validIndices, | ||
Indices32 * | imagePointIds = nullptr |
||
) | const |
Returns all image points which are located in a specified frame and which are projections of a set of given object points.
As not all object points may be visible in the specified frame, the number of resulting image points may be smaller than the number of specified object points.
The set of specified object points is untouched, however a resulting set of indices return the indices of valid object points (indices as specified in the set of object points).
poseId | The id of the camera pose in which frame the image points are requested |
objectPointIds | The ids of the object points for which the corresponding image points are requested |
numberObjectPointIds | The number of given object point ids |
validIndices | The indices of valid object points, !not! the ids of valid object points |
imagePointIds | Optional resulting image point ids of the resulting image points |
tThreadSafe | True, to call this function thread-safe |
Vectors2 Ocean::Tracking::Database::imagePointsFromObjectPoints | ( | const Index32 | poseId, |
const Indices32 & | objectPointIds, | ||
Indices32 & | validIndices, | ||
Indices32 * | imagePointIds = nullptr |
||
) | const |
Returns all image points which are located in a specified frame and which are projections of a set of given object points.
As not all object points may be visible in the specified frame, the number of resulting image points may be smaller than the number of specified object points.
The set of specified object points is untouched, however a resulting set of indices return the indices of valid object points (indices as specified in the set of object points).
poseId | The id of the camera pose in which frame the image points are requested |
objectPointIds | The ids of the object points for which the corresponding image points are requested |
validIndices | The indices of valid object points, !not! the ids of valid object points |
imagePointIds | Optional resulting image point ids of the resulting image points |
tThreadSafe | True, to call this function thread-safe |
Vectors2 Ocean::Tracking::Database::imagePointsFromObjectPoints | ( | const Index32 | poseId, |
Indices32 & | objectPointIds, | ||
Indices32 * | imagePointIds = nullptr |
||
) | const |
Returns all image points which are located in a specified frame and which are projections of a set of given object points.
As not all object points may be visible in the specified frame, the set of given object points will be modified so that set contains only visible object points after calling this function.
poseId | The id of the camera pose in which frame the image points are requested |
objectPointIds | The ids of the object points for which the corresponding image points are requested |
imagePointIds | Optional resulting image point ids of the resulting image points |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns all image points which belong to a given camera pose.
Beware: The resulting reference is valid as long as the database is not modified.
poseId | The id of the camera pose for which the connected image points are requested, must be valid |
tThreadSafe | True, to call this function thread-safe |
void Ocean::Tracking::Database::imagePointsObjectPoints | ( | const Index32 | poseId, |
const IndexSet32 & | priorityIds, | ||
Vectors2 & | priorityImagePoints, | ||
Vectors3 & | priorityObjectPoints, | ||
Vectors2 & | remainingImagePoints, | ||
Vectors3 & | remainingObjectPoints, | ||
const Vector3 & | referencePosition = invalidObjectPoint() , |
||
const size_t | minimalObservations = 0 , |
||
Indices32 * | priorityImagePointIds = nullptr , |
||
Indices32 * | priorityObjectPointIds = nullptr , |
||
Indices32 * | remainingImagePointIds = nullptr , |
||
Indices32 * | remainingObjectPointIds = nullptr |
||
) | const |
Returns two groups of corresponding object points and image points for a given camera pose.
The first group of correspondences have object points from the given set of priority object points The second group of correspondences have object points not given in the set of priority object points
poseId | The id of the camera pose for which the object and image points are requested |
priorityIds | The ids of the object points which will belong to the group of priority correspondences |
priorityImagePoints | The resulting image points located in the specified camera pose belonging to the priority group |
priorityObjectPoints | The resulting object points belonging to the priority group, each point corresponds to one image points from 'imagePoints' |
remainingImagePoints | The resulting image points located in the specified camera pose belonging to the remaining group |
remainingObjectPoints | The resulting object points belonging to the remaining group, each point corresponds to one image points from 'imagePoints' |
referencePosition | The 3D reference position which is used to filter the object points |
minimalObservations | The minimal number of observations a resulting object points must have (in arbitrary sibling camera pose) |
priorityImagePointIds | Optional ids of the resulting image points belonging to the priority group |
priorityObjectPointIds | Optional ids of the resulting object points belonging to the priority group |
remainingImagePointIds | Optional ids of the resulting image points belonging to the remaining group |
remainingObjectPointIds | Optional ids of the resulting object points belonging to the remaining group |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
void Ocean::Tracking::Database::imagePointsObjectPoints | ( | const Index32 | poseId, |
Vectors2 & | imagePoints, | ||
Vectors3 & | objectPoints, | ||
const Vector3 & | referencePosition = invalidObjectPoint() , |
||
const size_t | minimalObservations = 0 , |
||
Indices32 * | imagePointIds = nullptr , |
||
Indices32 * | objectPointIds = nullptr |
||
) | const |
Returns corresponding object points and image points for a given camera pose.
poseId | The id of the camera pose for which the object and image points are requested |
imagePoints | The resulting image points located in the specified camera pose |
objectPoints | The resulting object points, each point corresponds to one image points from 'imagePoints' |
referencePosition | The 3D reference position which is used to filter the object points |
minimalObservations | The minimal number of observations a resulting object points must have (in arbitrary sibling camera pose) |
imagePointIds | Optional ids of the resulting image points |
objectPointIds | Optional ids of the resulting object points |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
Vectors2 Ocean::Tracking::Database::imagePointsWithObjectPoints | ( | const Index32 | poseId, |
Indices32 & | objectPointIds | ||
) | const |
Returns all image points which are located in a specified frame and are projections of object points.
poseId | The id of the camera pose in which frame the image points are requested |
objectPointIds | Resulting object point ids corresponding to the individual image points |
tThreadSafe | True, to call this function thread-safe |
|
inlinestaticprotected |
Returns the 64 bit index composed of two 32 bit indices.
first | The first 32 bit index |
second | The second 32 bit index |
|
inlinestatic |
Returns an invalid object point.
|
inline |
Returns whether this database holds at least one image point, one object point or one camera pose.
tThreadSafe | True, to call this function thread-safe |
|
inline |
Determines the largest pose id range for which the database holds valid poses.
lowerPoseId | The id of the frame defining the lower border of the camera poses which will be investigated, with range [0, infinity) |
upperPoseId | The id of the frame defining the upper border of the camera poses which will be investigated, with range [lowerPoseId, infinity) |
rangeLowerPoseId | Resulting id of the first camera pose/camera frame with valid camera pose, with range [lowerPoseId, upperPoseId] |
rangeUpperPoseId | Resulting id of the last camera pose/camera frame with valid camera pose, with range [rangeLowerPoseId, upperPoseId] |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns a reference to the lock object of this database object.
|
inline |
Merges two object points together, afterwards one object point will be removed.
Both object points must not be visible in the same camera pose.
remainingObjectPointId | The id of the object point which will remain after merging both object points, must be valid |
removingObjectPointId | The id of the object point which will be removed after merging both object points, must be valid |
newPoint | The location of the merged object point |
newPriority | The priority of the merged object point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Counts the number of valid correspondences between image and object points for several poses individually.
lowerPoseId | The id (index) of the frame defining the lower border of camera poses which will be investigated |
upperPoseId | The id (index) of the frame defining the upper border of camera poses which will be investigated, with range [lowerFrame, infinity) |
referenceObjectPoint | A reference object point allowing to filter the correspondences to count |
minimalPriority | The minimal priority value an object point must have so that is will be investigated |
worker | Optional worker to distribute the computation |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the correspondences; False, if the defined position will not match the positions of the correspondences |
tNeedValidPose | True, if the pose must be valid so that the number of valid correspondences will be determined, otherwise the number of correspondences will be zero |
|
inline |
Counts the number of correspondences (e.g., valid or invalid) between image and object points for a specified pose.
poseId | The id of the pose for which the number of point correspondences is determined |
referenceObjectPoint | A reference object point allowing to filter the correspondences to count |
minimalPriority | The minimal priority value an object point must have so that is will be investigated |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the correspondences; False, if the defined position will not match the positions of the correspondences |
tNeedValidPose | True, if the pose must be valid so that the number of valid correspondences will be determined, otherwise the number of correspondences will be zero |
|
inlineprotected |
Counts the number of valid correspondences between image and object points for a subset of several poses individually.
lowerPoseId | The id (index) of the frame defining the lower border of camera poses which will be investigated |
referenceObjectPoint | A reference object point allowing to filter the correspondences to count |
minimalPriority | The minimal priority value an object point must have so that is will be investigated |
correspondences | The resulting correspondences, one for each frame, starting with 'lowerPoseId' (the first entry corresponds to 'lowerPoseId' and so on) |
firstPose | The index (not the id) of the first pose to handle |
numberPoses | The number of poses to handle |
tMatchPosition | True, if the defined position will match the positions of the correspondences; False, if the defined position will not match the positions of the correspondences |
tNeedValidPose | True, if the pose must be valid so that the number of valid correspondences will be determined, otherwise the number of correspondences will be zero |
|
inline |
Returns the number of image point observations which belong to a given object point.
objectPointId | The id of the object point for which the number of observations are requested, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Counts the number of observations of a given set of object point ids for a specific camera frame.
poseId | The id of the pose for which the number of visible object points is determined |
objectPointIds | the ids of the object point for which the number of observations is determined |
tThreadSafe | True, to call this function thread-safe |
|
inlineprotected |
Counts the number of valid poses of a given object point.
objectPointId | The id of the object point for which the number of valid poses is determined |
imagePointIds | The ids of the image points which are the projections of the defined object point (must be extracted from the ObjectPointData object of the given object point) |
|
inline |
Returns the location of an object point which is specified by the id of the object point.
Beware: The requested object point must exist in this database.
objectPointId | The unique id of the object point, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the location and priority of an object point which is specified by the id of the object point.
Beware: The requested object point must exist in this database.
objectPointId | The unique id of the object point, must be valid |
objectPointPriority | The resulting priority of the specified object point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the object point which belongs to a given image point.
Each image point can be the projection of at most one unique object point.
Beware: The specified image point may not be connected to an object point, in this case the resulting id is an invalid id.
imagePointId | The id of the image point for which the corresponding object point is requested |
tThreadSafe | True, to call this function thread-safe |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | const Index32 | lowerPoseId, |
const Index32 | upperPoseId, | ||
const Vector3 & | referencePosition = invalidObjectPoint() , |
||
const Scalar | minimalPriority = Scalar(-1) , |
||
Vectors3 * | objectPoints = nullptr |
||
) | const |
Returns all ids of object points which are visible in a specified frame range.
The function allows to determine object points which are visible in all frames of the specified frame range or in any of the frames.
lowerPoseId | Pose id defining the lower pose id border of all poses which will be investigated |
upperPoseId | Pose id defining the lower pose id border of all poses which will be investigated, with range [lowerPoseId, infinity) |
referencePosition | The 3D reference position which is used to filter the object points |
minimalPriority | The minimal priority value an object point must have so that it will be investigated |
objectPoints | Optional resulting positions of the resulting object point ids |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
tVisibleInAllPoses | True, if the object points must be visible in all poses (frames) of the specified pose range; False, if the object point can be visible in any poses (frames) within the specified pose range |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | const Index32 | poseId, |
const Vector3 & | referencePosition, | ||
const Scalar | minimalPriority = Scalar(-1) , |
||
Vectors3 * | objectPoints = nullptr |
||
) | const |
Returns all ids of object points which are visible in a specified frame and which match or do not match a specified reference position.
poseId | The id of the camera pose in which frame the object points are visible |
referencePosition | The 3D reference position which is used to filter the object points |
minimalPriority | The minimal priority value an object point must have so that it will be investigated |
objectPoints | Optional resulting positions of the resulting object point ids |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | const Index32 | poseId, |
Vectors3 * | objectPoints = nullptr |
||
) | const |
Returns all ids of object points which are visible in a specified frame.
poseId | The id of the camera pose in which frame the object points are visible |
objectPoints | Optional resulting positions of the resulting object point ids |
tThreadSafe | True, to call this function thread-safe |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | const IndexSet32 & | outlierObjectPointIds | ) | const |
Returns the ids of all object points that are part of this database and which are not provided by the explicit set of outlier object point ids.
outlierObjectPointIds | The ids of all object points which will not be returned |
tThreadSafe | True, to call this function thread-safe |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | const IndexSet32 & | outlierObjectPointIds, |
const Vector3 & | referencePosition, | ||
Vectors3 * | objectPoints = nullptr , |
||
const Scalar | minimalPriority = Scalar(-1) |
||
) | const |
Returns the ids of all object points with a specific location and having a priority value larger or equal to a given threshold as long as the object point is not defined in the explicit set of outlier object point ids.
outlierObjectPointIds | The ids of all object points which will not be returned |
referencePosition | A 3D point value allowing to filter the resulting object point ids |
objectPoints | Optional resulting object point positions, one position for each resulting id |
minimalPriority | The minimal priority value an object point must have to that it will be returned (if it matches the reference position) |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | const Indices32 & | poseIds, |
const Vector3 & | referencePosition = invalidObjectPoint() , |
||
const Scalar | minimalPriority = Scalar(-1) , |
||
Vectors3 * | objectPoints = nullptr |
||
) | const |
Returns all ids of object points which are visible in specified keyframes.
The function allows to determine object points which are visible in all keyframes or in any of the keyframes.
poseIds | The ids of the keyframes which will be investigated |
referencePosition | The 3D reference position which is used to filter the object points |
minimalPriority | The minimal priority value an object point must have so that it will be investigated |
objectPoints | Optional resulting positions of the resulting object point ids |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
tVisibleInAllPoses | True, if the object points must be visible in all poses (frames) of the specified pose range; False, if the object point can be visible in any poses (frames) within the specified pose range |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | const Indices32 | poseIds, |
Vectors3 * | objectPoints = nullptr |
||
) | const |
Returns all ids of object points which are visible in several specified frames.
poseIds | The ids of the camera poses in which frame the object points are visible |
objectPoints | Optional resulting positions of the resulting object point ids |
tThreadSafe | True, to call this function thread-safe |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | const Vector3 & | referencePosition, |
Vectors3 * | objectPoints = nullptr , |
||
const Scalar | minimalPriority = Scalar(-1) |
||
) | const |
Returns all object points with a specific location and priority value larger or equal to a given threshold.
referencePosition | A 3D point value allowing to filter the resulting object point ids |
objectPoints | Optional resulting object point positions, one position for each resulting id |
minimalPriority | The minimal priority value an object point must have to that it will be returned (if it matches the reference position) |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
Indices32 Ocean::Tracking::Database::objectPointIds | ( | Vectors3 * | objectPoints = nullptr , |
Scalars * | priorities = nullptr |
||
) | const |
Returns the ids of all object points that are part of this database.
objectPoints | Optional resulting object points, one for each resulting object point id, nullptr if not of interest |
priorities | Optional resulting object point priorities, one for each resulting object point id, nullptr if not of interest |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns pairs of object point ids combined with counts of valid observations.
The ids are id of object points which have a specified 3D position or which do not have a specified 3D position.
referencePosition | The 3D reference position which is used to filter the object points |
minimalPriority | The minimal priority value an object point must have to be identified as candidate |
worker | Optional worker object to distribute the computation |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
|
protected |
Returns pairs of object point ids combined with counts of valid observations.
objectPointIds | The ids of the object points for which the number of observations is determined |
referencePosition | The 3D position of the object points to find or to avoid (e.g., may be an invalid position to identify all invalid object points) |
minimalPriority | The minimal priority value an object point must have to be identified as candidate |
pairs | The resulting pairs of object point ids and numbers of valid camera poses for the individual object points |
lock | Optional lock object, must be defined if the function is executed on several threads in parallel |
firstObjectPoint | The first object point to be handled |
numberObjectPoints | The number of object points to be handled |
tMatchPosition | True, if the defined position will match the positions of the resulting object points; False, if the defined position will not match the positions of the resulting object points |
|
inline |
Returns the number of object point ids in this database.
|
inline |
Returns the priority of an object point which is specified by the id of the object point.
Beware: The requested object point must exist in this database.
objectPointId | The unique id of the object point, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the positions of all 3D object points.
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the positions of 3D object points specified by the ids of the object points.
objectPointIds | The ids of the object points for which the positions will be returned, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the positions of all 3D object points that match or that do not match the position of a specified reference object point and which have a specified minimal priority value.
referencePosition | An object point position which is used to filter the resulting object points |
objectPointIds | Optional resulting ids of the resulting valid object points, on id for each object point |
minimalPriority | The minimal priority value an object points must have to be returned |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined reference position will match the positions of the resulting object points; False, if the defined reference position will not match the positions of the resulting object points |
|
static |
Converts the set of topology triples into a representation which is forced/oriented by object points so that the camera poses and image points can be accessed for a specific object points.
topologyTriples | The set of topology triples which will be converted |
indices | Optional subset of the given topology, the indices of the topology triples that will be added to the resulting (object point forced) data structure, nullptr to use all triples |
|
inline |
Returns all observations (combination of poses and image points) which belong to a given object point and a set of pose candidates.
objectPointId | The id of the object point for which the connected observations are requested, must be valid |
poseIdCandidates | The candidates of pose ids for which the observation will be checked |
validPoseIndices | The resulting indices of the valid pose candidates |
imagePointIds | Optional resulting ids of the image points for which a valid observation exists, one id for each valid pose |
imagePoints | Optional resulting image points, one point for each image point id |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns all observations (combination of poses and image points) which belong to a given object point.
objectPointId | The id of the object point for which the connected observations are requested, must be valid |
poseIds | The resulting ids of the poses of the observations |
imagePointIds | The resulting ids of the image points of the observations, one id for each pose |
imagePoints | Optional resulting image points, one point for each image point id |
tThreadSafe | True, to call this function thread-safe |
|
inlineexplicit |
Returns whether this database holds at least one image point, one object point or one camera pose.
Assign operator copying a second database to this database object.
database | The database object to be copied |
Move operator moving a second database to this database object.
database | The database object to be moved |
|
inline |
Returns the 6DOF pose of a camera frame which is specified by the id of the pose.
Beware: The requested pose must exist in this database.
poseId | The unique id of the pose, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the smallest id (the id of the lower frame border) and the largest id (the id of the upper frame border) of all poses that are known in this database.
This function checks whether the pose (camera frame) is known only, thus the corresponding poses can either be valid or invalid.
lowerPoseId | Resulting id of the frame defining the lower border of the camera frames which are known |
upperPoseId | Resulting id of the frame defining the upper border of the camera frames which are known |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Determines the camera pose (camera frame) in which a specified image point is visible (to which the image point has been added).
Beware: The specified image point must exist in this database.
imagePointId | The id of the image point for which the corresponding camera pose is requested, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the ids of specific 6DOF poses.
referencePose | A pose allowing to filter the resulting pose ids |
poses | Optional resulting poses, on pose for each id |
tThreadSafe | True, to call this function thread-safe |
tMatchPose | True, if the defined pose will match the values of the resulting poses; False, if the defined pose will not match the values of the resulting poses |
Indices32 Ocean::Tracking::Database::poseIds | ( | HomogenousMatrices4 * | world_T_cameras = nullptr | ) | const |
Returns the ids of all poses that are part of this database.
world_T_cameras | Optional resulting poses, one for each resulting pose id, nullptr if not of interest |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the number of poses of this database.
|
inline |
Returns all 6DOF poses which match a given reference pose or which do not match a given reference pose.
referencePose | A reference pose allowing to filter the resulting poses |
poseIds | Optional resulting ids of the resulting valid poses, on id for each valid pose |
tThreadSafe | True, to call this function thread-safe |
tMatchPose | True, if the defined pose will match the values of the resulting poses; False, if the defined pose will not match the values of the resulting poses |
|
inline |
Returns the 6DOF pose values for all specified pose ids.
poseIds | The ids of the poses for which the 6DOF values will be returned, each pose id must be valid and must exist |
size | The number of given pose ids |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns all 6DOF poses (valid or invalid) lying between a specified range of pose ids.
For unknown frame ids an invalid pose is provided.
lowerPoseId | The id (index) of the frame defining the lower border of camera poses which will be investigated |
upperPoseId | The id (index) of the frame defining the upper border of camera poses which will be investigated, with range [lowerFrame, infinity) |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns all poses which belong to a given object point.
objectPointId | The id of the object point for which the connected poses points are requested, must be valid |
tThreadSafe | True, to call this function thread-safe |
void Ocean::Tracking::Database::posesImagePoints | ( | const Index32 | objectPointId, |
HomogenousMatrices4 & | poses, | ||
Vectors2 & | imagePoints, | ||
const HomogenousMatrix4 & | referencePose = HomogenousMatrix4(false) , |
||
Indices32 * | poseIds = nullptr , |
||
Indices32 * | imagePointIds = nullptr , |
||
const Index32 | lowerPoseId = invalidId , |
||
const Index32 | upperPoseId = invalidId |
||
) | const |
Returns corresponding poses and image points for a given object point from the entire range of possible camera poses.
objectPointId | The id of the object point for which the poses and image points are requested |
poses | The resulting poses in which the object point is visible |
imagePoints | The resulting image points which are the projections of the object points, each image point corresponds with one pose |
referencePose | A pose allowing to filter the resulting poses so that either valid or invalid poses are found |
poseIds | Optional ids of the resulting poses |
imagePointIds | Optional ids of the resulting image points |
lowerPoseId | Optional pose id defining the lower pose id border, invalidId if no lower border is defined |
upperPoseId | Optional pose id defining the upper pose id border, invalidId if no upper border is defined |
tThreadSafe | True, to call this function thread-safe |
tMatchPose | True, if the defined pose will match the values of the resulting poses; False, if the defined pose will not match the values of the resulting poses |
|
inline |
Determines the pose id for which the database holds the least number of point correspondences (between e.g., valid or invalid object points and image points).
lowerPoseId | The id of the frame defining the lower border of the camera poses which will be investigated, with range [0, infinity) |
upperPoseId | The id of the frame defining the upper border of the camera poses which will be investigated, with range [lowerPoseId, infinity) |
poseId | Optional resulting id of the valid pose with least correspondences, with range [lowerPoseId, upperPoseId] |
correspondences | Optional resulting number of correspondences for the resulting pose |
referenceObjectPoint | A reference object point allowing to filter the correspondences to count |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the correspondences; False, if the defined position will not match the positions of the correspondences |
tNeedValidPose | True, if the pose must be valid so that the number of valid correspondences will be determined |
|
inline |
Determines the pose id for which the database holds the most number of point correspondences (between e.g., valid or invalid object points and image points).
lowerPoseId | The id of the frame defining the lower border of the camera poses which will be investigated, with range [0, infinity) |
upperPoseId | The id of the frame defining the upper border of the camera poses which will be investigated, with range [lowerPoseId, infinity) |
poseId | Optional resulting id of the valid pose with most correspondences, with range [lowerPoseId, upperPoseId] |
correspondences | Optional resulting number of correspondences for the resulting pose |
referenceObjectPoint | A reference object point allowing to filter the correspondences to count |
tThreadSafe | True, to call this function thread-safe |
tMatchPosition | True, if the defined position will match the positions of the correspondences; False, if the defined position will not match the positions of the correspondences |
tNeedValidPose | True, if the pose must be valid so that the number of valid correspondences will be determined |
|
inline |
Determines the pose id from a set of given pose id candidates for which the database holds the most observations from a set of given object point ids.
The major object point ids are the essential object point for which the most observations will be determined.
If more than one pose with the same number of most major object point observations can be determined the second set of object points (the minor object points) are used to identify the final pose with most observations.
poseCandidates | The ids of all poses from which the best pose is determined |
majorObjectPointIds | The ids of all major object points which are the essential object points for the resulting pose, at least one |
minorObjectPointIds | The ids of all minor object points |
poseId | The resulting id of the pose with most visible major object points (and minor object points, if more than two poses exist with same number of best visible major object points) |
visibleMajorObjectPointIds | Optional resulting ids of all major object points visible in the resulting pose |
visibleMinorObjectPointIds | Optional resulting ids of all minor object points visible in the resulting pose |
tThreadSafe | True, to call this function thread-safe |
|
inlinestatic |
Determines reliable object points from a set of given topology triples (by determining all object points with a minimal number of observations).
topologyTriples | The set of topology triples from which the reliable object points are determined |
minimalObservations | The minimal number of observations (the number of camera poses in which the object point is visible) an object point must have to count as reliable |
|
inline |
Removes an image point from this database.
Beware: The specified image point must exist in this database.
imagePointId | The id of the image point which will be removed, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Removes an object point from this database.
Beware: The specified object point must exist in this database.
objectPointId | The id of the object point which will be removed, must be valid |
tThreadSafe | True, to call this function thread-safe |
void Ocean::Tracking::Database::removeObjectPointAndAttachedImagePoints | ( | const Index32 | objectPointId | ) |
Removes an object point from this database and also removes all image points attached to the object point.
objectPointId | The id of the object point which will be removed, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Removes a pose from this database.
Beware: The specified pose must exist in this database.
poseId | The id of the pose which will be removed, must be valid |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Renames an object point, changes the id of the object point respectively.
Beware: Do not mix calls with the add-objectPoint-function creating the id on its own.
oldObjectPointId | The old (the current) id of the object point to be changed, must be valid |
newObjectPointId | The new id of the object point, must be valid, must not exist |
tThreadSafe | True, to call this function thread-safe |
void Ocean::Tracking::Database::reset | ( | const size_t | numberPoses, |
const Index32 * | poseIds, | ||
const HomogenousMatrixT4< T > * | poses, | ||
const size_t | numberObjectPoints, | ||
const Index32 * | objectPointIds, | ||
const VectorT3< T > * | objectPoints, | ||
const T * | objectPointPriorities, | ||
const size_t | numberImagePoints, | ||
const Index32 * | imagePointIds, | ||
const VectorT2< T > * | imagePoints, | ||
const Index32 * | topologyPoseIds, | ||
const Index32 * | topologyObjectPointIds | ||
) |
Resets this database with given poses, object points, image points, and topology.
numberPoses | The number of the provided poses, with range [0, infinity) |
poseIds | The ids of all poses, nullptr if 'numberPoses == 0' |
poses | The poses, one for each pose id, nullptr if 'numberPoses == 0' |
numberObjectPoints | The number of the provided object points, with range [0, infinity) |
objectPointIds | The ids of all object points, nullptr if 'numberObjectPoints == 0' |
objectPoints | The object points, one for each object point id, nullptr if 'numberObjectPoints == 0' |
objectPointPriorities | The priorities of the object points, one for each object point id, nullptr if 'numberObjectPoints == 0' |
numberImagePoints | The number of provided image points, with range [0, infinity) |
imagePointIds | The ids of all image points, nullptr if 'numberImagePoints == 0' |
imagePoints | The image points, one for each image point id, nullptr if 'numberImagePoints == 0' |
topologyPoseIds | The ids of the poses to which an image point belongs, one for each image point, 'invalidId' if unknown |
topologyObjectPointIds | The ids of all object points to which an image point belongs, one for each image point, 'invalidId' if unknown |
|
inline |
Resets the geometric information of this database for 3D object points and 6DOF camera poses.
However, the 2D image point locations are untouched.
referenceObjectPoint | The new object point value for each object point of this database |
referencePose | The new pose value for each pose of this database |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the 3DOF rotational part of the 6DOF pose values for all specified pose ids.
The camera motion of this database must be pure rotational so that the position of each camera pose is in the origin of the coordinate system.
poseIds | The ids of the poses for which the rotational values will be returned, each pose id must be valid and must exist |
size | The number of given pose ids |
tThreadSafe | True, to call this function thread-safe |
Returns the second 32 bit index of a 64 bit index.
index | The 64 bit index |
|
inline |
Sets (changes) an image point.
imagePointId | The id of the image point which will be changed, must be valid |
imagePoint | The new 2D position of the image point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) an object point without modifying the priority value of the object point.
objectPointId | The id of the object point which will be changed, must be valid |
objectPoint | The new 3D position of the object point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) an object point.
objectPointId | The id of the object point which will be changed, must be valid |
objectPoint | The new 3D position of the object point |
priority | The new priority value of the object point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) the priority value of an object point.
objectPointId | The id of the object point which priority value will be changed, must be valid |
priority | The priority value to be set |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) a set of object points without modifying the priority value of the object points.
All object points receive the same position e.g., an invalid object point position.
objectPointIds | The ids of the object points which will be changed, must all be valid |
number | The number of object points which will be updated |
referenceObjectPoint | The one unique object point position to set for each specified object point |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) a set of object points without modifying the priority value of the object points.
objectPointIds | The ids of the object points which will be changed, must all be valid |
objectPoints | The new 3D positions of the object points, one position for each object point id |
number | The number of object points which will be updated |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) all object points to one unique position without modifying the priority value of the object points.
objectPoint | The 3D position of all object points |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) a pose.
poseId | The id of the pose to be changed, must be valid |
pose | The new pose |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) all poses to one unique pose value.
pose | The pose value of all poses |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) a set of poses.
poseIds | The ids of the poses which will be changed, must all be valid |
poses | The new poses, one pose for each pose id |
number | The number of poses which will be updated |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Sets (changes) a set of poses.
poses | The poses to set, the indices of the pose correspond with the ids of the poses, each pose id must be valid |
tThreadSafe | True, to call this function thread-safe |
Database::TopologyTriples Ocean::Tracking::Database::topologyTriples | ( | const Indices32 & | poseIds | ) | const |
Returns topology triples with valid image points ids, object points ids and pose ids for a set of given pose ids.
poseIds | The ids of the camera pose for which the topology triples are requested. |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Returns the smallest id (the id of the lower frame border) and the largest id (the id of the upper frame border) with a valid pose (from all known poses in this database.
Beware: There may be frame ids with invalid poses in-between.
rangeLowerPoseId | Resulting id of the frame defining the lower border of the camera frames with valid pose |
rangeUpperPoseId | Resulting id of the frame defining the upper border of the camera frames with valid pose |
tThreadSafe | True, to call this function thread-safe |
|
inline |
Determines the pose id range (around a specified start frame) for which the database holds valid poses.
lowerPoseId | The id of the frame defining the lower border of the camera poses which will be investigated, with range [0, infinity) |
startPoseId | The id of the start frame / start pose, with range [lowerPoseId, upperPoseId] |
upperPoseId | The id of the frame defining the upper border of the camera poses which will be investigated, with range [startPoseId, infinity) |
rangeLowerPoseId | Resulting id of the first camera pose/camera frame with valid camera pose, with range [lowerPoseId, upperPoseId] |
rangeUpperPoseId | Resulting id of the last camera pose/camera frame with valid camera pose, with range [rangeLowerPoseId, upperPoseId] |
tThreadSafe | True, to call this function thread-safe |
|
protected |
The counter for unique image point ids.
|
protected |
The map mapping unique image points ids to image point data instances.
|
mutableprotected |
The lock for the entire database.
|
protected |
The counter for unique object point ids.
|
protected |
The map mapping unique object point ids to object point data instances.
|
protected |
The map mapping unique pose ids to pose data instances.
|
protected |
The map mapping a pair of pose id and object point id to image point ids.
|
protected |
The number of poses.
Definition of an invalid id.