public class FloatArray2DScaleOctave extends Object
FloatArray2DScaleSpace
This class is optimized for the Difference Of Gaussian detector used in David Lowe's SIFT-algorithm \citep{Loew04}.
The scale space itself consists of an arbitrary number of octaves. This number is implicitly defined by the minimal image size. Octaves contain overlapping scales of the scalespace. Thus it is possible to execute several operations that depend on adjacent scales within one octave.
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}, }
Modifier and Type | Class and Description |
---|---|
static class |
FloatArray2DScaleOctave.State |
Modifier and Type | Field and Description |
---|---|
int |
height |
float[] |
SIGMA
sigma of gaussian kernels corresponding to the steps of the octave
the first member is the sigma of the gaussian kernel that is assumed to
be the generating kernel of the first gaussian image instance of the
octave
|
FloatArray2DScaleOctave.State |
state |
int |
STEPS
steps per octave
an octave consists of STEPS + 3 images to be
|
int |
width |
Constructor and Description |
---|
FloatArray2DScaleOctave(FloatArray2D img,
float[] sigma,
float[] sigma_diff,
float[][] kernel_diff)
Constructor
faster initialisation with precomputed gaussian kernels
|
FloatArray2DScaleOctave(FloatArray2D img,
int steps,
float initial_sigma)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
build()
build the scale octave
|
void |
buildStub()
build only the gaussian image with 2 * INITIAL_SIGMA
Use this method for the partial creation of an octaved scale space
without creating each scale octave.
|
void |
clear()
clear the scale octave to save memory
|
static void |
downsample(FloatArray2D src,
FloatArray2D dst)
Downsample
src by simply using every second pixel into
dst . |
FloatArray2D[] |
getD() |
FloatArray2D |
getD(int i) |
FloatArray2D[] |
getL() |
FloatArray2D |
getL(int i) |
FloatArray2D[] |
getL1(int i)
get the gradients of the corresponding gaussian image, generates it on
demand, if not yet available.
|
static void |
upsample(FloatArray2D src,
FloatArray2D dst)
Upsample
src by linearly interpolating into dst . |
public FloatArray2DScaleOctave.State state
public int width
public int height
public int STEPS
public float[] SIGMA
public FloatArray2DScaleOctave(FloatArray2D img, int steps, float initial_sigma)
img
- image being the first gaussian instance of the scale octave
img must be a 2d-array of float values in range [0.0f, ..., 1.0f]initial_sigma
- inital gaussian sigmapublic FloatArray2DScaleOctave(FloatArray2D img, float[] sigma, float[] sigma_diff, float[][] kernel_diff)
img
- image being the first gaussian instance of the scale octavesigma
- initial_sigma inital gaussian sigmapublic FloatArray2D[] getL()
public FloatArray2D getL(int i)
public FloatArray2D[] getD()
public FloatArray2D getD(int i)
public FloatArray2D[] getL1(int i)
i
- index will not be checked for efficiency reasons, so take care
that it is within a valid rangepublic void buildStub()
public boolean build()
public void clear()
public static void downsample(FloatArray2D src, FloatArray2D dst)
src
by simply using every second pixel into
dst
.
For efficiency reasons, the dimensions of dst
are not checked,
that is, you have to take care, that
dst.width == src.width / 2 + src.width % 2 &&
dst.height == src.height / 2 + src.height % 2 .
src
- the source imagedst
- destination imagepublic static void upsample(FloatArray2D src, FloatArray2D dst)
src
by linearly interpolating into dst
.
For efficiency reasons, the dimensions of dst
are not checked,
that is, you have to take care, that
src.width == dst.width / 2 + dst.width % 2 &&
src.height == dst.height / 2 + dst.height % 2 .
src
- the source imagedst
- destination imageCopyright © 2015–2021 Fiji. All rights reserved.