RAM data format analysis

RAM data format analysis

The Raw format is the output format of the sensor , which is unprocessed data, indicating the intensity of various lights received by the sensor.

Raw data is output in a certain order, generally in the following four types:

  • 00: GR/BG
  • 01: RG/GB
  • 10: BG/GR
  • 11: GB/RG

 

The raw data is the original data output by the sensor. Generally, there are raw8, raw10, raw12, etc., respectively indicating that a pixel has 8bit, 10bit, and 12bit data.

It is the original record of the level when the sensor converts the optical signal into an electrical signal. It is simply the image data without any processing, that is, the electrical signal directly obtained by the imaging element is obtained by digital processing.

The raw data is output in a certain order. There are four main types: GRBG, RGGB, BGGR, and GBRG. The following figure shows the BGGR format:

Why are there two G components in each case? At this time, because human eyes are more sensitive to green, the sampling of green is increased. Each component represents a piexl. Therefore, GR/BG represents four piexls, which represent 4 transistors on the physical sensor. Only one color component is sampled with one transistor, and each piexl is obtained through interpolation calculation. The main purpose of this is to reduce power consumption.

The data output by the sensor is generally sent to the ISP for processing to get a good result. This requires the ISP to know the order and size of the raw data output by the sensor. The order is generally realized by configuring the pattern register of the ISP, and the size is generally configured in ISP input format control register.

The following are some commonly used formats of raw data:

RAW8:

Raw8 is to use 8bits to represent a component in G/R/B/G, instead of using 8bits to represent the four components of RG/GB. In the sensor, in order to reduce power consumption, a crystal is used to represent a color, and then the difference is used to calculate the value of adjacent pixels.

Raw 10:

Raw10 uses 10bit to represent the above-mentioned G/R/B/G, but the data is 16bit, and the upper 6 bits are useless.

Raw12:

Raw12: It uses 12bit to represent the above-mentioned G/R/B/G, but the data is 16bit, and the upper 4 bits are useless.

Tools for viewing raw data

There are many tools for viewing raw data, and here I will only introduce the three I use:

1 > picasa

Find and enjoy pictures on your computer in seconds with Picasa, Google's free picture management tool. Picasa was originally an image management and processing software that was charged independently. Its interface is beautiful and gorgeous, and its functions are practical and rich. It was later acquired by Google and changed to free software, and became a part of Google. Its most prominent advantage is that it searches the photos and pictures in the hard disk very quickly. When you enter a word and prepare to enter the second word, it has already Instantly display the searched pictures. No matter how many photos there are or how big the space is, you can find the pictures you need in a few seconds.

It is relatively simple to use, just change the file extension to raw, and then drag it into the software.

2>irfanview

It is only a small software less than 2M, but its function is comparable to that of ACDSee which is as large as tens of M! This software is IrfanView. Picture, audio, video browsing, picture batch format conversion, batch renaming, JPE picture lossless rotation, etc. are just the most basic functions of IrfanView. IrfanView is the world's first Windows image viewer that supports multi-page Gif animations. In addition, powerful plug-in functions, custom skin functions and multiple hotkey support allow you to customize a completely own IrfanView!

When using, you need to change the file suffix to raw, then drag it into the software, fill in the length and width of raw, and then select depth, mainly choose pattern, you need to know the order of raw data is RG/GB, etc. One problem with this software is that the opened raw data is upside down.

3>photoshop

Powerful, needless to say. Here's just how to use it to view raw data:

First open the raw data, fill in the width in the pop-up dialog box, and then select the channel as 1, if it is raw10, select the depth as 16, then select IBM, open it, and find that it is a completely black picture, and then select: filter- > Miscellaneous -> Customize. . . "In the pop-up dialog box, fill in 64 in the white box in the middle, and 0 in the others to get a raw picture, but the picture is black and white, but the front and back are normal.

Reprinted at: https://www.cnblogs.com/linhaostudy/p/11225815.html

Guess you like

Origin blog.csdn.net/u010783226/article/details/130813995
RAM