Module imagingbook.common
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 TypeMethodDescriptiondouble
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
getP()
Returns the number of octaves in this scale space.int
getQ()
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
printToStream
(PrintStream strm) This method writes a description of this object to the specifiedPrintStream
.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
Returns the number of octaves in this scale space.- Returns:
- the number of octaves
-
getQ
Returns the number of scale levels in each octave of this scale space.- Returns:
- the number of scale levels
-
getSigma_s
Returns the assumed sampling scale.- Returns:
- the assumed sampling scale
-
getSigma_0
Returns the base scale assigned to level 0 of octave 0.- Returns:
- the base scale
-
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
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
Returns a reference to the p-th octave in this scale space. Valid octave indexes are p = 0,..,P-1 (seegetP()
).- Parameters:
p
- the octave index- Returns:
- the associated
ScaleOctave
instance - See Also:
-
getScaleLevel
Returns the q-th scale space level of octave p in this scale space. Valid octave indexes are p = 0,..,P-1 (seegetP()
).- Parameters:
p
- the octave indexq
- the (within-octave) level index- Returns:
- the associated
ScaleLevel
instance
-
getAbsoluteScale
Returns the absolute scale (σ) at scale level p, q.- Parameters:
p
- the octave indexq
- the (within-octave) level index- Returns:
- the absolute level scale
-
getRealX
Calculates and returns the real (unscaled) x-position for a local coordinate at the specified octave.- Parameters:
p
- the octave indexxp
- the (scale-level) local coordinate- Returns:
- the original x-position
-
getRealY
Calculates and returns the real (unscaled) y-position for a local coordinate at the specified octave.- Parameters:
p
- the octave indexyp
- the scale-level) local coordinate- Returns:
- the original y-position
-
printToStream
Description copied from interface:PrintsToStream
This method writes a description of this object to the specifiedPrintStream
.- Specified by:
printToStream
in interfacePrintsToStream
- Parameters:
strm
- the output stream to print to
-
getImages
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.
-