Industrial Camera-Black and White Camera Pixel MONO Format Arrangement Analysis

Table of Contents of Series Articles

Industrial Camera-Black and White Camera Pixel MONO Format Arrangement Analysis



Preface

To understand image formats, you must first understand the common properties of images:

  • Pixel: image directly perceived by the human eye
  • Bitmap: An image stored and expressed by recording each pixel value
  • Bit depth: how many binary bits are used to represent each pixel in the bitmap
  • bmp: standard bitmap format in Windows systems

1. Pixel format of industrial cameras

  • Black and white cameras: Mono8, Mono10, Mono10 Packed, Mono12, Mono12 Packed
  • Color camera: RGB8, Bayer, BGR, YUV 422 Packed, YUV 422(YUYV) Packed

2. Black and white camera pixel format analysis:

The specific arrangement of each pixel format is explained below:

  • Mono12 pixel format: This pixel occupies 16Bits/Pixel in the memory, but only 12Bits are actually meaningful. The low 4 bits are filled with 0 for alignment. The maximum gray value is 2^12-1=4095. For ease of understanding, you can look at the picture below:
    Insert image description hereThe gray value of the first row of the Mono12 image is expressed in decimal as: 0,591,1183 ,1759,2351,2927,3519,4095
    The binary representation is: 0000 0000 0000 0000; 0000 0010 0100 1111, 0000 0100 1001 1111, 0000 0110 1101 1111,…, 0000 1111 1111 1111.

  • Mono12 Packed: It can be known from the Mono12 arrangement that if the high-order four bits of the 0 are removed, the pixel will occupy 12Bits/Pixel in the memory.

  • Mono10 pixel format: This pixel occupies 16Pixels in the memory, but only 10Bits are actually meaningful. The next 6 bits are filled with 0s for alignment. The maximum gray value is 2^10-1=1023.

  • Mono10 Packed pixel format: Similar to Mono12 Packed, it also removes the high-order four bits of 0 padding. This pixel also occupies 12Bits/Pixel in the memory.

  • Mono8 pixel format: This pixel occupies 8Bits/Pixel in the memory, that is, the maximum gray value is 2^8 -1 =255; the left side of the picture below is a Mono8 image with a resolution of 3000*2000, or 6 million pixels, and the right side is a schematic diagram.

Insert image description hereThe grayscale value of the first row of the Mono8 image is expressed in decimal notation as 0,36,73,109,146,182,219,255
The binary expression is 0000 0000; 0010 0100; 0100 1001; 0110 1101;…; 1111 1111, it can be seen from this. Mono8 means that each pixel occupies 8Bits in memory.


Summarize

The above are all mono formats of black and white cameras. For color industrial cameras, there is actually a black and white format, but that black and white format is strictly converted from the color camera format. It is not the image taken directly by the sensor, but is the same as the real black and white camera. The mono format is different. When I have time later, I will sort out the pixel format arrangement and format conversion of color cameras.

Guess you like

Origin blog.csdn.net/zyq880625/article/details/130013476#comments_28996139