boofcv.struct.pyramid
Class ImagePyramidBase<T extends ImageGray>
- java.lang.Object
-
- boofcv.struct.pyramid.ImagePyramidBase<T>
-
- All Implemented Interfaces:
- ImagePyramid<T>
- Direct Known Subclasses:
- PyramidDiscrete, PyramidFloat
public abstract class ImagePyramidBase<T extends ImageGray> extends java.lang.Object implements ImagePyramid<T>
Base class for image pyramids. Provides common functionality and data structures. The scale is defined in its children
PyramidDiscreteandPyramidFloat. This allows it to be either integer or floating point and strongly typed.When updating the pyramid, if the top most layer is at the same resolution as the original image then a reference can optionally be saved, avoiding an unnecessary image copy. This is done by setting the saveOriginalReference to true.
-
-
Constructor Summary
Constructors Constructor and Description ImagePyramidBase(java.lang.Class<T> imageType, boolean saveOriginalReference)Specifies input image size and behavior of top most layer.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetHeight(int layer)Returns the height of an image at ths specified layer.java.lang.Class<T>getImageType()The type of image.intgetInputHeight()Height of input image.intgetInputWidth()Width of input image.TgetLayer(int layerNum)Returns a layer in the pyramid.intgetWidth(int layer)Returns the width of an image at ths specified layer.voidinitialize(int width, int height)Initializes internal data structures based on the input image's size.booleanisSaveOriginalReference()voidsetFirstLayer(T image)voidsetTo(ImagePyramid<T> input)Set's this pyramid to be the same as input.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface boofcv.struct.pyramid.ImagePyramid
getNumLayers, getSampleOffset, getScale, getSigma, process
-
-
-
-
Constructor Detail
-
ImagePyramidBase
public ImagePyramidBase(java.lang.Class<T> imageType, boolean saveOriginalReference)
Specifies input image size and behavior of top most layer.- Parameters:
imageType- Type of image which is processedsaveOriginalReference- If a reference to the full resolution image should be saved instead of copied.
-
-
Method Detail
-
initialize
public void initialize(int width, int height)Initializes internal data structures based on the input image's size. Should be called each time a new image is processed.- Specified by:
initializein interfaceImagePyramid<T extends ImageGray>- Parameters:
width- Image widthheight- Image height
-
setTo
public void setTo(ImagePyramid<T> input)
Description copied from interface:ImagePyramidSet's this pyramid to be the same as input. The two pyramids must have the same structure or else an exception will be thrown.- Specified by:
setToin interfaceImagePyramid<T extends ImageGray>- Parameters:
input- Input pyramid. Not modified.
-
getLayer
public T getLayer(int layerNum)
Description copied from interface:ImagePyramidReturns a layer in the pyramid.- Specified by:
getLayerin interfaceImagePyramid<T extends ImageGray>- Parameters:
layerNum- which image is to be returned.- Returns:
- The image in the pyramid.
-
setFirstLayer
public void setFirstLayer(T image)
-
getWidth
public int getWidth(int layer)
Description copied from interface:ImagePyramidReturns the width of an image at ths specified layer.- Specified by:
getWidthin interfaceImagePyramid<T extends ImageGray>- Parameters:
layer- The layer being requested.- Returns:
- The layer's width.
-
getHeight
public int getHeight(int layer)
Description copied from interface:ImagePyramidReturns the height of an image at ths specified layer.- Specified by:
getHeightin interfaceImagePyramid<T extends ImageGray>- Parameters:
layer- The layer being requested.- Returns:
- The layer's height.
-
getImageType
public java.lang.Class<T> getImageType()
Description copied from interface:ImagePyramidThe type of image.- Specified by:
getImageTypein interfaceImagePyramid<T extends ImageGray>- Returns:
- Image type.
-
getInputWidth
public int getInputWidth()
Description copied from interface:ImagePyramidWidth of input image.- Specified by:
getInputWidthin interfaceImagePyramid<T extends ImageGray>
-
getInputHeight
public int getInputHeight()
Description copied from interface:ImagePyramidHeight of input image.- Specified by:
getInputHeightin interfaceImagePyramid<T extends ImageGray>
-
isSaveOriginalReference
public boolean isSaveOriginalReference()
-
-
DataMelt 3.0 © DataMelt by jWork.ORG