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

public abstract class PyramidDiscrete<T extends ImageBase<T>> extends ImagePyramidBase<T>

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 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

      protected PyramidDiscrete(PyramidDiscrete<T> orig)
  • 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 interface ImagePyramid<T extends ImageBase<T>>
      Overrides:
      initialize in class ImagePyramidBase<T extends ImageBase<T>>
      Parameters:
      width - Image width
      height - 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.