|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
| MAYAFLUX_API std::vector< TrackResult > MayaFlux::Kinesis::Vision::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 = 7, |
||
| uint32_t | max_iterations = 20, |
||
| float | eigen_threshold = 1e-4F, |
||
| float | error_threshold = 0.3F |
||
| ) |
Track keypoints from prev_gray to curr_gray via Lucas-Kanade.
For each input point, solves the Lucas-Kanade optical flow equation within a window_radius x window_radius patch using iterative Newton-Raphson refinement. Iteration stops when the displacement update falls below 0.03 pixels or max_iterations is reached.
A point is marked tracked=false if:
prev_points and the returned vector have the same length and order. Callers should discard points where tracked == false before passing to subsequent frames.
| prev_gray | Previous frame, single-channel float, size w * h. |
| curr_gray | Current frame, single-channel float, size w * h. |
| w | Image width in pixels. |
| h | Image height in pixels. |
| prev_points | Points to track in normalised [0, 1] coordinates. |
| window_radius | Half-size of the tracking patch in pixels. |
| max_iterations | Maximum Newton-Raphson iterations per point. |
| eigen_threshold | Minimum eigenvalue for structure tensor validity. |
| error_threshold | Maximum residual error to accept a track. |
Definition at line 171 of file OpticalFlow.cpp.
References h, sobel(), and track_keypoints().
Referenced by MayaFlux::Kinesis::Vision::VisionExecutor::run(), and track_keypoints().
Here is the call graph for this function:
Here is the caller graph for this function: