mpicbg.imagefeatures
Class FloatArray2DScaleOctave

java.lang.Object
  extended by mpicbg.imagefeatures.FloatArray2DScaleOctave

public class FloatArray2DScaleOctave
extends Object

single octave of a discrete 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 #MIN_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},
 }
 

Version:
0.1b
Author:
Stephan Saalfeld

Nested Class Summary
static class FloatArray2DScaleOctave.State
           
 
Field Summary
 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 Summary
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
 
Method Summary
 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 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 .
 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 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 .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

public FloatArray2DScaleOctave.State state

width

public int width

height

public int height

STEPS

public int STEPS
steps per octave an octave consists of STEPS + 3 images to be


SIGMA

public 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

Constructor Detail

FloatArray2DScaleOctave

public FloatArray2DScaleOctave(FloatArray2D img,
                               int steps,
                               float initial_sigma)
Constructor

Parameters:
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 sigma

FloatArray2DScaleOctave

public FloatArray2DScaleOctave(FloatArray2D img,
                               float[] sigma,
                               float[] sigma_diff,
                               float[][] kernel_diff)
Constructor faster initialisation with precomputed gaussian kernels

Parameters:
img - image being the first gaussian instance of the scale octave
initial_sigma - inital gaussian sigma
Method Detail

getL

public FloatArray2D[] getL()

getL

public FloatArray2D getL(int i)

getD

public FloatArray2D[] getD()

getD

public FloatArray2D getD(int i)

getL1

public FloatArray2D[] getL1(int i)
get the gradients of the corresponding gaussian image, generates it on demand, if not yet available.

Parameters:
i - index will not be checked for efficiency reasons, so take care that it is within a valid range

buildStub

public 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. Like proposed by Lowe \citep{Lowe04}, you can use this image to build the next scale octave. Taking every second pixel of this image, you get a gaussian image with INITIAL_SIGMA of the half image size.


build

public boolean build()
build the scale octave


clear

public void clear()
clear the scale octave to save memory


downsample

public static void downsample(FloatArray2D src,
                              FloatArray2D dst)
downsample 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 .

Parameters:
src - the source image
dst - destination image

upsample

public static void upsample(FloatArray2D src,
                            FloatArray2D dst)
upsample 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 .

Parameters:
src - the source image
dst - destination image


Copyright © 2007-2016 Fiji. All Rights Reserved.