Class ConvertYV12

java.lang.Object
boofcv.core.encoding.ConvertYV12

public class ConvertYV12 extends 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 Details

    • ConvertYV12

      public ConvertYV12()
  • Method Details

    • yu12ToBoof

      public static void yu12ToBoof(byte[] data, int width, int height, 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 GrayU8 yu12ToGray(byte[] data, int width, int height, 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 GrayF32 yu12ToGray(byte[] data, int width, int height, 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