How to use cv namespace

asked 2018-07-26 20:53:34 -0600

Pujie gravatar image

I git clone a project multiple-object-tracking-lidar. I run the installation steps on openCV and I have also make the cv_bridge. The source code uses cv namespace, but the catkin_make still doesn't support. Here are the errs:

catkin_ws/src/multiple-object-tracking-lidar/src/main.cpp:356:28: error: no match for ‘operator*’ (operand type is ‘cv::MatCommaInitializer_<float>’)

catkin_ws/src/multiple-object-tracking-lidar/src/main.cpp:357:28: error: no match for ‘operator*’ (operand type is ‘cv::MatCommaInitializer_<float>’)

Here are the cmakelist.txt

cmake_minimum_required(VERSION 2.8.3)
project(kf_tracker)

set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")

find_package(catkin REQUIRED COMPONENTS
  pcl_ros
  roscpp
  sensor_msgs
)
find_package( OpenCV REQUIRED )

catkin_package(

)

include_directories(
  ${catkin_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
  include
)
add_executable( tracker src/main.cpp )
target_link_libraries ( tracker ${OpenCV_LIBRARIES} ${catkin_LIBRARIES})

What should I do to configure the problem? Or which step I may make mistakes?

Thank you!

edit retag flag offensive close merge delete

Comments

Is it because my environment is opencv3 rather 2.xx ?

Pujie gravatar imagePujie ( 2018-07-26 21:04:45 -0600 )edit