Specifieds a particular format of an archetypes.Image.
Most images can be described by a encodings.ColorModel and a encodings.ChannelDatatype,
e.g. RGB and U8 respectively.
However, some image formats has chroma downsampling and/or
use differing number of bits per channel, and that is what this encodings.PixelFormat is for.
All these formats support random access.
For more compressed image formats, see archetypes.EncodedImage.
Variants
Y_U_V12_LimitedRange = 20
Y_U_V12 is a YUV 4:2:0 fully planar YUV format without chroma downsampling, also known as I420.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
First comes entire image in Y in one plane, followed by the U and V planes, which each only have half the resolution of the Y plane.
NV12 = 26
NV12 (aka Y_UV12) is a YUV 4:2:0 chroma downsampled form at with 12 bits per pixel and 8 bits per channel.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
First comes entire image in Y in one plane, followed by a plane with interleaved lines ordered as U0, V0, U1, V1, etc.
YUY2 = 27
YUY2 (aka 'YUYV', 'YUYV16' or 'NV21'), is a YUV 4:2:2 chroma downsampled format with 16 bits per pixel and 8 bits per channel.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
The order of the channels is Y0, U0, Y1, V0, all in the same plane.
Y8_FullRange = 30
Monochrome Y plane only, essentially a YUV 4:0:0 planar format.
Also known as just "gray". This is virtually identical to a 8bit luminance/grayscale (see encodings.ColorModel).
This uses entire range YUV, i.e. Y is expected to be within [0, 255]. (as opposed to "limited range" YUV as used e.g. in NV12).
Y_U_V24_LimitedRange = 39
Y_U_V24 is a YUV 4:4:4 fully planar YUV format without chroma downsampling, also known as I444.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
First comes entire image in Y in one plane, followed by the U and V planes.
Y_U_V24_FullRange = 40
Y_U_V24 is a YUV 4:4:4 fully planar YUV format without chroma downsampling, also known as I444.
This uses full range YUV with all components ranging from 0 to 255 (as opposed to "limited range" YUV as used e.g. in NV12).
First comes entire image in Y in one plane, followed by the U and V planes.
Y8_LimitedRange = 41
Monochrome Y plane only, essentially a YUV 4:0:0 planar format.
Also known as just "gray".
This uses limited range YUV, i.e. Y is expected to be within [16, 235].
If not for this range limitation/remapping, this is almost identical to 8bit luminace/grayscale (see encodings.ColorModel).
Y_U_V12_FullRange = 44
Y_U_V12 is a YUV 4:2:0 fully planar YUV format without chroma downsampling, also known as I420.
This uses full range YUV with all components ranging from 0 to 255 (as opposed to "limited range" YUV as used e.g. in NV12).
First comes entire image in Y in one plane, followed by the U and V planes, which each only have half the resolution of the Y plane.
Y_U_V16_LimitedRange = 49
Y_U_V16 is a YUV 4:2:2 fully planar YUV format without chroma downsampling, also known as I422.
This uses limited range YUV, i.e. Y is expected to be within [16, 235] and U/V within [16, 240].
First comes entire image in Y in one plane, followed by the U and V planes, which each only have half the horizontal resolution of the Y plane.
Y_U_V16_FullRange = 50
Y_U_V16 is a YUV 4:2:2 fully planar YUV format without chroma downsampling, also known as I422.
This uses full range YUV with all components ranging from 0 to 255 (as opposed to "limited range" YUV as used e.g. in NV12).
First comes entire image in Y in one plane, followed by the U and V planes, which each only have half the horizontal resolution of the Y plane.
BayerRGGB8 = 128
Raw Bayer image with 8 bits per pixel, using the RGGB color filter pattern.
Every pixel holds a single color sample, in one plane. The pattern repeats every 2x2 pixels, with red and green in even rows, and green and blue in odd rows.
The viewer reconstructs RGB using bilinear demosaicing.
BayerBGGR8 = 129
Raw Bayer image with 8 bits per pixel, using the BGGR color filter pattern.
Every pixel holds a single color sample, in one plane. The pattern repeats every 2x2 pixels, with blue and green in even rows, and green and red in odd rows.
The viewer reconstructs RGB using bilinear demosaicing.
BayerGBRG8 = 130
Raw Bayer image with 8 bits per pixel, using the GBRG color filter pattern.
Every pixel holds a single color sample, in one plane. The pattern repeats every 2x2 pixels, with green and blue in even rows, and red and green in odd rows.
The viewer reconstructs RGB using bilinear demosaicing.
BayerGRBG8 = 131
Raw Bayer image with 8 bits per pixel, using the GRBG color filter pattern.
Every pixel holds a single color sample, in one plane. The pattern repeats every 2x2 pixels, with green and red in even rows, and blue and green in odd rows.
The viewer reconstructs RGB using bilinear demosaicing.
Arrow datatype
UInt8