Documentation of 'boofcv.struct.image.ImageInterleaved' Java class
ImageInterleaved
boofcv.struct.image

Class ImageInterleaved<T extends ImageInterleaved>

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
    Direct Known Subclasses:
    InterleavedF32, InterleavedF64, InterleavedInteger, InterleavedS64


    public abstract class ImageInterleaved<T extends ImageInterleaved>
    extends ImageMultiBand<T>

    Base class for images that contain multiple interleaved bands. Typically each band represents a different color or frequency of light detected in the imaging sensor.

    Each pixel is composed of N bands. In an RGB image each pixel would be composed of 3 elements, [red][green][blue]. The index of the green band at pixel (3,10) would be:
    index of green at (3,10) = startIndex + 10*stride + 3*numBands + 1

    See Also:
    Serialized Form
    • Field Detail

      • numBands

        public int numBands
        How many color bands are contained in each pixel
    • Method Detail

      • subimage

        public T subimage(int x0,
                          int y0,
                          int x1,
                          int y1,
                          T subimage)
        Creates a sub-image from 'this' image. The subimage will share the same internal array that stores each pixel's value, but will only pertain to an axis-aligned rectangular segment of the original.
        Specified by:
        subimage in class ImageBase<T extends ImageInterleaved>
        Parameters:
        x0 - x-coordinate of top-left corner of the sub-image.
        y0 - y-coordinate of top-left corner of the sub-image.
        x1 - x-coordinate of bottom-right corner of the sub-image.
        y1 - y-coordinate of bottom-right corner of the sub-image.
        subimage -
        Returns:
        A sub-image of this image.
      • reshape

        public void reshape(int width,
                            int height)
        Description copied from class: ImageBase
        Changes the width and height of the image. If the image data array isn't large enough to hold an image of this size then a new array is declared. Otherwise the image data array is left unchanged and only the width and height variables are modified.
        Specified by:
        reshape in class ImageBase<T extends ImageInterleaved>
        Parameters:
        width - Desired image width
        height - Desired image height
      • getIndex

        public int getIndex(int x,
                            int y,
                            int band)
      • setTo

        public void setTo(T orig)
        Sets this image equal to the specified image. Automatically resized to match the input image.
        Specified by:
        setTo in class ImageBase<T extends ImageInterleaved>
        Parameters:
        orig - The original image whose value is to be copied into this one
      • setNumBands

        public final void setNumBands(int numBands)
      • getDataType

        public abstract ImageDataType getDataType()
        Returns image type information
        Returns:
        The type of image.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.