'CAP_V4L' is not a member of 'cv'

asked 2017-10-25 13:48:09 -0600

BhanuKiran.Chaluvadi gravatar image


I am Using ROS-indigo on Ubuntu -14.04 (my desktop doesn't have camera). While build a package named cv_camera an error occurred

capture.cpp:74:26: error: ‘CAP_V4L’ is not a member of ‘cv’

cap_.open(device_path, cv::CAP_V4L);

Not sure how to get around this. Any help would be greatly appreciated.

edit retag flag offensive close merge delete


Hey I am sorry if its unrelated. However, if your aim is to use a ROS driver to publish images, you can use usb_cam package [ https://github.com/ros-drivers/usb_cam ]. You may have to change the launch file a bit. https://answers.ros.org/question/2279...

aaditya_saraiya gravatar image aaditya_saraiya  ( 2017-10-26 04:54:10 -0600 )edit

Looking quickly into it, I believe that CAP_V4L is the name of this parameter associated with the old OpenCV API. CAn you try using CV_CAP_V4L ? By the way, this is clearly an OpenCV issue. Have you tried to run this code outside ROS ?

TTDM gravatar image TTDM  ( 2017-10-26 05:04:10 -0600 )edit