Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Bindings (not a bug) #280

Open
remexre opened this issue Jun 9, 2015 · 8 comments
Open

Python Bindings (not a bug) #280

remexre opened this issue Jun 9, 2015 · 8 comments
Milestone

Comments

@remexre
Copy link

remexre commented Jun 9, 2015

So, I wrote some quick (8 hours) Python bindings for libfreenect2, entitled pyfreenect2. If anyone wants to help (I still have no idea what Registration is), have at it.

@floe floe added this to the 0.2 milestone Jun 9, 2015
@RyanGordon
Copy link
Contributor

Good job!

Someone correct me if I'm wrong but Registration is the process of overlaying the RGB image onto the depth map?

@robotsorcerer
Copy link

Cool. Exactly what I've been waiting for. I'll see what ConvNets can do here

@xlz
Copy link
Member

xlz commented Jan 29, 2016

Do you have a plan to get it merged to this repo? Or do you plan to maintain it yourself (and add a mention in the README.md here)?

@remexre
Copy link
Author

remexre commented Jan 29, 2016

Sorry, I haven't had much time to maintain this recently. In the next
couple of weeks, I'll get it "up to snuff" and then I'd be amenable to
merging.

On Fri, Jan 29, 2016, 4:06 PM Lingzhu Xiang [email protected]
wrote:

Do you have a plan to get it merged to this repo? Or do you plan to
maintain it yourself (and add a mention in the README.md here)?


Reply to this email directly or view it on GitHub
#280 (comment)
.

@r9y9
Copy link

r9y9 commented Jan 30, 2016

FWIW, I also have a python binding (it's private for now) based on cython and also Julia binding r9y9/Libfreenect2.jl (requires development version of julia though). Recently I'm regularly testing with the latest libfreenect2.

If anyone interested in python one, I will consider make it public (example code is somthing like this).

EDIT: I should have mentioned that I was testing these on osx only.

@xlz
Copy link
Member

xlz commented Jan 30, 2016

Your python example is quite similar but has some small differences in naming and functionalities. pyfreenect2 seems to have an extra layer of python encapsulation around raw interfaces, which yours doesn't have.

I think it's best for you two to have consensus and solve the differences. Probably by providing reviews in the potential pull request. There can be only one python wrapper.

I took a brief look. "PyFreeNect2" is not consistent with the rest of the naming scheme. "PyFreenect2" or "pyfreenect2" should be used. Also, I see some underscore names. My opinion is to use CamelCase in a consistent way that matches the C++ API as much as possible to minimize confusion.

As to the Julia binding, you are welcome to make a pull request. A binding needs documentation, an example, and cross-platform test results to be merged.

@floe
Copy link
Contributor

floe commented Jan 31, 2016

For the record, the SWIG file in #427 should in the future also be able to auto-generate Python bindings. But of course, this requires working out the kinks there first, while we have working bindings here.

@xlz xlz modified the milestones: 0.2, 0.3 Feb 26, 2016
@r9y9
Copy link

r9y9 commented Feb 28, 2016

I just made my python binding public under MIT license: https://github.com/r9y9/pylibfreenect2.

In pylibfreenect2:

  • All basic features (RGB, IR, depth image transfer and registration) are supported
  • Recently added features (e.g. CUDA depth decoding) are not supported yet
  • Tests are passing locally with the latest release (v0.1.1) and current master (9c80ccd)
  • Should be python 2.7/3.5 compatible
  • No docs yet (except for brief README). API docs added
  • Tested on osx, ubuntu 14.04 and windows
  • There are a few API differences in C++ and python, though I tried to minimize it (will probably be revisited)

For someone who is interested, the easiest way to use pylibfreenect2 for now is though the examples/multiframe_listener.py.

Any comment / issue / PR is welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants