How to read from the simulation's camera to opencv VideoCapture?

498 Views Asked by At

I want to implement an object tracking code for the Airsim simulation. I want to get the images of the simulation's camera and use them for my tracking algorithm.

I am using cv.VideoCatpure() object in my tracking code. and I get the simulation's camera as a ROS image msg. then using cv bridge I converted the ROS image msgs to OpenCV images.

Now my question is that, Is there any way to make cv.VideoCapture read the OpenCV images or to read it as ROS image msg or even to read it from the simulation API?

In short, I want to use the simulation's camera instead of a real camera or an existed video. I want it to stream the video from the simulation, not from a USB camera.

If anyone can help it will be very appreciated.

0

There are 0 best solutions below