MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
OpticalFlow.hpp File Reference

Sparse optical flow via Lucas-Kanade tracker. More...

#include "Features.hpp"
+ Include dependency graph for OpticalFlow.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MayaFlux::Kinesis::Vision::TrackResult
 Result for a single tracked point. More...
 

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
 
namespace  MayaFlux::Kinesis
 
namespace  MayaFlux::Kinesis::Vision
 

Functions

std::vector< TrackResultMayaFlux::Kinesis::Vision::track_keypoints (std::span< const float > prev_gray, std::span< const float > curr_gray, std::span< const float > grad_dx, std::span< const float > grad_dy, 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 using a pre-computed Sobel gradient of prev_gray.
 
std::vector< TrackResultMayaFlux::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.
 

Detailed Description

Sparse optical flow via Lucas-Kanade tracker.

Pure functions. No MayaFlux type dependencies.

Conventions

  • All inputs are single-channel normalised float in [0, 1]
  • w and h are pixel dimensions; caller ensures span size == w * h
  • Keypoint positions are normalised to [0, 1]
  • window_radius is the half-size of the tracking window in pixels
  • Points that fail to track are returned at their previous position with tracked = false
  • Parallelism handled internally via Parallel::par_unseq

Definition in file OpticalFlow.hpp.