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

[refactor] Replace sift_roi binary by shared library and ctypes #193

Merged
merged 44 commits into from
Mar 13, 2019

Conversation

jmichel-otb
Copy link
Member

This PR modifies the image_keypoints implementation in sift.py module, while preserving its API (to the exception of the extra_params option which had to be removed).

It now reads the roi with rasterio into a numpy array, pass it to the keypoints_from_nparray, which will call the actual C++ sift code with ctypes and return the sift points and descriptors in another numpy array. This array is then written to the txt file using numpy io.

I had to fix a bunch of bugs in the sift test itself. I also autopep8 the sift.py file which explains minor diff outside of methods cited above.

the libsift4ctypes.so shared library is installed in s2p/lib. Relative path is hardcoded in sift.py, which allow the whole thing to work without updating LD_LIBRARY_PATH. However a cleaner solution would be to manage the LD_LIBRARY_PATH in a config script (out of the scope of this PR).

@dyoussef dyoussef requested a review from carlodef February 27, 2019 14:37
jmichel-otb and others added 17 commits February 28, 2019 17:58
@dyoussef dyoussef merged commit bb7d3f3 into MISS3D:master Mar 13, 2019
carlodef added a commit to amiotc/s2p that referenced this pull request Mar 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants