Class HierarchicalScaleSpace<OctaveT extends ScaleOctave<?>>

java.lang.Object
imagingbook.common.sift.scalespace.HierarchicalScaleSpace<OctaveT>
Type Parameters:
OctaveT - the octave type
All Implemented Interfaces:
PrintsToStream
Direct Known Subclasses:
DogScaleSpace, GaussianScaleSpace

public abstract class HierarchicalScaleSpace<OctaveT extends ScaleOctave<?>> extends Object implements PrintsToStream

This abstract class defines a generic hierarchical scale space, consisting of multiple "octaves". See Sec. 25.1.4. of [1] for details.

[1] W. Burger, M.J. Burge, Digital Image Processing – An Algorithmic Introduction, 3rd ed, Springer (2022).

Version:
2022/11/20
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    getAbsoluteScale(int p, float q)
    Returns the absolute scale (σ) at scale level p, q.
    int
    Returns the bottom level index in each scale space octave (e.g., this is -1 for the Gaussian scale space used in SIFT).
    Returns the contents of this scale space as an array of ImageJ (ImagePlus) images, one for each octave.
    getOctave(int p)
    Returns a reference to the p-th octave in this scale space.
    int
    Returns the number of octaves in this scale space.
    int
    Returns the number of scale levels in each octave of this scale space.
    double
    getRealX(int p, double xp)
    Calculates and returns the real (unscaled) x-position for a local coordinate at the specified octave.
    double
    getRealY(int p, double yp)
    Calculates and returns the real (unscaled) y-position for a local coordinate at the specified octave.
    getScaleLevel(int p, int q)
    Returns the q-th scale space level of octave p in this scale space.
    double
    Returns the base scale assigned to level 0 of octave 0.
    double
    Returns the assumed sampling scale.
    int
    Returns the top level index in each scale space octave (e.g., this is Q+1 for the Gaussian scale space used in SIFT).
    void
    This method writes a description of this object to the specified PrintStream.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface imagingbook.common.util.PrintsToStream

    printToString
  • Method Details

    • getP

      public int getP()
      Returns the number of octaves in this scale space.
      Returns:
      the number of octaves
    • getQ

      public int getQ()
      Returns the number of scale levels in each octave of this scale space.
      Returns:
      the number of scale levels
    • getSigma_s

      public double getSigma_s()
      Returns the assumed sampling scale.
      Returns:
      the assumed sampling scale
    • getSigma_0

      public double getSigma_0()
      Returns the base scale assigned to level 0 of octave 0.
      Returns:
      the base scale
    • getBottomLevelIndex

      public int getBottomLevelIndex()
      Returns the bottom level index in each scale space octave (e.g., this is -1 for the Gaussian scale space used in SIFT).
      Returns:
      the bottom level index
    • getTopLevelIndex

      public int getTopLevelIndex()
      Returns the top level index in each scale space octave (e.g., this is Q+1 for the Gaussian scale space used in SIFT).
      Returns:
      the top level index
    • getOctave

      public OctaveT getOctave(int p)
      Returns a reference to the p-th octave in this scale space. Valid octave indexes are p = 0,..,P-1 (see getP()).
      Parameters:
      p - the octave index
      Returns:
      the associated ScaleOctave instance
      See Also:
    • getScaleLevel

      public ScaleLevel getScaleLevel(int p, int q)
      Returns the q-th scale space level of octave p in this scale space. Valid octave indexes are p = 0,..,P-1 (see getP()).
      Parameters:
      p - the octave index
      q - the (within-octave) level index
      Returns:
      the associated ScaleLevel instance
    • getAbsoluteScale

      public double getAbsoluteScale(int p, float q)
      Returns the absolute scale (σ) at scale level p, q.
      Parameters:
      p - the octave index
      q - the (within-octave) level index
      Returns:
      the absolute level scale
    • getRealX

      public double getRealX(int p, double xp)
      Calculates and returns the real (unscaled) x-position for a local coordinate at the specified octave.
      Parameters:
      p - the octave index
      xp - the (scale-level) local coordinate
      Returns:
      the original x-position
    • getRealY

      public double getRealY(int p, double yp)
      Calculates and returns the real (unscaled) y-position for a local coordinate at the specified octave.
      Parameters:
      p - the octave index
      yp - the scale-level) local coordinate
      Returns:
      the original y-position
    • printToStream

      public void printToStream(PrintStream strm)
      Description copied from interface: PrintsToStream
      This method writes a description of this object to the specified PrintStream.
      Specified by:
      printToStream in interface PrintsToStream
      Parameters:
      strm - the output stream to print to
    • getImages

      public ImagePlus[] getImages(String title)
      Returns the contents of this scale space as an array of ImageJ (ImagePlus) images, one for each octave. Each image contains a stack of frames, one for each scale level.
      Parameters:
      title - a string used to compose the title of the images
      Returns:
      an array of ImagePlus instances.