@@ -31,36 +31,97 @@ class Observation
3131 _scale(scale_)
3232 {}
3333
34+ /* *
35+ * @brief Comparison operator
36+ * @return true if both featureId and coordinates are equal in both observations
37+ */
3438 bool operator ==(const Observation& other) const ;
3539
40+ /* *
41+ * @brief Return the coordinates of the observation in pixels
42+ * @return The coordinates in pixels
43+ */
3644 const Vec2& getCoordinates () const { return _coordinates; }
3745
46+ /* *
47+ * @brief Return the coordinates of the observation in pixels
48+ * @return The coordinates in pixels
49+ */
3850 Vec2& getCoordinates () { return _coordinates; }
3951
52+ /* *
53+ * @brief Return the X coordinate of the observation in pixels
54+ * @return The column coordinates in pixels
55+ */
4056 double getX () const { return _coordinates.x (); }
4157
58+ /* *
59+ * @brief Return the Y coordinate of the observation in pixels
60+ * @return The row coordinates in pixels
61+ */
4262 double getY () const { return _coordinates.y (); }
4363
64+ /* *
65+ * @brief Set the image coordinates of the observation
66+ * @param coordinates the 2d vector with pixel coordinates
67+ */
4468 void setCoordinates (const Vec2& coordinates) { _coordinates = coordinates; }
4569
70+ /* *
71+ * @brief Set the image coordinates of the observation
72+ * @param x the x coordinates in the image (column)
73+ * @param y the x coordinates in the image (row)
74+ */
4675 void setCoordinates (double x, double y)
4776 {
4877 _coordinates (0 ) = x;
4978 _coordinates (1 ) = y;
5079 }
5180
81+ /* *
82+ * @brief An observation should be associated to a feature. This is the id of the feature.
83+ * @return featureId an id of the feature (view specific)
84+ */
5285 IndexT getFeatureId () const { return _idFeature; }
5386
87+ /* *
88+ * @brief An observation should be associated to a feature. This is the id of the feature.
89+ * @param featureId an id of the feature (view specific)
90+ */
5491 void setFeatureId (IndexT featureId) { _idFeature = featureId; }
5592
93+ /* *
94+ * @brief Get the measured scale of the feature (Scale of the source image)
95+ * @return the scale by which the image has been zoomed or 0 if unknown
96+ */
5697 double getScale () const { return _scale; }
5798
99+ /* *
100+ * @brief Set the measured scale of the feature (Scale of the source image)
101+ * @param scale the scale by which the image has been zoomed or 0 if unknown
102+ */
58103 void setScale (double scale) { _scale = scale; }
59104
105+ /* *
106+ * @brief Get the measured depth (Depth meaning is camera type dependent)
107+ * @return The optional measured depth, or less than 0 if non used
108+ */
109+ double getDepth () const { return _depth; }
110+
111+ /* *
112+ * @brief Set the measured point depth (Depth meaning is camera type dependent)
113+ * @param depth the point depth
114+ */
115+ void setDepth (double depth) { _depth = depth; }
116+
117+
60118 private:
61119 Vec2 _coordinates = { 0.0 , 0.0 };
62120 IndexT _idFeature = UndefinedIndexT;
63121 double _scale = 0.0 ;
122+
123+ // Optional measured 'depth'
124+ double _depth = -1.0 ;
64125};
65126
66127// / Observations are indexed by their View_id
0 commit comments