MCPcopy Create free account
hub / github.com/93won/360_visual_inertial_odometry / GetFeatureIndexInFrame

Method GetFeatureIndexInFrame

src/database/MapPoint.cpp:108–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108int MapPoint::GetFeatureIndexInFrame(std::shared_ptr<Frame> frame) const {
109 std::lock_guard<std::mutex> lock(m_mutex);
110
111 if (!frame) return -1;
112
113 for (const auto& obs : m_observations) {
114 if (auto obs_frame = obs.frame.lock()) {
115 if (obs_frame == frame) {
116 return obs.feature_index;
117 }
118 }
119 }
120 return -1;
121}
122
123float MapPoint::GetDepthInFrame(std::shared_ptr<Frame> frame) const {
124 if (!frame) return -1.0f;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected