undefined reference to `cv::calcOpticalFlowFarnebackcalcOpticalFlowFarneback

When I want to call calcOpticalFlowFarneback( ) to caculate the dense optical flow, then the compiler show me an error: 

undefined reference to `cv::calcOpticalFlowFarneback. The reason for this error is project not include related libraries(for this case, include the video module, so need include

opencv_video ).

My solution for this: at first include opencv.hpp in the io.hpp:

#include <opencv2/opencv.hpp>

And also I need modify the MakeFile, at there(add the red part!):

LIBRARIES += pthread \
glog gflags protobuf leveldb snappy \
lmdb \
boost_system \
hdf5_hl hdf5 \
opencv_core opencv_highgui opencv_imgproc opencv_gpu opencv_video opencv_objdetect


Ok, let's re-compile the project we will find that there no error occurs!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值