mercoledì 22 aprile 2009

SIFT Python Implementation

http://jesolem.blogspot.com/2009/02/sift-python-implementation.html

This is the text and the code from the link above:

I'd like to share a Python interface I wrote for David Lowe's Scale Invariant Feature Transform (SIFT) implementation. David, the inventor of SIFT, has since several years generously shared binaries with a Matlab interface on his website. Inspired by the Matlab files for reading keypoint descriptor files and for matching between images, I decided to write a Python version. Here it is: sift.py.

The file itself should be self-explanatory, especially together with the documentation that comes with Lowe's zip-file. Anyway, here's an example:

>>>from PIL import Image
>>>from numpy import *
>>>import sift

>>>sift.process_image('basmati.pgm', 'basmati.key')
>>>l1,d1 = sift.read_features_from_file('basmati.key')
>>>im = array(Image.open('basmati.pgm'))
>>>sift.plot_features(im,l1)



Nessun commento:

Posta un commento