Items with no label
3335 Discussions

RealSense on macOS with Python

KK7
Beginner
5,176 Views

I'm new to RealSense. I'd like to develop some application by using SR300. I use macOS (10.12.2) and I'd like to use Python for the development. Is it possible to use RealSense on Mac by using Python? There are very few information on the web and I couldn't judge based on that information.

0 Kudos
8 Replies
MartyG
Honored Contributor III
1,538 Views

Librealsense, the open-source SDK for RealSense cameras, has Python integration according to its download page.

https://github.com/IntelRealSense/librealsense GitHub - IntelRealSense/librealsense: Cross-platform camera capture for Intel® RealSense™ F200, SR300 and R200

0 Kudos
KK7
Beginner
1,538 Views

Thank you. Is it the only choice? Above link leads to pyrealsense library, which supports Ubuntu but not tested on macOS.

https://github.com/toinsson/pyrealsense GitHub - toinsson/pyrealsense: Simple ctypes extension to the librealsense library.

0 Kudos
MartyG
Honored Contributor III
1,538 Views

It does look like Librealsense or OpenCV is the only choice for using the camera with Python, sadly. Extensive research only turned up references to using the cam with these software packages.

This guide to using RealSense with OpenCV was the most useful link I came across.

http://www.samontab.com/web/2016/04/interfacing-intel-realsense-f200-with-opencv/ Interfacing Intel RealSense F200 with OpenCV – Sebastian Montabone

0 Kudos
MMich26
Beginner
1,538 Views

I tried working with librealsense and OpenCV and could not maintain a connection using Ubuntu. I then tried Ubilinux, which proved equally as difficult and caused a lot of headaches from various OpenGL errors. I never got around to trying it on macOS, but it would probably be somewhat difficult

0 Kudos
KK7
Beginner
1,538 Views

Thank you MartyG and michael5486. I found that VirtualBoxVM (5.0.30) now supports USB3.0, so we could use librealsense and pyrealsense on Ubuntu 16.04 LTS via VM to run RealSense.

0 Kudos
MMich26
Beginner
1,538 Views

I tried with VMware, no luck. Something about the USB abstraction layer not allowing for proper usage. My RealSense R200 would not show up as a device on the Ubuntu VM. But maybe VirtualBox is different!

0 Kudos
KK7
Beginner
1,538 Views

Yes, it was very tricky. Firstly, you need to install extension pack, then need to add usb 3.0 port manually.

http://askubuntu.com/questions/678574/how-can-i-fix-a-usb-3-0-issue-in-a-ubuntu-14-04-virtualbox-vm macosx - How can I fix a USB 3.0 Issue in a Ubuntu 14.04 VirtualBox VM - Ask Ubuntu

http://www.htpcbeginner.com/install-virtualbox-extension-pack-on-linux-windows/ Install VirtualBox Extension Pack on Linux and Windows

After that, you need to select "Intel(R) RealSense(TM) Camera SR300 [XXXX]" from top menu under "Device" >> "USB".

0 Kudos
MMich26
Beginner
1,538 Views

Oh, that's good to know, thanks! Good luck.

0 Kudos
Reply