From 4d690efdebead9dd9449feecb4aa11318bf5fba6 Mon Sep 17 00:00:00 2001 From: senselessdev1 Date: Wed, 5 Oct 2022 22:45:03 -0400 Subject: [PATCH] add docimentation for Keypoints class --- gtsam/sfm/DsfTrackGenerator.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/gtsam/sfm/DsfTrackGenerator.h b/gtsam/sfm/DsfTrackGenerator.h index b65a4fad6..05ad61390 100644 --- a/gtsam/sfm/DsfTrackGenerator.h +++ b/gtsam/sfm/DsfTrackGenerator.h @@ -37,17 +37,27 @@ typedef Eigen::MatrixX2i CorrespondenceIndices; // N x 2 array using KeypointCoordinates = Eigen::MatrixX2d; +// Output of detections in an image. +// Coordinate system convention: +// 1. The x coordinate denotes the horizontal direction (+ve direction towards the right). +// 2. The y coordinate denotes the vertical direction (+ve direction downwards). +// 3. Origin is at the top left corner of the image. struct Keypoints { + + // The (x, y) coordinates of the features, of shape Nx2. KeypointCoordinates coordinates; - // typedef'd for Eigen::VectorXd + + // Optional scale of the detections, of shape N. + // Note: gtsam::Vector is typedef'd for Eigen::VectorXd. boost::optional scales; + + /// Optional confidences/responses for each detection, of shape N. boost::optional responses; Keypoints(const gtsam::KeypointCoordinates& coordinates): coordinates(coordinates) {}; // boost::none }; using KeypointsList = std::vector; -using KeypointsVector = std::vector; // TODO(johnwlambert): prefer KeypointsSet? // Mapping from each image pair to (N,2) array representing indices of matching keypoints. using MatchIndicesMap = std::map;