public class FloatArray2DSIFT extends FloatArray2DFeatureTransform<FloatArray2DSIFT.Param>
@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.
Modifier and Type | Class and Description |
---|---|
static class |
FloatArray2DSIFT.Param |
p
Constructor and Description |
---|
FloatArray2DSIFT(FloatArray2DSIFT.Param p)
Constructor
|
Modifier and Type | Method and Description |
---|---|
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) |
extractFeatures
public FloatArray2DSIFT(FloatArray2DSIFT.Param p)
public FloatArray2DScaleOctave[] getOctaves()
public FloatArray2DScaleOctave getOctave(int i)
public final void init(FloatArray2D src)
init
in class FloatArray2DFeatureTransform<FloatArray2DSIFT.Param>
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]protected final void processCandidate(double[] c, int o, List<Feature> features)
c
- candidate 0=>x, 1=>y, 2=>scale index
o
- octave indexfeatures
- finally contains all processed candidatespublic Vector<Feature> run(int max_size)
public static Vector<PointMatch> createMatches(List<Feature> fs1, List<Feature> fs2, float rod)
fs1
- feature collection from set 1fs2
- feature collection from set 2rod
- Ratio of distances (closest/next closest match)public static Vector<PointMatch> createMatches(List<Feature> fs1, List<Feature> fs2, double max_sd, AbstractModel<?> model, double max_id, double rod)
fs1
- feature collection from set 1 sorted by decreasing sizefs2
- feature collection from set 2 sorted by decreasing sizemax_sd
- maximal difference in size (ratio max/min)model
- transformation model to be applied to fs2max_id
- maximal distance in image space ($\sqrt{x^2+y^2}$)rod
- Ratio of distances (closest/next closest match)public final void extractFeatures(Collection<Feature> features)
FloatArray2DFeatureTransform
extractFeatures
in class FloatArray2DFeatureTransform<FloatArray2DSIFT.Param>
features
- the Collection
to be filledpublic static double[] featureSizeHistogram(Vector<Feature> features, double min, double max, int bins)
public final float getInitialSigma()
public final void setInitialSigma(float initialSigma)
public final int getMaxOctaveSize()
Copyright © 2015–2021 Fiji. All rights reserved.