Package boofcv.alg.transform.pyramid
Class NoCacheScaleSpace<I extends ImageGray<I>,D extends ImageGray<D>>
java.lang.Object
boofcv.alg.transform.pyramid.NoCacheScaleSpace<I,D>
- All Implemented Interfaces:
GaussianScaleSpace<I,
D>
public class NoCacheScaleSpace<I extends ImageGray<I>,D extends ImageGray<D>>
extends Object
implements GaussianScaleSpace<I,D>
Implementation of GaussianScaleSpace
that focuses on one scale space at a time.
When the scale space is changed the scaled image is recomputed and previously computed derivatives
are marked as stale. Then the derivatives are recomputed as needed.
-
Constructor Summary
ConstructorDescriptionNoCacheScaleSpace
(Class<I> inputType, Class<D> derivType) Declares internal data structures. -
Method Summary
Modifier and TypeMethodDescriptionReturns how image borders are processed.double
Returns the value of the current active scale.getDerivative
(boolean... isX) Computes derivative images using previously computed lower level derivatives.double
getScale
(int level) Returns the scale for the specified layer in the pyramid.Returns the scaled image at the active scale.int
Returns number of scaled images inside of this scale space.void
setActiveScale
(int index) Sets the active scale.void
setBorderType
(BorderType type) Change how image borders are handled.void
Specifies the original un-scaled image.void
setScales
(double... scales) Sets the scales/blur magnitudes for which the scale-space should be computed over.
-
Constructor Details
-
NoCacheScaleSpace
Declares internal data structures.- Parameters:
inputType
- Type of input imagederivType
- Derivative image type.
-
-
Method Details
-
setScales
public void setScales(double... scales) Description copied from interface:GaussianScaleSpace
Sets the scales/blur magnitudes for which the scale-space should be computed over. -
getScale
public double getScale(int level) Description copied from interface:GaussianScaleSpace
Returns the scale for the specified layer in the pyramid. This is equivalent to the standard deviation of the Gaussian convolved across the original input image. -
setImage
Description copied from interface:GaussianScaleSpace
Specifies the original un-scaled image. -
setActiveScale
public void setActiveScale(int index) Description copied from interface:GaussianScaleSpace
Sets the active scale. Must callGaussianScaleSpace.setImage(ImageGray)
before this function.- Specified by:
setActiveScale
in interfaceGaussianScaleSpace<I extends ImageGray<I>,
D extends ImageGray<D>> - Parameters:
index
- Index of active scale
-
getCurrentScale
public double getCurrentScale()Description copied from interface:GaussianScaleSpace
Returns the value of the current active scale.- Specified by:
getCurrentScale
in interfaceGaussianScaleSpace<I extends ImageGray<I>,
D extends ImageGray<D>> - Returns:
- active scale.
-
getTotalScales
public int getTotalScales()Description copied from interface:GaussianScaleSpace
Returns number of scaled images inside of this scale space.- Specified by:
getTotalScales
in interfaceGaussianScaleSpace<I extends ImageGray<I>,
D extends ImageGray<D>> - Returns:
- Number of scales.
-
getScaledImage
Description copied from interface:GaussianScaleSpace
Returns the scaled image at the active scale.- Specified by:
getScaledImage
in interfaceGaussianScaleSpace<I extends ImageGray<I>,
D extends ImageGray<D>> - Returns:
- scaled image.
-
setBorderType
Description copied from interface:GaussianScaleSpace
Change how image borders are handled.- Specified by:
setBorderType
in interfaceGaussianScaleSpace<I extends ImageGray<I>,
D extends ImageGray<D>> - Parameters:
type
- The BorderType.
-
getBorderType
Description copied from interface:GaussianScaleSpace
Returns how image borders are processed.- Specified by:
getBorderType
in interfaceGaussianScaleSpace<I extends ImageGray<I>,
D extends ImageGray<D>> - Returns:
- how image borders are processed.
-
getDerivative
Computes derivative images using previously computed lower level derivatives. Only computes/declares images as needed.- Specified by:
getDerivative
in interfaceGaussianScaleSpace<I extends ImageGray<I>,
D extends ImageGray<D>> - Parameters:
isX
- specifies which partial derivative is to be returned.- Returns:
- The image's derivative.
-