Software Archive
Read-only legacy content
17061 Discussions

experemental Python extension

peter_b_3
Beginner
329 Views

I have started to write a python extension to control my F200.

At the moment it is very very rough but I have posted it on gitHb should anyone want to play with it or extend it.

https://github.com/binraker/PyRealSense

0 Kudos
4 Replies
Xusheng_L_Intel
Employee
329 Views

Great job! Thanks for supporting RealSense SDK.

0 Kudos
peter_b_3
Beginner
329 Views

I currently have a memory leak in my extension. Using the code on GitHub when I run the test file "1.py" during debugging, the memory usage rises until it causes an error. As far as I can see I am releasing everything but obviously there is something I am missing.

Any suggestions welcomed.

(This is the  first C++ I have written in a decade and the first Python extension so I my apologies for its rather lashed together appearance)

0 Kudos
peter_b_3
Beginner
329 Views

Having not done anything on this for a while I thought I'd pick it up again.

I found the memory leak issue was to do with numpy being required to be explicitly told to take ownership of the data.  This, however, allows one frame to be returned and then on the next frame an access violation occurs. Tried various things but still can't get anythingworkable.

Suggestions welcomed.

current code is at https://github.com/binraker/PyRealSense

 

0 Kudos
peter_b_3
Beginner
329 Views

It works!!

My latest commit to the aforementioned Github repo is functional (if simple). It should allow anyone wanting to build a python application with one of these cameras to have a good starting point to do so.

I shall continue to update it as I add more features.

Peter

0 Kudos
Reply