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

Adding new cpp wrappers #16

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open

Conversation

GuiiFerrari
Copy link

Few changes to add the new line_cpp.py which contains the bind to the cpp line ransac. Still needs to change the class to return the B coefficient from equation: y = A*t + B.

@leomariga leomariga added the enhancement New feature or request label Jan 21, 2021
@leomariga
Copy link
Owner

leomariga commented Jan 21, 2021

I'm working on how to make this work for a python library. Basically we need to make the build of the C files when installing using pip. I don't have much experience using C extensions.

https://stackoverflow.com/questions/32528560/using-setuptools-to-create-a-cython-package-calling-an-external-c-library

@GuiiFerrari do you have the setup.py you used to generate the .so file? This would help me a lot.

@GuiiFerrari
Copy link
Author

I generate the .so file using the following:

g++ -c -fPIC line.cpp -o line.o
g++ line.o -shared -o line.so

I don't know to make a functional dll on windows. I always end up with some error.

Ransac bind now includes all random sampling modes.
@leomariga
Copy link
Owner

Today I worked on making the instalation available for different architectures using extension from the setup.py file during the pip install. I created a repository to test how can we build the cpp files during the instalation. I manage to make it work on linux, but no success on windows yet.

Right now the only way of building the cpp on different architectures is to build during the instalation, so every system will generate its shared library type (.so, .dll etc..). However, not every user has the compiling tools needed for such task and I already saw many problems using this approach.

I believe the best way to distribute the cpp package will be using the build wheels for every possible architecture using CI. I'll work on this problem this week to see what I can do.

@GuiiFerrari
Copy link
Author

Unfortunately I don't know how to help you. I will work on a plane implementation soon. I've made the complete optimization for line ransac.

@GuiiFerrari
Copy link
Author

I created the wrapper and I think It's working. Try to install this version and use the class Line_cpp. There's a test file. Test the new file and tell me if it's working.

@leomariga
Copy link
Owner

Thank you Guii, I will soon give it a try

@GuiiFerrari
Copy link
Author

Hi, have you tried?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants