mpicbg.imagefeatures
Class FloatArray2DSIFT

java.lang.Object
  extended by mpicbg.imagefeatures.FloatArray2DFeatureTransform<FloatArray2DSIFT.Param>
      extended by mpicbg.imagefeatures.FloatArray2DSIFT

public class FloatArray2DSIFT
extends FloatArray2DFeatureTransform<FloatArray2DSIFT.Param>

Scale Invariant Feature Transform as described by David Lowe \cite{Loew04}. BibTeX:

 @article{Lowe04,
   author  = {David G. Lowe},
   title   = {Distinctive Image Features from Scale-Invariant Keypoints},
   journal = {International Journal of Computer Vision},
   year    = {2004},
   volume  = {60},
   number  = {2},
   pages   = {91--110},
 }
 
NOTE: The SIFT-method is protected by U.S. Patent 6,711,293: "Method and apparatus for identifying scale invariant features in an image and use of same for locating an object in an image" by the University of British Columbia. That is, for commercial applications the permission of the author is required.

Version:
0.1b
Author:
Stephan Saalfeld

Nested Class Summary
static class FloatArray2DSIFT.Param
           
 
Field Summary
 
Fields inherited from class mpicbg.imagefeatures.FloatArray2DFeatureTransform
p
 
Constructor Summary
FloatArray2DSIFT(FloatArray2DSIFT.Param p)
          Constructor
 
Method Summary
static Vector<PointMatch> createMatches(List<Feature> fs1, List<Feature> fs2, double max_sd, AbstractModel<?> model, double max_id, double rod)
          identify corresponding features using spatial constraints
static Vector<PointMatch> createMatches(List<Feature> fs1, List<Feature> fs2, float rod)
          Identify corresponding features
 void extractFeatures(Collection<Feature> features)
          Detect features.
static double[] featureSizeHistogram(Vector<Feature> features, double min, double max, int bins)
          get a histogram of feature sizes
 float getInitialSigma()
           
 int getMaxOctaveSize()
           
 FloatArray2DScaleOctave getOctave(int i)
           
 FloatArray2DScaleOctave[] getOctaves()
           
 void init(FloatArray2D src)
          initialize the scale space as a scale pyramid having octave stubs only
protected  void processCandidate(double[] c, int o, List<Feature> features)
          assign orientation to the given candidate, if more than one orientations found, duplicate the feature for each orientation estimate the feature descriptor for each of those candidates
 Vector<Feature> run()
          detect features in all scale octaves
 Vector<Feature> run(int max_size)
          detect features in all scale octaves
 void setInitialSigma(float initialSigma)
           
 
Methods inherited from class mpicbg.imagefeatures.FloatArray2DFeatureTransform
extractFeatures
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FloatArray2DSIFT

public FloatArray2DSIFT(FloatArray2DSIFT.Param p)
Constructor

Parameters:
feature_descriptor_size -
feature_descriptor_size -
Method Detail

getOctaves

public FloatArray2DScaleOctave[] getOctaves()

getOctave

public FloatArray2DScaleOctave getOctave(int i)

init

public final void init(FloatArray2D src)
initialize the scale space as a scale pyramid having octave stubs only

Specified by:
init in class FloatArray2DFeatureTransform<FloatArray2DSIFT.Param>
Parameters:
src - image having a generating gaussian kernel of FloatArray2DSIFT.Param.initialSigma img must be a 2d-array of float values in range [0.0f, ..., 1.0f]

processCandidate

protected final void processCandidate(double[] c,
                                      int o,
                                      List<Feature> features)
assign orientation to the given candidate, if more than one orientations found, duplicate the feature for each orientation estimate the feature descriptor for each of those candidates

Parameters:
c - candidate 0=>x, 1=>y, 2=>scale index
o - octave index
features - finally contains all processed candidates

run

public Vector<Feature> run()
detect features in all scale octaves

Returns:
detected features

run

public Vector<Feature> run(int max_size)
detect features in all scale octaves

Returns:
detected features

createMatches

public static Vector<PointMatch> createMatches(List<Feature> fs1,
                                               List<Feature> fs2,
                                               float rod)
Identify corresponding features

Parameters:
fs1 - feature collection from set 1
fs2 - feature collection from set 2
rod - Ratio of distances (closest/next closest match)
Returns:
matches

createMatches

public static Vector<PointMatch> createMatches(List<Feature> fs1,
                                               List<Feature> fs2,
                                               double max_sd,
                                               AbstractModel<?> model,
                                               double max_id,
                                               double rod)
identify corresponding features using spatial constraints

Parameters:
fs1 - feature collection from set 1 sorted by decreasing size
fs2 - feature collection from set 2 sorted by decreasing size
max_sd - maximal difference in size (ratio max/min)
model - transformation model to be applied to fs2
max_id - maximal distance in image space ($\sqrt{x^2+y^2}$)
rod - Ratio of distances (closest/next closest match)
Returns:
matches TODO implement the spatial constraints

extractFeatures

public final void extractFeatures(Collection<Feature> features)
Description copied from class: FloatArray2DFeatureTransform
Detect features.

Specified by:
extractFeatures in class FloatArray2DFeatureTransform<FloatArray2DSIFT.Param>
Parameters:
features - the Collection to be filled

featureSizeHistogram

public static double[] featureSizeHistogram(Vector<Feature> features,
                                            double min,
                                            double max,
                                            int bins)
get a histogram of feature sizes

Parameters:
rs -

getInitialSigma

public final float getInitialSigma()

setInitialSigma

public final void setInitialSigma(float initialSigma)

getMaxOctaveSize

public final int getMaxOctaveSize()


Copyright © 2007-2016 Fiji. All Rights Reserved.