OpenCV稀疏光流应用在运动目标追踪
发布时间
阅读量:
阅读量
#include <opencv2/video/video.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include <iostream>
#include <cstdio>
using namespace std;
using namespace cv;
//当前帧图片
Mat frame, gray;
//前一帧图片
Mat prev_frame, prev_gray;
//保存特征点
vector<Point2f> features;
//初始化特征点
vector<Point2f> inPoints;
//当前帧和前一帧的点
vector<Point2f> fpts[2];
//特征点跟踪标志位
vector<uchar> status;
//误差和
vector<float> err;
//角点检测
全部评论 (0)
还没有任何评论哟~
