Class GrayU8

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class GrayU8
    extends GrayI8<GrayU8>

    Image with a pixel type of unsigned 8-bit integer.

    See Also:
    Serialized Form
    • Constructor Detail

      • GrayU8

        public GrayU8​(int width,
                      int height)
        Creates a new gray scale (single band/color) image.
        Parameters:
        width - number of columns in the image.
        height - number of rows in the image.
      • GrayU8

        public GrayU8()
      • GrayU8

        public GrayU8​(byte[][] input)
    • Method Detail

      • unsafe_get

        public int unsafe_get​(int x,
                              int y)
        Description copied from class: GrayI
        Get function which does not perform bounds checking.
        Specified by:
        unsafe_get in class GrayI<GrayU8>
        Parameters:
        x - pixel coordinate.
        y - pixel coordinate.
        Returns:
        an intensity value.
      • createNew

        public GrayU8 createNew​(int imgWidth,
                                int imgHeight)
        Description copied from class: ImageBase
        Returns a new image. If either width or height are set to -1 then none of the class parameters set. Otherwise a new image is created with the specified dimensions which has all other parameters the same as the original matrix.
        Specified by:
        createNew in class ImageBase<GrayU8>
        Parameters:
        imgWidth - Width of the new image
        imgHeight - height of the new image
        Returns:
        new image