Enable OpenCV4 compability
This commit is contained in:
@@ -23,6 +23,9 @@
|
||||
*/
|
||||
|
||||
#include "MeasureOpticalFlowDualTVL1.h"
|
||||
#if CV_MAJOR_VERSION >= 4
|
||||
#include <opencv2/optflow.hpp>
|
||||
#endif
|
||||
|
||||
using cv::Mat;
|
||||
using cv::Mat_;
|
||||
@@ -61,7 +64,11 @@ bool MeasureOpticalFlowDualTVL1::create( std::vector<CalypFrame*> apcFrameList )
|
||||
return false;
|
||||
|
||||
m_iStep = 16;
|
||||
#if CV_MAJOR_VERSION >= 4
|
||||
m_cTvl1 = cv::optflow::createOptFlow_DualTVL1();
|
||||
#else
|
||||
m_cTvl1 = cv::createOptFlow_DualTVL1();
|
||||
#endif
|
||||
m_pcOutputFrame = new CalypFrame( apcFrameList[0]->getWidth(), apcFrameList[0]->getHeight(), CLP_GRAY );
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user