相关疑难解决方法(0)

使用光流进行OpenCV跟踪

我使用它作为我的跟踪算法的基础.

    //1. detect the features
    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. track features
    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
Run Code Online (Sandbox Code Playgroud)

cv::calcOpticalFlowPyrLK将前一图像中的点矢量作为输入,并在下一图像上返回适当的点.假设我在前一个图像上有随机像素(x,y),如何使用OpenCV光流功能计算下一个图像上该像素的位置?

c++ opencv tracking computer-vision

18
推荐指数
1
解决办法
5万
查看次数

标签 统计

c++ ×1

computer-vision ×1

opencv ×1

tracking ×1