0
我使用以下函数作为我的跟踪算法的基础。找到每个像素的光流opencv
// 1。检测功能 我的意思,这个函数提取的唯一好等特点,
cv::goodFeaturesToTrack(gray_prev, // the image
features, // the output detected features
max_count, // the maximum number of features
qlevel, // quality level
minDist); // min distance between two features
// 2.跟踪功能
cv::calcOpticalFlowPyrLK(
gray_prev, gray, // 2 consecutive images
points_prev, // input point positions in first im
points_cur, // output point positions in the 2nd
status, // tracking success
err); // tracking error
cv::calcOpticalFlowPyrLK
需要从以前的图像点向量作为输入,并返回下一张照片上的适当点。 假设我要计算每个pixle代替良好特征
的opical流,开始计算从(1,1)到(M,N)
[Opencv跟踪使用光流]的可能的副本(http://stackoverflow.com/questions/9701276/opencv-tracking-using-optical-flow) –
@RogerRowland不,这个问题是不一样的。 –
我也可以提出这个建议吗?它被称为相位相关:http://stackoverflow.com/questions/16718241/lucas-kanade-dense-optical-flow/21007222#21007222 –