Intel Realsense Python use on other Cameras.
Is it possible to use the python code for intel realsense, which I posted below, and connect it with another stereo camera type that is not an intel realsense?
https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python#installation
-
Hi Mikesaliphone The RealSense SDK has a concept called the Platform Camera by which non-RealSense cameras such as webcams can be identified and accessed. The easiest way to test it is by attempting to access a Platform Camera in the RealSense Viewer tool by clicking the Add Source button at the top of the Viewer's options side-panel to open a drop-down list of usable cameras.
In regards to using a Platform Camera with RealSense Python code, there are not many references. The best one available is a device handling script called realsense_device_manager that is part of a larger project called 'box_dimensioner_multicam' (a box volume estimation tool).
I would recommend testing your non-RealSense camera in the Viewer first to see whether it is possible to access it with the Add Source button before attempting to write Python code to access it.
-
If you need to import depth frames from a non-RealSense camera into the RealSense SDK instead of RGB, as your mention of a stereo camera suggests, then you may be able to do so by reading the frames with OpenCV and then feeding the frames into the RealSense SDK using its software-device 'virtual camera' interface.
-
Thank you I appreciate your assistance, I opened the viewer after downloading it from the github but instead of connecting to the camera I intended, it connected to my laptop webcam. I am currently connecting my camera to my laptop through a USB3.
In regards to OpenCV, do I stream the live frames from OpenCV, then input the recordings into the RealSense Viewer? Also, while doing this am I able to overlay the new recording over a TIF/LAS file?
Is there a specific "virtual camera" or is this another term for creating a virtual environment?
From Michael Salerno
-
The term 'virtual camera' refers to how the software-device interface can be used to define a pretend camera in software that is treated as though a real physical camera is attached.
RealSense cameras are detected automatically when the Viewer is launched and listed in the Viewer's options side-panel. A non-RealSense camera such as a laptop webcam will not be automatically detected though and must be added manually to the side-panel with the Add Source button.
The Viewer would not be able to access camera frames that are being streamed into OpenCV as the Viewer does not make use of the software-device interface. You would have to write a software-device program script to feed the OpenCV frames into it.
It is possible for software-device to make use of an image file for its data, like in the RealSense SDK's software-device C++ example at the link below that converts a PNG image of a RealSense logo into a depth point cloud.
https://github.com/IntelRealSense/librealsense/tree/master/examples/software-device
Please sign in to leave a comment.
Comments
4 comments