68 std::span<const float> prev_gray,
69 std::span<const float> curr_gray,
70 uint32_t w, uint32_t
h,
71 std::span<const glm::vec2> prev_points,
72 uint32_t window_radius = 7,
73 uint32_t max_iterations = 20,
74 float eigen_threshold = 1e-4F,
75 float error_threshold = 0.3F,
76 float forward_backward_threshold = 0.0F);
101 std::span<const float> prev_gray,
102 std::span<const float> curr_gray,
103 std::span<const float> grad_dx,
104 std::span<const float> grad_dy,
105 uint32_t w, uint32_t
h,
106 std::span<const glm::vec2> prev_points,
107 uint32_t window_radius = 7,
108 uint32_t max_iterations = 20,
109 float eigen_threshold = 1e-4F,
110 float error_threshold = 0.3F,
111 float forward_backward_threshold = 0.0F);
std::vector< TrackResult > track_keypoints(std::span< const float > prev_gray, std::span< const float > curr_gray, uint32_t w, uint32_t h, std::span< const glm::vec2 > prev_points, uint32_t window_radius, uint32_t max_iterations, float eigen_threshold, float error_threshold, float forward_backward_threshold)
Track keypoints from prev_gray to curr_gray via Lucas-Kanade.
uint32_t age
Frames the track was successfully followed before this one.
glm::vec2 previous
Position of the point in the previous frame, normalised [0, 1].
float error
Residual photometric error after convergence.
bool tracked
False if tracking failed or diverged.
glm::vec2 position
Tracked position in normalised [0, 1] coordinates.
Result for a single tracked point.