Comments (12)
I'd like to request this feature as well.
In order to distinguish multiple cameras I generate symlinks like /dev/logitech
to /dev/video0
using /etc/udev/rules.d/
. With an integer device id I can't be sure which camera is which device after rebooting. A string would allow to open the Logitech camera explicitly.
from cv_camera.
Hi
It seems possible to use ~file parameter to set device file.
(I have not tested yet, just read the code)
Could you try ~file param?
from cv_camera.
Unfortunately, using the file
parameter yields an error:
cv camera open failed: file /dev/logitech cannot be opened.
from cv_camera.
thanks!
below link shows that nobody answers the question "how to open with device file path".
If you find the answer, please let me know!
from cv_camera.
Yes, I've also seen this post.
Don't you think one of the two answers might work in your case? If you follow the symbolic link /dev/logitech
and get the path of the actual device /dev/video42
, you might be able to extract the device id 42.
from cv_camera.
I really know what you want, why you want, because I also have experienced exactly same situation for several time.
My concern is
- Is it portable (at least, it should work on osx, possibly windows...)?
- I don't want to add dependencies like boost::filesystem, if possible.
Isn't it possible to use static video number using udev?
from cv_camera.
I totally understand your concerns.
I'll look into assigning static video numbers using udev, as you suggest. It can take some time, since it's currently not my main focus. I just found cv_camera, liked it for its nodelet functionality, but struggled with the device id and, thus, quickly voted for this feature request. :)
from cv_camera.
Hi,
It seems that the StackOverflow question linked earlier (here) has finally been answered, so this would resolve this issue.
from cv_camera.
from cv_camera.
I posted a PR on this issue #8
from cv_camera.
Thank you! Added some small comments. Could you fix them?
from cv_camera.
merged
from cv_camera.
Related Issues (20)
- Automatic rescaling camera matrix on different resolution HOT 1
- Changing resolution (and other params) with dynamic_reconfigure HOT 2
- The current version does not support setting up focus parameters HOT 1
- ‘CAP_V4L’ is not a member of ‘cv’ in cap_.open(device_path, cv::CAP_V4L); HOT 3
- ‘CAP_V4L’ is not a member of ‘cv’ HOT 1
- How to set camera to MJPG?
- [ERROR] [1533077476.693028660]: cv camera open failed: device_id0 cannot be opened HOT 7
- Camera Support
- ROS2 support HOT 5
- cv_camera from file HOT 1
- VIDIOC_DQBUF: No such device error
- Build fails Opencv4 HOT 2
- Build issue Raspberry Pi4 HOT 2
- Failing to set image width HOT 5
- Image is wrongly formed error.
- Running warning and suggestions on grabing image
- [ERROR] [1623689901.478565848]: cv camera open failed: device_id0 cannot be opened HOT 3
- File infinite loop
- camera calibration result
- Unable to change the node execution rate
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 cv_camera.