pyRANSAC-3D
pyRANSAC-3D copied to clipboard
Adding new cpp wrappers
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.
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.
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.
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.
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.
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.
Thank you Guii, I will soon give it a try
Hi, have you tried?