UEye camera not detected with VideoCapture

I am pretty stuck in a problem with my uEye camera. Using my laptop camera (id 0) or usb internet camera (id 1), this line works fine: TheVideoCapturer.open (1); (TheVideoCapturer has the VideoCapture class, OpenCV).

Unfortunately, when I try to do the same with my uEye camera, it cannot find it. I checked the camera ID in ueyecameramanager, and this is 1. Or 35, in some kind of expert mode. I would like to use it just like I used the cameras mentioned above.

I have drivers because, well, the ueyecameramanager works and gives me some thread, and the ROS node ueye_cam works fine.

Any advice would be appreciated.

+1
source share
1 answer

Even if you probably already understood this, as far as I know, you cannot directly use VideoCapture with uEye cameras. You must use your own SDK to access the video stream (or take one snapshot, depending on your case). After that, you can use memcpy () to copy the memory pointed to by the void pointer filled with : GetImageMem (...) for the Mat object (cv :: Mat :: PTR ()). If you look close enough that the ROS node for uEye really uses the functions provided by the uEye SDK for installing and accessing the camera, ROS also has its own image format, so an interface (called cv_bridge ) for converting ROS images to OpenCV images is implemented. All in all, this is a funny salad of copying and transforming data, but since you currently have little choice.

+2
source

Source: https://habr.com/ru/post/1259636/


All Articles