public class SiftImageScaleSpace
extends java.lang.Object
OCTAVE SCALES: The scales sampled are different from the SIFT paper. In each octave the scales are sampled across a linear function. s(i) = sigma*i. In the paper scales are sampled using an exponential function s(i) = sigma*s(i-1)
When computing the next octave in the sequence it is seeded with the image from the second scale in the previous octave. The first octave is seeded with the input image or the input image scaled.
| Modifier and Type | Field and Description |
|---|---|
protected int |
actualOctaves |
protected boofcv.struct.image.ImageFloat32[] |
derivX |
protected boofcv.struct.image.ImageFloat32[] |
derivY |
protected boofcv.struct.image.ImageFloat32[] |
dog |
protected double[] |
layerSigma |
protected int |
numOctaves |
protected int |
numScales |
protected double[] |
pixelScale |
protected boofcv.struct.image.ImageFloat32[] |
scale |
protected float |
sigma |
protected boofcv.struct.image.ImageFloat32 |
storage |
| Constructor and Description |
|---|
SiftImageScaleSpace(float blurSigma,
int numScales,
int numOctaves,
boolean doubleInputImage)
Configures the scale-space.
|
| Modifier and Type | Method and Description |
|---|---|
void |
computeDerivatives()
Computes the image derivative for each layer in the pyramid.
|
void |
computeFeatureIntensity()
Compute difference of Gaussian feature intensity across scale space
|
double |
computeScaleSigma(int octave,
int scale)
Returns the amount of blur which has been applied to the image in total at the specified scale
in the current octave
|
void |
constructPyramid(boofcv.struct.image.ImageFloat32 input)
Processes the first image and constructs the scale-space pyramid for the first level.
|
protected static void |
downSample(boofcv.struct.image.ImageFloat32 from,
boofcv.struct.image.ImageFloat32 to)
Down samples an image by copying every other pixel, starting with pixel 1.
|
boofcv.struct.image.ImageFloat32 |
getDerivativeX(int index) |
boofcv.struct.image.ImageFloat32 |
getDerivativeY(int index) |
int |
getNumOctaves() |
int |
getNumScales() |
boofcv.struct.image.ImageFloat32 |
getPyramidLayer(int index) |
double |
imageIndexToPixelScale(int imageIndex)
Image pixel scale factor for the specific image in the pyramid.
|
int |
scaleToImageIndex(double sigma)
Given the scale, return the index of the layer in the scale-space that is the closest
match.
|
protected static void |
upSample(boofcv.struct.image.ImageFloat32 from,
boofcv.struct.image.ImageFloat32 to)
Up-samples the input image.
|
protected int numOctaves
protected int numScales
protected int actualOctaves
protected boofcv.struct.image.ImageFloat32[] dog
protected boofcv.struct.image.ImageFloat32[] scale
protected boofcv.struct.image.ImageFloat32[] derivX
protected boofcv.struct.image.ImageFloat32[] derivY
protected float sigma
protected double[] pixelScale
protected double[] layerSigma
protected boofcv.struct.image.ImageFloat32 storage
public SiftImageScaleSpace(float blurSigma,
int numScales,
int numOctaves,
boolean doubleInputImage)
blurSigma - Amount of blur applied to each scale inside an octaves. Try 1.6numScales - Number of scales per octaves. Try 5. Must be >= 3numOctaves - Number of octaves to detect. Try 4doubleInputImage - Should the input image be doubled? Try false.public void constructPyramid(boofcv.struct.image.ImageFloat32 input)
input - Input imagepublic void computeDerivatives()
public double computeScaleSigma(int octave,
int scale)
public void computeFeatureIntensity()
protected static void downSample(boofcv.struct.image.ImageFloat32 from,
boofcv.struct.image.ImageFloat32 to)
protected static void upSample(boofcv.struct.image.ImageFloat32 from,
boofcv.struct.image.ImageFloat32 to)
public int getNumOctaves()
public int getNumScales()
public boofcv.struct.image.ImageFloat32 getPyramidLayer(int index)
public boofcv.struct.image.ImageFloat32 getDerivativeX(int index)
public boofcv.struct.image.ImageFloat32 getDerivativeY(int index)
public int scaleToImageIndex(double sigma)
public double imageIndexToPixelScale(int imageIndex)