From 758ece7238db0e29c7b249c23a3dd4dcff7140eb Mon Sep 17 00:00:00 2001 From: John Lambert Date: Wed, 6 Jan 2021 15:48:49 -0500 Subject: [PATCH] add getter for rgb --- gtsam/slam/dataset.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtsam/slam/dataset.h b/gtsam/slam/dataset.h index 00e3516d0..5730487ce 100644 --- a/gtsam/slam/dataset.h +++ b/gtsam/slam/dataset.h @@ -225,6 +225,9 @@ struct SfmTrack { float r, g, b; ///< RGB color of the 3D point std::vector measurements; ///< The 2D image projections (id,(u,v)) std::vector siftIndices; + + /// Get RGB values describing 3d point + Point3 rgb() const { return Point3(r, g, b); } /// Total number of measurements in this track size_t number_measurements() const {