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
ConstructorsConstructorDescriptionNoCacheScaleSpace(Class<I> inputType, Class<D> derivType) Declares internal data structures. -
Method Summary
Modifier and TypeMethodDescriptionReturns how image borders are processed.doubleReturns the value of the current active scale.getDerivative(boolean... isX) Computes derivative images using previously computed lower level derivatives.doublegetScale(int level) Returns the scale for the specified layer in the pyramid.Returns the scaled image at the active scale.intReturns number of scaled images inside of this scale space.voidsetActiveScale(int index) Sets the active scale.voidsetBorderType(BorderType type) Change how image borders are handled.voidSpecifies the original un-scaled image.voidsetScales(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:GaussianScaleSpaceSets the scales/blur magnitudes for which the scale-space should be computed over. -
getScale
public double getScale(int level) Description copied from interface:GaussianScaleSpaceReturns 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:GaussianScaleSpaceSpecifies the original un-scaled image. -
setActiveScale
public void setActiveScale(int index) Description copied from interface:GaussianScaleSpaceSets the active scale. Must callGaussianScaleSpace.setImage(ImageGray)before this function.- Specified by:
setActiveScalein interfaceGaussianScaleSpace<I extends ImageGray<I>,D extends ImageGray<D>> - Parameters:
index- Index of active scale
-
getCurrentScale
public double getCurrentScale()Description copied from interface:GaussianScaleSpaceReturns the value of the current active scale.- Specified by:
getCurrentScalein interfaceGaussianScaleSpace<I extends ImageGray<I>,D extends ImageGray<D>> - Returns:
- active scale.
-
getTotalScales
public int getTotalScales()Description copied from interface:GaussianScaleSpaceReturns number of scaled images inside of this scale space.- Specified by:
getTotalScalesin interfaceGaussianScaleSpace<I extends ImageGray<I>,D extends ImageGray<D>> - Returns:
- Number of scales.
-
getScaledImage
Description copied from interface:GaussianScaleSpaceReturns the scaled image at the active scale.- Specified by:
getScaledImagein interfaceGaussianScaleSpace<I extends ImageGray<I>,D extends ImageGray<D>> - Returns:
- scaled image.
-
setBorderType
Description copied from interface:GaussianScaleSpaceChange how image borders are handled.- Specified by:
setBorderTypein interfaceGaussianScaleSpace<I extends ImageGray<I>,D extends ImageGray<D>> - Parameters:
type- The BorderType.
-
getBorderType
Description copied from interface:GaussianScaleSpaceReturns how image borders are processed.- Specified by:
getBorderTypein 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:
getDerivativein interfaceGaussianScaleSpace<I extends ImageGray<I>,D extends ImageGray<D>> - Parameters:
isX- specifies which partial derivative is to be returned.- Returns:
- The image's derivative.
-