Go to the documentation of this file.
84 std::vector<size_t> cameraIndices;
88 auto i = std::adjacent_find(cameraIndices.begin(), cameraIndices.end());
89 bool all_cameras_unique = (
i == cameraIndices.end());
90 return all_cameras_unique;
99 Eigen::MatrixX2d
m(numberMeasurements(), 2);
100 for (
size_t i = 0;
i < numberMeasurements();
i++) {
108 Eigen::VectorXi
v(numberMeasurements());
109 for (
size_t i = 0;
i < numberMeasurements();
i++) {
132 :
p(0, 0, 0), r(r),
g(
g),
b(
b) {}
153 void print(
const std::string&
s =
"")
const;
162 #if GTSAM_ENABLE_BOOST_SERIALIZATION
164 friend class boost::serialization::access;
165 template <
class ARCHIVE>
166 void serialize(ARCHIVE& ar,
const unsigned int ) {
167 ar& BOOST_SERIALIZATION_NVP(
p);
168 ar& BOOST_SERIALIZATION_NVP(r);
169 ar& BOOST_SERIALIZATION_NVP(
g);
170 ar& BOOST_SERIALIZATION_NVP(
b);
172 ar& BOOST_SERIALIZATION_NVP(siftIndices);
178 template <
typename T>
const SfmMeasurement & measurement(size_t idx) const
Get the measurement (camera index, Point2) at pose index idx
const SiftIndex & siftIndex(size_t idx) const
Get the SIFT feature index corresponding to the measurement at idx
void addMeasurement(size_t idx, const gtsam::Point2 &m)
Add measurement (camera_idx, Point2) to track.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::vector< SfmTrack2d > SfmTrack2dVector
std::vector< SfmMeasurement > measurements
The 2D image projections (id,(u,v))
SfmTrack(const gtsam::Point3 &pt, float r=0, float g=0, float b=0)
static const Point3 pt(1.0, 2.0, 3.0)
Track containing 2D measurements associated with a single 3D point. Note: Equivalent to gtsam....
SfmTrack2d(const std::vector< SfmMeasurement > &measurements)
Eigen::VectorXi indexVector() const
Return the camera indices of the measurements.
SfmTrack(float r=0, float g=0, float b=0)
Point3 rgb() const
Get RGB values describing 3d point.
void print(const Matrix &A, const string &s, ostream &stream)
std::pair< size_t, size_t > SiftIndex
Sift index for SfmTrack.
const Point3 & point3() const
Get 3D point.
void g(const string &key, int i)
std::vector< double > measurements
Eigen::MatrixX2d measurementMatrix() const
Return the measurements as a 2D matrix.
std::vector< SiftIndex > siftIndices
The feature descriptors (optional)
bool hasUniqueCameras() const
Check that no two measurements are from the same camera.
Array< int, Dynamic, 1 > v
Point3 p
3D position of the point
size_t numberMeasurements() const
Total number of measurements in this track.
static Point2 measurement(323.0, 240.0)
std::pair< size_t, Point2 > SfmMeasurement
A measurement with its camera index.
gtsam
Author(s):
autogenerated on Wed May 28 2025 03:03:10