This is a Python wrapper library for the open source computer vision library VLFeat using the Armadillo C++ Matrix Library.
VLFeat4Py targets for both the ease of usage in C++ and Python, samples can be found under test/
directory.
VLFeat4Py is not targeted to be a complete wrapper for VLFeat, it is best used with the combination of sklearn and skimage.
Current wrapped functions are:
- vl_sift
- vl_dsift
- vl_imsmooth (obsoleted, use
skimage.filters.gaussian_filter
instead) - vl_phow
- vl_kmeans
- vl_homkermap
- vl_gmm
- vl_fisher
- Install Armadillo
- Install VLFeat (Properly setup include files and libvl.so)
- Run
python setup.py build_ext --inplace
- Copy
_vlfeat.so
andvl_phow.py
under foldervlfeat/
, and move to PYTHONPATH directory
import numpy as np
import time
from scipy.misc import lena
from vlfeat import vl_phow
I = np.asarray(lena(), dtype=np.float32) / 255.0
__TIC = time.time()
# frames, descrs = vl_phow(I, sizes=4, verbose=1)
frames, descrs = vl_phow(I, sizes=4, color='opponent', verbose=1)
print time.time() - __TIC
print frames.shape
print descrs.shape