我使用以下函数作为跟踪算法的基础。
//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 errorcv::calcOpticalFlowPyrLK将上一幅图像中的点向量作为输入,并在下一幅图像上返回适当的点。假设我想计算每个像素的光学流,而不是好的特性。
另一方面,开始计算从(1,1)到(m,n)的光流。
发布于 2014-01-05 14:29:27
简历:calcOpticalFlowPyrLK做稀疏的,从特征点,如果你想要它为每个像素,使用
calcOpticalFlowFarneback。
计算密集光流(使用的算法)。
https://stackoverflow.com/questions/20933872
复制相似问题