Class FullImageData


  • public class FullImageData
    extends java.lang.Object
    Container for image data designed for Banuba SDK.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  FullImageData.Orientation
      Describes various information related to image orientation.
    • Constructor Summary

      Constructors 
      Constructor Description
      FullImageData​(android.graphics.Bitmap image, FullImageData.Orientation orientation)
      A parametrized constructor for creating FullImageData instance from bitmap (@p image) and @p orientation.
      FullImageData​(android.media.Image image, FullImageData.Orientation orientation)
      A parametrized constructor for creating FullImageData instance from @p image with @p orientation.
      FullImageData​(android.media.Image image, FullImageData.Orientation orientation, ImageReleaser ir)
      A parametrized constructor for creating FullImageData instance from @p image with @p orientation and @p ir.
      FullImageData​(android.media.Image image, FullImageData.Orientation orientation, ImageReleaser ir, ColorRange colorRange, ColorStd colorStd)
      A parametrized constructor for creating FullImageData instance from @p image with @p orientation, @p ir, @p colorRange and @p colorStd.
      FullImageData​(android.util.Size size, java.nio.Buffer plane0, java.nio.Buffer plane1, java.nio.Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation)
      A parametrized constructor for creating FullImageData instance from raw image information.
      FullImageData​(android.util.Size size, java.nio.Buffer plane0, java.nio.Buffer plane1, java.nio.Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation, ImageReleaser ir)
      A parametrized constructor for creating FullImageData instance from raw image information.
      FullImageData​(android.util.Size size, java.nio.Buffer plane0, java.nio.Buffer plane1, java.nio.Buffer plane2, int rowStride0, int rowStride1, int rowStride2, int pixelStride0, int pixelStride1, int pixelStride2, FullImageData.Orientation orientation, ImageReleaser ir, ColorRange colorRange, ColorStd colorStd)
      A parametrized constructor for creating FullImageData instance from raw image information.
      FullImageData​(java.nio.Buffer image, android.util.Size size, int rowStride, FullImageData.Orientation orientation)
      A parametrized constructor for creating FullImageData instance from raw image information.
    • Constructor Detail

      • FullImageData

        public FullImageData​(android.media.Image image,
                             FullImageData.Orientation orientation)
        A parametrized constructor for creating FullImageData instance from @p image with @p orientation.
        Parameters:
        image - is a single complete image buffer(@see android.media.Image).
        orientation - is the inner representation of orientation of FullImageData (@see Orientation)
      • FullImageData

        public FullImageData​(android.media.Image image,
                             FullImageData.Orientation orientation,
                             ImageReleaser ir)
        A parametrized constructor for creating FullImageData instance from @p image with @p orientation and @p ir.
        Parameters:
        image - is a single complete image buffer(@see android.media.Image).
        orientation - is the inner representation of orientation of FullImageData (@see Orientation).
        ir - is an image releaser(@see ImageReleaser) which is responsible for correct closing of image.
      • FullImageData

        public FullImageData​(android.media.Image image,
                             FullImageData.Orientation orientation,
                             ImageReleaser ir,
                             ColorRange colorRange,
                             ColorStd colorStd)
        A parametrized constructor for creating FullImageData instance from @p image with @p orientation, @p ir, @p colorRange and @p colorStd.
        Parameters:
        image - is a single complete image buffer(@see android.media.Image).
        orientation - is the inner representation of orientation of FullImageData (@see Orientation).
        ir - is an image releaser(@see ImageReleaser) which is responsible for correct closing of image.
        colorRange - is an enum value of color range (@see ColorRange).
        colorStd - is an enum value of ColorStd(@see ColorStd) which is responsible for color standard.
      • FullImageData

        public FullImageData​(android.util.Size size,
                             java.nio.Buffer plane0,
                             java.nio.Buffer plane1,
                             java.nio.Buffer plane2,
                             int rowStride0,
                             int rowStride1,
                             int rowStride2,
                             int pixelStride0,
                             int pixelStride1,
                             int pixelStride2,
                             FullImageData.Orientation orientation)
        A parametrized constructor for creating FullImageData instance from raw image information. Accepts both planar and biplanar (`plane2 = null`) YUV420 images.
        Parameters:
        size - is a width and height of video in pixels (@see android.utils.Size).
        plane0 - is a buffer with data for a single image plane.
        plane1 - is a buffer with data for a single image plane.
        plane2 - is a buffer with data for a single image plane.
        rowStride0 - is a distance in bytes from the first value of one row of the @p plane0 to the first value of the next row.
        rowStride1 - is a distance in bytes from the first value of one row of the @p plane1 to the first value of the next row.
        rowStride2 - is a distance in bytes from the first value of one row of the @p plane2 to the first value of the next row.
        pixelStride0 - is a distance in bytes from the color channel of one pixel to the next for the @p plane0.
        pixelStride1 - is a distance in bytes from the color channel of one pixel to the next for the @p plane1.
        pixelStride2 - is a distance in bytes from the color channel of one pixel to the next for the @p plane2.
        orientation - is the inner representation of orientation of FullImageData (@see Orientation).
      • FullImageData

        public FullImageData​(android.util.Size size,
                             java.nio.Buffer plane0,
                             java.nio.Buffer plane1,
                             java.nio.Buffer plane2,
                             int rowStride0,
                             int rowStride1,
                             int rowStride2,
                             int pixelStride0,
                             int pixelStride1,
                             int pixelStride2,
                             FullImageData.Orientation orientation,
                             ImageReleaser ir)
        A parametrized constructor for creating FullImageData instance from raw image information. Accepts both planar and biplanar (`plane2 = null`) YUV420 images.
        Parameters:
        size - is a width and height of video in pixels (@see android.utils.Size).
        plane0 - is a buffer with data for a single image plane.
        plane1 - is a buffer with data for a single image plane.
        plane2 - is a buffer with data for a single image plane.
        rowStride0 - is a distance in bytes from the first value of one row of the @p plane0 to the first value of the next row.
        rowStride1 - is a distance in bytes from the first value of one row of the @p plane1 to the first value of the next row.
        rowStride2 - is a distance in bytes from the first value of one row of the @p plane2 to the first value of the next row.
        pixelStride0 - is a distance in bytes from the color channel of one pixel to the next for the @p plane0.
        pixelStride1 - is a distance in bytes from the color channel of one pixel to the next for the @p plane1.
        pixelStride2 - is a distance in bytes from the color channel of one pixel to the next for the @p plane2.
        orientation - is the inner representation of orientation of FullImageData (@see Orientation).
        ir - is an image releaser(@see ImageReleaser) which is responsible for correct closing of image.
      • FullImageData

        public FullImageData​(android.util.Size size,
                             java.nio.Buffer plane0,
                             java.nio.Buffer plane1,
                             java.nio.Buffer plane2,
                             int rowStride0,
                             int rowStride1,
                             int rowStride2,
                             int pixelStride0,
                             int pixelStride1,
                             int pixelStride2,
                             FullImageData.Orientation orientation,
                             ImageReleaser ir,
                             ColorRange colorRange,
                             ColorStd colorStd)
        A parametrized constructor for creating FullImageData instance from raw image information. Accepts both planar and biplanar (`plane2 = null`) YUV420 images.
        Parameters:
        size - is a width and height of video in pixels (@see android.utils.Size).
        plane0 - is a buffer with data for a single image plane.
        plane1 - is a buffer with data for a single image plane.
        plane2 - is a buffer with data for a single image plane.
        rowStride0 - is a distance in bytes from the first value of one row of the @p plane0 to the first value of the next row.
        rowStride1 - is a distance in bytes from the first value of one row of the @p plane1 to the first value of the next row.
        rowStride2 - is a distance in bytes from the first value of one row of the @p plane2 to the first value of the next row.
        pixelStride0 - is a distance in bytes from the color channel of one pixel to the next for the @p plane0.
        pixelStride1 - is a distance in bytes from the color channel of one pixel to the next for the @p plane1.
        pixelStride2 - is a distance in bytes from the color channel of one pixel to the next for the @p plane2.
        orientation - is the inner representation of orientation of FullImageData (@see Orientation).
        ir - is an image releaser(@see ImageReleaser) which is responsible for correct closing of image.
        colorRange - is an enum value of color range (@see ColorRange).
        colorStd - is an enum value of ColorStd(@see ColorStd) which is responsible for color standard.
      • FullImageData

        public FullImageData​(android.graphics.Bitmap image,
                             FullImageData.Orientation orientation)
        A parametrized constructor for creating FullImageData instance from bitmap (@p image) and @p orientation.
        Parameters:
        image - is a bitmap (@see android.graphics.Bitmap), must be ARGB_8888.
        orientation - is the inner representation of orientation of FullImageData (@see Orientation).
      • FullImageData

        public FullImageData​(java.nio.Buffer image,
                             android.util.Size size,
                             int rowStride,
                             FullImageData.Orientation orientation)
        A parametrized constructor for creating FullImageData instance from raw image information.
        Parameters:
        image - is a pixel layout. Is identical to `Bitmap.Config.ARGB_8888`.
        size - is a width and height of video in pixels (@see android.utils.Size).
        rowStride - is a distance in bytes from the first value of one row of the @p image to the first value of the next row.
        orientation - is the inner representation of orientation of FullImageData (@see Orientation).
    • Method Detail

      • setImageReleaser

        public void setImageReleaser​(ImageReleaser ir)
        Sets the image releaser for image (@see ImageReleaser).
      • getSize

        public android.util.Size getSize()
        Returns:
        Returns the size of the image, i.e. its width and height
      • getPixelFormat

        public int getPixelFormat()
        Returns:
        Returns the image pixel format.
      • getColorRange

        @Nullable
        public ColorRange getColorRange()
        Returns:
        Returns the image color range.
      • getColorStd

        @Nullable
        public ColorStd getColorStd()
        Returns:
        Returns the image color standard.