Search code examples
c++opencvundeclared-identifier

cvCalcOpticalFlowHS not being recognised C++


I've recently installed OpenCV and everything so far has been working, but for some reason even if I include: cv.h, highgui.h I get this error when I want to use the function:

 cvCalcOpticalFlowHS: error C2065: 'cvCalcOpticalFlowHS' : undeclared identifier.

I've tried to look up which header file needs to be included, but I've had no succes so far.


Solution

  • Do

    #include "opencv2/legacy/legacy.hpp"