Comments (6)
Hello, I'm the original author of the package. When I wrote this package I was guided by the OpenCV API docs to believe that OpenCV supported opening a video provider by two (necessarily different) calls:
- Capture with an index (int) for video devices
- Capture with a filename (string) for streams and video files
When reading the actual source code of that method:
https://github.com/opencv/opencv/blob/1acadd363b0d0ffcdabac8af3196cb65bef426b1/modules/videoio/src/cap.cpp
It 'seems' like the string method should be able to deal with a path being a video device... when I tried, it didn't work for me. So I ended up having that way of differentiating if it's a video device just getting the number of the device. I see that it works for you! Maybe it's based on the backend that OpenCV is using? At the time I wrote it for OpenCV 2.X.Y... I don't really know.
In your case, the only thing I can recommend, is to find which index device makes the program find your camera. If you have no other cameras, it will be 0 most probably. The launchfile just needs the number, e.g. 0, as in the example launchfile.
Good luck! I hope it's useful for you.
from video_stream_opencv.
Gotcha, that makes sense. The path as a video device seems to work well for me. Getting the number does work, but those numbers are not stable, correct? By using a path using either video for linux or udev you can guarantee that you always get the device you want.
from video_stream_opencv.
@mjsobrep Hey, just wanted to give a heads up here. I haven't been very active as I'm pretty busy finishing writing my PhD dissertation, I hope @furushchev has a moment to also review your PR. Otherwise, I'll probably test and merge your PR when I have a bit of time off... worst case in a month probably. I think your PR will fix the issue you report here in a very nice way.
Thanks again for bringing this up and providing a simple and beautiful fix.
from video_stream_opencv.
@awesomebytes Thanks for the heads up. Good luck on the dissertation!
from video_stream_opencv.
@mjsobrep Thank you very much for contribution. The issue is now solved on #60 being merged.
from video_stream_opencv.
Sure thing. Glad to help
from video_stream_opencv.
Related Issues (20)
- missing calibration and camera_model yaml param not read HOT 3
- Opened the stream, starting to publish but no image output HOT 2
- Install with ROS HOT 2
- Image not retrieved when using simulation time
- Invalid stop/start_frame.
- Published Video Has No Sound HOT 6
- Change jpeg quality HOT 2
- Publishing from a gimble camera HOT 5
- Multi-rtsp video streaming release HOT 1
- Invalid video_stream_provider
- Stream multiple videos
- video_stream_opencv fails to publish HOT 1
- ros2 support HOT 1
- Feature Request: switch between UDP and TCP Mode HOT 1
- Multiple camera support?
- Dynamic Reconfiguration Does not Work HOT 1
- Docker Error Could not capture frame on Ubuntu 18.04 HOT 12
- The camera images turned permanently grey and black HOT 6
- Strange errors consuming RTSP h264 stream HOT 1
- Unable to force image width HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from video_stream_opencv.