ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

error opencv2/imgcodecs.hpp

asked 2016-01-27 12:40:41 -0500

g.sart gravatar image

updated 2016-01-27 13:08:22 -0500

trying to get ros working.. im trying this tutorial

now it crashs with following error:

error: opencv2/imgcodecs.hpp: No such file or directory

pi@raspberrypi ~/ros_catkin_ws $ cd /home/pi/ros_catkin_ws/build_isolated/compressed_depth_image_transport && /opt/ros/indigo/ make -j4 -l4 [100%] Built target compressed_depth_image_transport_gencfg [100%] Building CXX object CMakeFiles/compressed_depth_image_transport.dir/src/codec.cpp.o /home/pi/ros_catkin_ws/src/image_transport_plugins/compressed_depth_image_transport/src/codec.cpp:49:33: fatal error: opencv2/imgcodecs.hpp: No such file or directory compilation terminated. CMakeFiles/compressed_depth_image_transport.dir/build.make:123: recipe for target 'CMakeFiles/compressed_depth_image_transport.dir/src/codec.cpp.o' failed make[2]: * [CMakeFiles/compressed_depth_image_transport.dir/src/codec.cpp.o] Error 1 CMakeFiles/Makefile2:122: recipe for target 'CMakeFiles/compressed_depth_image_transport.dir/all' failed make[1]: [CMakeFiles/compressed_depth_image_transport.dir/all] Error 2 Makefile:123: recipe for target 'all' failed make: ** [all] Error 2

can anyone help please?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-06-20 07:30:19 -0500

ghanimmukhtar gravatar image

It depends on your version of opencv, this header is meant, i think, for opencv version 3.0 and higher, for example I had this problem when I was trying to follow this tutorial because my opencv is version 2.4.8 so i simply delete this inclusion and the error disappear.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-01-27 12:40:41 -0500

Seen: 4,063 times

Last updated: Jun 20 '16