pierrepaleo / sift_pyocl

An implementation of SIFT on GPU with OpenCL
83 stars 20 forks source link

`feature` module not available #2

Open dgtlmoon opened 7 years ago

dgtlmoon commented 7 years ago

I think a lot more people could contribute to this project if there was some decent information in the README.md... what is the feature module and how do I get it? are there some special steps to installing it?

 test/test_matching.py 
/usr/local/lib/python2.7/dist-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
working on GeForce GTX 960M
working on GeForce GTX 960M
working on GeForce GTX 960M
/tmp/sift_pyocl/build/lib.linux-x86_64-2.7/sift_pyocl/matching_gpu.cl
ERROR:test_matching:WARNING: feature module is not available to compare results with C++ implementation. Matching cannot be tested.
.
----------------------------------------------------------------------
Ran 1 test in 0.147s

OK
pierrepaleo commented 7 years ago

Hi @dgtlmoon This repository has not been updated for a while. The maintenance efforts are concentrated in the silx project (silx.image.sift). I'll update this repository when possible to keep it up to date with silx - I agree that the readme.md file should at least be updated.

The feature module was an optional dependency for the tests, to validate the implementation with respect to the ipol implementation of SIFT wrapped here. Unless you want to validate/compare sift_pyocl, this has little interest for actual image registration.

Instructions on how to run sift_pyocl are available on the silx documentation page.

If the transformation between the images to register is linear (translation, rotation, scaling, shear), you can also use the LinearAlign plan as follows.

import numpy as np
import scipy.ndimage as nd
from silx.image import sift
from scipy.misc import ascent

img = ascent()
angle_degree = 31.
shift = (27, 18)
img2 = nd.rotate(nd.shift(img, shift), angle_degree, reshape=False)
plan = sift.LinearAlign(img, devicetype="GPU")
img2_al = plan.align(img2)