#include<opencv2/opencv.hpp>
#include<iostream>
using namespace cv;
using namespace std;
Mat frame, gray;
Mat pre_frame, pre_gray;
vector<Point2f>features;//Tomas角点检测特征点
vector<Point2f>inpoints;//初始化特征点数据
vector<Point2f>fpts[2];//保持当前帧和前一帧特征点位置
vector<uchar> status;//特征点各跟踪成功标志位
vector<float> errors;// 跟踪时候区域误差和
void detectcorner(Mat &inframe,Mat &ingray);//角点检测
void drawcorner(Mat &inframe);//角点显示
void track();//角点跟踪
void drawtracklines();
int main(int argc, char ** argv)
{
VideoCapture capture;
capture.open(0);
if (!capture.isOpened())
{
printf("can not open ......\n");
return -1;
}
namedWindow("output", WINDOW_AUTOSIZE);