I am trying to calibrate my fisheye camera using the cv::fisheye::calibrate fucntion. However, I get the following error while trying to compile.
`undefined reference to 'cv::fisheye::calibrate(cv::_InputArray const&, cv::_InputArray const&, cv::Size_<int> const&, cv::_InputOutputArray const&, cv::_InputOutputArray const&, cv::_OutputArray const&, cv::_OutputArray const&, int, cv::TermCriteria)'`
I have included the following headers
#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/features2d/features2d.hpp"
My CMakeLists contains OpenCV2 and my ROS node is also linked with OpenCV
find_package(OpenCV 2 REQUIRED)
add_executable(cam_features src/main.cpp)
target_link_libraries(cam_features ${catkin_LIBRARIES} ${OpenCV_LIBS} ${Eigen_LIBRARIES})
I am not sure where am I going wrong. Can someone point out the probable mistake? Thanks in advance.