【发布时间】:2017-12-16 09:40:45
【问题描述】:
我有一个 opencv 项目,到目前为止一切正常,直到我今天尝试重建我的代码:我收到以下错误:
undefined reference to `cv::KalmanFilter::KalmanFilter(int, int, int, int)'
undefined reference to `cv::imshow(cv::String const&, cv::_InputArray const&)'
undefined reference to `cv::waitKey(int)'
我不确定为什么会出现这个错误,我只能假设它可能与我运行 sudo apt-get autoremove 或 sudo apt-get upgrade 的事实有关。我之前唯一做的另一件事是安装 arduino。
我不知道为什么会出现这个错误,因为我一直能够编译到今天。
卡尔曼滤波器的opencv包含是否已更改?以下是我包含的片段:
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/video/video.hpp> //for kalman filter
//Include headers for OpenCV GUI handling
#include <opencv2/highgui/highgui.hpp>
在我的 CMakeLists.txt 中:
add_compile_options(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
cv_bridge
)
include_directories(
${OpenCV_INCLUDE_DIRS}
${OpenCV_LIB_COMPONENTS}
${OpenCV_LIBRARIES}
我正在运行 opencv 3.3.1。
【问题讨论】:
标签: cmake opencv3.0 kalman-filter