123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #ifndef OPENCV_VIDEOSTAB_RING_BUFFER_HPP
- #define OPENCV_VIDEOSTAB_RING_BUFFER_HPP
- #include <vector>
- #include "opencv2/imgproc.hpp"
- namespace cv
- {
- namespace videostab
- {
- template <typename T> inline T& at(int idx, std::vector<T> &items)
- {
- return items[cv::borderInterpolate(idx, static_cast<int>(items.size()), cv::BORDER_WRAP)];
- }
- template <typename T> inline const T& at(int idx, const std::vector<T> &items)
- {
- return items[cv::borderInterpolate(idx, static_cast<int>(items.size()), cv::BORDER_WRAP)];
- }
- }
- }
- #endif
|