Class ConvertYV12


  • public class ConvertYV12
    extends java.lang.Object
    YUV / YCbCr image format. The Y component is contained in the width*height block, followed by a (width/2)*(height/2) block for Cb and then a block of the same size for Cr.
    • Constructor Summary

      Constructors 
      Constructor Description
      ConvertYV12()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void yu12ToBoof​(byte[] data, int width, int height, boofcv.struct.image.ImageBase output)
      Converts a YU12 encoded byte array into a BoofCV formatted image.
      static boofcv.struct.image.GrayF32 yu12ToGray​(byte[] data, int width, int height, boofcv.struct.image.GrayF32 output)
      Converts an YV12 image into a gray scale F32 image.
      static boofcv.struct.image.GrayU8 yu12ToGray​(byte[] data, int width, int height, boofcv.struct.image.GrayU8 output)
      Converts an YV12 image into a gray scale U8 image.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ConvertYV12

        public ConvertYV12()
    • Method Detail

      • yu12ToBoof

        public static void yu12ToBoof​(byte[] data,
                                      int width,
                                      int height,
                                      boofcv.struct.image.ImageBase output)
        Converts a YU12 encoded byte array into a BoofCV formatted image.
        Parameters:
        data - (input) YU12 byte array
        width - (input) image width
        height - (input) image height
        output - (output) BoofCV image
      • yu12ToGray

        public static boofcv.struct.image.GrayU8 yu12ToGray​(byte[] data,
                                                            int width,
                                                            int height,
                                                            boofcv.struct.image.GrayU8 output)
        Converts an YV12 image into a gray scale U8 image.
        Parameters:
        data - Input: YV12 image data
        width - Input: image width
        height - Input: image height
        output - Output: Optional storage for output image. Can be null.
        Returns:
        Gray scale image
      • yu12ToGray

        public static boofcv.struct.image.GrayF32 yu12ToGray​(byte[] data,
                                                             int width,
                                                             int height,
                                                             boofcv.struct.image.GrayF32 output)
        Converts an YV12 image into a gray scale F32 image.
        Parameters:
        data - Input: YV12 image data
        width - Input: image width
        height - Input: image height
        output - Output: Optional storage for output image. Can be null.
        Returns:
        Gray scale image