Package boofcv.core.encoding
Class ConvertYuyv
java.lang.Object
boofcv.core.encoding.ConvertYuyv
Packed format with ½ horizontal chroma resolution, also known as YUV 4:2:2
In this format each four bytes is two pixels. Each four bytes is two Y's, a Cb and a Cr. Each Y goes to one of the pixels, and the Cb and Cr belong to both pixels. As you can see, the Cr and Cb components have half the horizontal resolution of the Y component. V4L2_PIX_FMT_YUYV is known in the Windows environment as YUY2.Description taken from V4L documentation.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
yuyvToBoof
(byte[] data, int width, int height, ImageBase output) Converts a YU12 encoded byte array into a BoofCV formatted image.static GrayF32
yuyvToGray
(byte[] data, int width, int height, GrayF32 output) Converts an Yuyv image into a gray scale F32 image.static GrayU8
yuyvToGray
(byte[] data, int width, int height, GrayU8 output) Converts an Yuyv image into a gray scale U8 image.
-
Constructor Details
-
ConvertYuyv
public ConvertYuyv()
-
-
Method Details
-
yuyvToBoof
Converts a YU12 encoded byte array into a BoofCV formatted image.- Parameters:
data
- (input) YU12 byte arraywidth
- (input) image widthheight
- (input) image heightoutput
- (output) BoofCV image
-
yuyvToGray
Converts an Yuyv image into a gray scale U8 image.- Parameters:
data
- Input: Yuyv image datawidth
- Input: image widthheight
- Input: image heightoutput
- Output: Optional storage for output image. Can be null.- Returns:
- Gray scale image
-
yuyvToGray
Converts an Yuyv image into a gray scale F32 image.- Parameters:
data
- Input: Yuyv image datawidth
- Input: image widthheight
- Input: image heightoutput
- Output: Optional storage for output image. Can be null.- Returns:
- Gray scale image
-