Documentation of 'boofcv.struct.pyramid.ImagePyramidBase' Java class
ImagePyramidBase
boofcv.struct.pyramid

Class ImagePyramidBase<T extends ImageGray>

  • 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 PyramidDiscrete and PyramidFloat. 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 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 processed
        saveOriginalReference - 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:
        initialize in interface ImagePyramid<T extends ImageGray>
        Parameters:
        width - Image width
        height - Image height
      • setTo

        public void setTo(ImagePyramid<T> input)
        Description copied from interface: ImagePyramid
        Set'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:
        setTo in interface ImagePyramid<T extends ImageGray>
        Parameters:
        input - Input pyramid. Not modified.
      • getLayer

        public T getLayer(int layerNum)
        Description copied from interface: ImagePyramid
        Returns a layer in the pyramid.
        Specified by:
        getLayer in interface ImagePyramid<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: ImagePyramid
        Returns the width of an image at ths specified layer.
        Specified by:
        getWidth in interface ImagePyramid<T extends ImageGray>
        Parameters:
        layer - The layer being requested.
        Returns:
        The layer's width.
      • getHeight

        public int getHeight(int layer)
        Description copied from interface: ImagePyramid
        Returns the height of an image at ths specified layer.
        Specified by:
        getHeight in interface ImagePyramid<T extends ImageGray>
        Parameters:
        layer - The layer being requested.
        Returns:
        The layer's height.
      • isSaveOriginalReference

        public boolean isSaveOriginalReference()

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.