Open zxp771 opened 6 years ago
It is /dev/video2 id=1, the id=1 is important. Please take a look at the aero-optical-flow code(V4L2), you can check how to open the camera using V4L2 APIs and then try to use other libraries that will call V4L2 APIs for you.
@zehortigoza Hi Thanks for your help. Do you mean the /capturev4l2/capture.cpp?
@zehortigoza Thanks for your help. Do I need install other libraries for V4L2?
Not sure if your distro has, but you need the V4L2 headers to compile the application.
@zehortigoza Thanks for your help. I will try these code but I'm not very familiar with V4L2. please do not close this issue very soon. Thanks
I'm trying to implement an visual odometry algorithm on the RTF drone(ubuntu16.04). I meet some problem when I try to access the bottom camera(global shutter) with Opencv API like this:
void BenchmarkNode::runFromFolder() {
}
but when I want to start the test it will occur this error: [INFO] SVO initialized HIGHGUI ERROR: libv4l unable to ioctl S_FMT Floating point exception (core dumped)
Here is the camera list. as the list shows I think the bottom camera should be 2.![screenshot from 2018-06-13 11-25-09](https://user-images.githubusercontent.com/35118859/41361542-491f15fe-6efd-11e8-8be3-cfa5cf3fea74.png)
I also tried to use: cv::VideoCapture cap; if(!cap.open("/dev/video2")) std::cout<<"camera error"<<std::endl; to get the video stream.but it will occur this error when i run the program.
GStreamer Plugin: Embedded video playback halted; module source reported: Could not read from resource. OpenCV Error: Unspecified error (GStreamer: unable to start pipeline ) in cvCaptureFromCAM_GStreamer, file /home/aero/opencv-2.4.13.6/modules/highgui/src/cap_gstreamer.cpp, line 816 terminate called after throwing an instance of 'cv::Exception' what(): /home/aero/opencv-2.4.13.6/modules/highgui/src/cap_gstreamer.cpp:816: error: (-2) GStreamer: unable to start pipeline in function cvCaptureFromCAM_GStreamer
Aborted (core dumped)