Download cppadaptbytetrack/include/GlobalMotionCompensation.h from linhmv/VisualMOT: direct link, hf CLI and curl.
- Browser
- Download file 1.34 kB
-
https://huggingface.co/datasets/linhmv/VisualMOT/resolve/main/cppadaptbytetrack/include/GlobalMotionCompensation.h
- Command line
-
hf download hf://datasets/linhmv/VisualMOT/cppadaptbytetrack/include/GlobalMotionCompensation.h
-
curl -L -o GlobalMotionCompensation.h https://huggingface.co/datasets/linhmv/VisualMOT/resolve/main/cppadaptbytetrack/include/GlobalMotionCompensation.h
1.34 kB
| /** | |
| * @brief A class for performing global motion compensation on video frames. Affine Motion Estimation or Affine Global Motion Estimation using Sparse Optical Flow | |
| * | |
| * This class is designed to estimate and compensate for global motion (e.g., camera motion) between consecutive video frames. | |
| * It tracks keypoints from a previous frame and applies motion compensation to align the current frame, useful in video stabilization | |
| * or tracking applications. | |
| */ | |
| class GlobalMotionCompensation { | |
| private: | |
| cv::Mat _prev_frame; // Stores the previous video frame for motion estimation. | |
| std::vector <cv::KeyPoint> _prev_keypoints; // Stores keypoints detected in the previous frame. | |
| bool _first_frame_initialized = false; // Indicates whether the first frame has been initialized. | |
| float _downscale = 1.0; // Default value indicating no downscaling, preserving original frame resolution for full-detail processing. | |
| public: | |
| GlobalMotionCompensation() = default; | |
| ~GlobalMotionCompensation(); | |
| Eigen::MatrixXf apply(const cv::Mat &frame_raw); | |
| }; |