All Categories
rgb yuv bayer whats the actual difference between pixel formats-0

Blog

Home >  Blog

RGB, YUV, Bayer: What's the Actual Difference Between Pixel Formats?

Time : 2025-10-28

Today, let's talk about an important parameter of industrial cameras – Pixel Format.

 

1. What is a Pixel Format?

Pixel Format refers to the storage method and data organization structure of each pixel when a camera captures an image. Industrial cameras support multiple pixel formats, allowing users to select the appropriate format based on their needs. Common pixel formats include: Mono, Bayer, RGB, YUV, etc.

2. Common Pixel Formats

(1) Mono Format

The Mono format, or monochrome mode, is typically used for grayscale image acquisition. In this format, each pixel contains only luminance (brightness) information and no color information. For example, Mono 10 means each pixel is stored using 10 bits.

 

(2) Bayer Format

The Bayer format is used for color image acquisition and employs a Color Filter Array (CFA). Each pixel contains information for red, green, and blue colors, but typically, each pixel can only record the value for one of these colors. The remaining color values are obtained by interpolating the values from neighboring pixels.

Pixel Formats (2).png

The Bayer format has several different arrangement patterns, for example:

 RG, GB (Commonly referred to as RGGB pattern, indicating the color channels for even-numbered rows)

 BG, GR (Commonly referred to as BGGR pattern, another common scanning order)

 

(3) RGB Format

The RGB format contains three channels, recording the luminance information for Red, Green, and Blue respectively. Each pixel contains information for all three colors. In the RGB format, each pixel is represented by three values corresponding to R, G, and B.

 

(4) YUV Format

The YUV format is a pixel format commonly used in video processing. It separates image information into Luminance (Y) and Chrominance (U, V) components. Y represents the luminance (brightness/grayscale), while U and V represent the chrominance (color information). The YUV format is often used for video compression because the human eye is more sensitive to luminance changes than to chrominance changes.

Pixel Formats (3).png

Common YUV formats include:

 YUV 4:2:2

 YUV 4:4:4

 YUV 4:2:0

These formats refer to different chroma subsampling methods. Generally, a smaller number (like in 4:2:0 vs 4:4:4) means less chrominance information and a smaller resulting file size.

 

3. Pixel Format and Packing

When discussing pixel formats, the concept of "Packed" format sometimes comes up. Packing is used to save storage space and bandwidth. In an unpacked format, pixel data is often stored in a larger memory space aligned to standard boundaries (like 16 bits). To optimize storage, the data can be packed into a smaller memory space more closely matching its actual bit depth.

 

For example:

 Mono 10 might imply an unpacked format where the 10-bit data occupies a 16-bit space, wasting 6 bits.

 Mono 10 Packed would store the 10-bit data more efficiently, for instance, packing multiple 10-bit pixels into a sequence of bytes (like 4 pixels into 5 bytes), saving storage space and transmission bandwidth. The specific packing method can vary.

 

4. Characteristics of Different Pixel Formats 

(1) Monochrome Cameras: Mono Format

The raw data from monochrome cameras is typically in Mono format, containing only grayscale information. Since there is no color information, the image data volume is relatively small, leading to higher storage and transmission efficiency.

Pixel Formats (4).png

(2) Color Cameras: Bayer Format

The raw data from color cameras usually uses the Bayer format. This format captures images by using different color filters (Red, Green, Blue) on the image sensor. The data volume for Bayer format is smaller than full RGB, but because the color information is calculated through interpolation (debayering/demosaicing), the image quality can be slightly inferior to true RGB in terms of color resolution and potential artifacts.

 

(3) RGB Format

The RGB format is suitable for high-quality color image acquisition. Each pixel contains data for all three RGB channels, resulting in richer colors. It is suitable for scenarios requiring fine color processing. However, the data volume for RGB format is large.

Pixel Formats (5).png

(4) YUV Format

The YUV format is used for video signal processing. It reduces data volume by separating luminance and chrominance information. Because the luminance component (Y) is the primary part and the human eye is more sensitive to it, the chrominance components (U, V) can be subsampled (reduced in resolution), allowing for effective image data compression. It is commonly used for video transmission and storage.

 

5. Differences Between Pixel Formats

(1) Value per Pixel:

 Mono format: Each pixel contains only a grayscale value.

 Bayer format: Each pixel records the value for only one color (R, G, or B); other color values are interpolated from neighbors.

 RGB format: Each pixel contains R, G, and B values.

 YUV format: Separates the image into Y (luminance) and U, V (chrominance) components.

 

(2) Data Size per Frame:

Pixel Formats (6).png

 Mono format: Typically 8, 10, 12, or 16 bits per pixel.

Pixel Formats (7).png

 Bayer format: Generally has a smaller raw data size than RGB, often 8, 10, or 12 bits per pixel (before debayering).

 RGB format: Occupies more space, commonly 24 bits per pixel (8 bits per channel x 3 channels), often denoted as RGB8.

 YUV format: Size varies depending on the sampling (e.g., YUV422 often uses 16 bits per pixel on average, YUV420 uses 12 bits per pixel on average).

 

(3) Frame Rate Differences:

Due to the different data volumes, the achievable frame rates vary between pixel formats. Generally, Bayer format can achieve higher frame rates because its raw data output is smaller. RGB format typically results in lower frame rates due to its larger data size. YUV format frame rates generally fall between Bayer and RGB, depending on the subsampling.

 

(4) Imaging Quality Differences: 

For color cameras, Bayer format images can have slightly lower effective color resolution and potential color artifacts (like moiré) because colors are interpolated.

RGB format provides more accurate and richer colors directly at the pixel level, as no interpolation is needed for color.

YUV format color saturation can be similar to RGB, but the separation of luminance and chrominance makes it more efficient for many image processing and compression tasks.

 

6. How to Set the Pixel Format

Before setting the pixel format, it is necessary to stop the camera's image acquisition stream. Then, using the camera control software or accessing the camera's property tree (e.g., via GenICam), select the desired pixel format under the Pixel Format setting. After changing the format, the acquisition stream can be restarted.

PREV : Does High Lumen Affect The Service Life Of Light Sources?

NEXT : Perfect Placement, Peak Performance: Ensuring Relay Heater Alignment with Machine Vision

InquiryInquiry

Contact HIFLY today:

Name
Company
Mobile
Country
Email
Message
0/1000
Email Email WhatsApp WhatsApp WeChat WeChat
WeChat
TopTop