Package boofcv.struct.pyramid
Class PyramidDiscrete<T extends ImageBase<T>>
java.lang.Object
boofcv.struct.pyramid.ImagePyramidBase<T>
boofcv.struct.pyramid.PyramidDiscrete<T>
- All Implemented Interfaces:
ImagePyramid<T>
- Direct Known Subclasses:
PyramidDiscreteAverage
,PyramidDiscreteSampleBlur
In this implementation the scale factor between each layer is limited to being a positive integer that is evenly divisible by the previous layer. This added constraint allows further optimization to be performed.
-
Field Summary
Fields inherited from class boofcv.struct.pyramid.ImagePyramidBase
bottomHeight, bottomWidth, layers, saveOriginalReference
-
Constructor Summary
ModifierConstructorDescriptionprotected
PyramidDiscrete
(ImageType<T> imageType, boolean saveOriginalReference, @Nullable ConfigDiscreteLevels configLayers) Specifies input image size and behavior of top most layer.protected
PyramidDiscrete
(PyramidDiscrete<T> orig) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
computeScales
(int width, int height) int
Returns the number of layers in the pyramid.double
getScale
(int layer) Returns the scale of the specified layer in the pyramid.int[]
void
initialize
(int width, int height) Initializes internal data structures based on the input image's size.Methods inherited from class boofcv.struct.pyramid.ImagePyramidBase
checkScales, getHeight, getImageType, getInputHeight, getInputWidth, getLayer, getWidth, isInitialized, isSaveOriginalReference, setFirstLayer, setSaveOriginalReference, setTo
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface boofcv.struct.pyramid.ImagePyramid
copyStructure, getSampleOffset, getSigma, process
-
Field Details
-
levelScales
protected int[] levelScales
-
-
Constructor Details
-
PyramidDiscrete
protected PyramidDiscrete(ImageType<T> imageType, boolean saveOriginalReference, @Nullable @Nullable ConfigDiscreteLevels configLayers) Specifies input image size and behavior of top most layer.- Parameters:
imageType
- Type of image.saveOriginalReference
- If a reference to the full resolution image should be saved instead of copied. Set to false if you don't know what you are doing.configLayers
- Specifies how the levels are computed
-
PyramidDiscrete
-
-
Method Details
-
initialize
public void initialize(int width, int height) Description copied from class:ImagePyramidBase
Initializes internal data structures based on the input image's size. Should be called each time a new image is processed.- Specified by:
initialize
in interfaceImagePyramid<T extends ImageBase<T>>
- Overrides:
initialize
in classImagePyramidBase<T extends ImageBase<T>>
- Parameters:
width
- Image widthheight
- Image height
-
computeScales
protected void computeScales(int width, int height) -
getScales
public int[] getScales() -
getScale
public double getScale(int layer) Description copied from interface:ImagePyramid
Returns the scale of the specified layer in the pyramid. Larger the scale smaller the image is relative to the input image.- Parameters:
layer
- Which layer is being inspected.- Returns:
- The layer's scale.
-
getNumLayers
public int getNumLayers()Description copied from interface:ImagePyramid
Returns the number of layers in the pyramid.
-