Ask Your Question

Revision history [back]

Okay steps are simple

  • Go to http://docs.opencv.org/
  • Hit the OpenCV version you use, but the top one should be your choice by default
  • Add calcOpticalFlowFarneback inside the search box at the top right of the page
  • Hit enter and click on one of the search results
  • Scroll to the top of the page, which states which module should contain this
  • Now go to the corresponding module, in this case, it is the Object Tracking part of the video analysis module which can be found here.
  • So include should be #include "opencv2/video.hpp"

Okay steps are simple

  • Go to http://docs.opencv.org/
  • Hit the OpenCV version you use, but the top one should be your choice by default
  • Add calcOpticalFlowFarneback inside the search box at the top right of the page
  • Hit enter and click on one of the search results
  • Scroll to the top of the page, which states which module should contain this
  • Now go to the corresponding module, in this case, it is the Object Tracking part of the video analysis module which can be found here.
  • So include should be #include "opencv2/video.hpp"

Or if you really only want the tracking part, you can go for #include "opencv2/video/tracking.hpp" which will allow you to use those functions but not the background foreground segmentation functionality.