Class ImageMultiBand<T extends ImageMultiBand<T>>

java.lang.Object
boofcv.struct.image.ImageBase<T>
boofcv.struct.image.ImageMultiBand<T>
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
ImageInterleaved, Planar

public abstract class ImageMultiBand<T extends ImageMultiBand<T>>
extends ImageBase<T>
Base class for images with multiple bands.
See Also:
Serialized Form
  • Constructor Details

    • ImageMultiBand

      public ImageMultiBand()
  • Method Details

    • getNumBands

      public abstract int getNumBands()
      Returns the number of bands or colors stored in this image.
      Returns:
      Number of bands in the image.
    • setNumberOfBands

      public abstract void setNumberOfBands​(int bands)
      Changes the number of bands in the image while keeping the width and height the same. A simple reshape is done if possible, if not then new internal data is defined
      Parameters:
      bands - number of bands
    • reshape

      public void reshape​(int width, int height, int numberOfBands)
      Reshape for MultiBand images which allows the number of bands to be changed a the same time too
      Parameters:
      width - Desired image width
      height - Desired image height
      numberOfBands - Desired number of bands
    • reshapeTo

      public void reshapeTo​(ImageBase image)
      If the input image is a ImageMultiBand then the shape with match (width, height, bands) if single band then the number of bands will remain the same while just matching (width, height)
      Overrides:
      reshapeTo in class ImageBase<T extends ImageMultiBand<T>>
      Parameters:
      image - Image whose shape will be matched