当前位置:网站首页>ISP learning (2)
ISP learning (2)
2022-07-06 04:43:00 【Never bald programmer】
One 、 Images bayer Format Introduction
bayer Format picture is Eastman · Kodak scientists Bryce Bayer Invented ,Bryce Bayer The Bayer array is widely used in digital image .
RGB Three primary colors are the basic elements of color pictures . The simplest acquisition method is to collect through the corresponding lens , The red filter passes through the red wavelength , The green filter goes through the green wavelength , Blue filter through blue wavelength . But the cost is high , It's not easy to make , Because all three filters must be aligned with each pixel .
bayer Format pictures with different colors set on a filter , By analyzing the perception of human eyes to color, we found that , The human eye is more sensitive to green , So general bayer The green format of the image is r and g The sum of pixels . That is similar to the present ISP How it works , By algorithm pair RGB The primary color of , Then get a better primary color map .
Pictured above : Green is the sum of red and blue .
Bayer The format is the original picture inside the camera , The general suffix is .raw. Many software can view , such as PS. We took pictures with the camera and stored them on the memory card .jpeg Or pictures in other formats , from .raw Format conversion .
Bayer data , Its general format is :
Odd scan line output GRGR……
Even scan line output BGBG……
According to the characteristics of large-area coloring with low response bandwidth of human eyes to color , There is no need to output each pixel at the same time 3 Color . therefore , When sampling data ,
The number of odd scan lines 1,2,3,4,… Pixels are sampled and output respectively G,R,G,R,… data ;
The... Of even scan lines 1,2,3,4,… Pixels are sampled and output respectively B,G,B,G,… data .
In actual processing , Of each pixel R,G,B The signal is composed of a certain color signal output by the pixel itself and other color signals output by adjacent pixels . This sampling method basically does not reduce the image quality at the same time , The sampling frequency can be reduced 60% above .
Two 、bayer Format image sensor hardware
The structure of the image sensor is as follows , There is a metal isolation layer between each photosensitive pixel , The optical fiber passes through the microscope lens , After color filter filtering , Projected onto the photosensitive element of the corresponding porous silicon .
When Image Sensor When outputting data line by line , The sequence of pixels is GRGRGR…/BGBGBG…( The order RGB). Such an array Sensor Design , bring RGB The sensor is reduced to that of panchromatic sensor 1/3, As shown below .
Three primary colors , Green proportion 1/2 Blue and red are 1/4 1/4 The whole is that the collected three primary colors are original 1/3.
3、 ... and 、bayer Format interpolation algorithm implementation
3.1 Interpolation red blue Algorithm
At first , We collect RGB Data time , We use the same filter , Add different colors to the filter to collect . In order to get the RGB Elements , We need to fill in the missing by collecting the color 2 A color .
Because the human eye is most sensitive to green light , The reaction to purple light and red light is weak , So in order to achieve better picture quality , Need to be right G Special care .
(a) (b)
stay (a) And (b) in ,R and B Take the average value of the neighborhood .
( c) (d)
stay (c) And (d) in , Take... In the field 4 individual B or R The mean value of is used as the average value of the middle pixel B value .
3.1 Interpolation green Algorithm
( e) (f)
Above (c) And (d) in , The expansion is shown in the figure above (e) And (f) Intermediate pixel G The value of
(e) Intermediate pixel G The algorithm of value is as follows :
(f) Intermediate pixel G The algorithm of value is as follows :
I didn't understand G3+G4/2 This operation of . You need to check the information later .
The conversion of this part of the camera is used internally ADC perhaps ISP Accomplished , In order to reduce the cost, the manufacturer will inevitably make the image distorted . Of course, use an external processor to realize the conversion , If the processor is fast enough NB, Capable of pixel operation , Use the above algorithm to convert , All's well that ends well . However, the above algorithm will directly double the complexity of the algorithm , The speed will be limited . So for the Commission of speed , Can be directly through 4 field G Take the mean value to the of the middle pixel G value , Will double the rate , And the performance is very poor , Algorithm is as follows :
Reference blog :https://blog.csdn.net/qingzhuyuxian/article/details/82965054?ops_request_misc=&request_id=&biz_id=102&utm_term=%E5%9B%BE%E5%83%8Fbayer%E6%A0%BC%E5%BC%8F%E4%BB%8B%E7%BB%8D&utm_medium=distribute.pc_search_result.none-task-blog-2~all~sobaiduweb~default-1-82965054.nonecase&spm=1018.2226.3001.4187
边栏推荐
- Ue5 small knowledge points to enable the setting of lumen
- Case of Jiecode empowerment: professional training, technical support, and multiple measures to promote graduates to build smart campus completion system
- Fuzzy -- basic application method of AFL
- Vulnerability discovery - vulnerability probe type utilization and repair of web applications
- 关于imx8mp的es8316的芯片调试
- P2102 floor tile laying (DFS & greed)
- Platformio create libopencm3 + FreeRTOS project
- How does vs change the project type?
- Quatre méthodes de redis pour dépanner les grandes clés sont nécessaires pour optimiser
- Crawler notes: improve data collection efficiency! Use of proxy pool and thread pool
猜你喜欢
[FreeRTOS interrupt experiment]
[Yu Yue education] reference materials of complex variable function and integral transformation of Northwestern Polytechnic University
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
程序员在互联网行业的地位 | 每日趣闻
Postman断言
IPv6 comprehensive experiment
The implementation of the maize negotiable digital warehouse receipt standard will speed up the asset digitization process of the industry
How does computer nail adjust sound
ETCD数据库源码分析——etcdserver bootstrap初始化存储
捷码赋能案例:专业培训、技术支撑,多措并举推动毕业生搭建智慧校园毕设系统
随机推荐
ue5 小知识点 开启lumen的设置
Fedora/REHL 安装 semanage
I'd like to ask about the current MySQL CDC design. In the full volume phase, if a chunk's binlog backfill phase,
[Chongqing Guangdong education] Suzhou University English film and Television Appreciation reference materials
Dry goods collection | Vulkan game engine video tutorial
Sorting out the latest Android interview points in 2022 to help you easily win the offer - attached is the summary of Android intermediate and advanced interview questions in 2022
拉格朗日插值法
二叉树基本知识和例题
最高法院,离婚案件判决标准
Certbot failed to update certificate solution
Redis 排查大 key 的4种方法,优化必备
web工程导入了mysql驱动jar包却无法加载到驱动的问题
ue5 小知识 FreezeRendering 查看视锥内渲染的物体
Use sentinel to interface locally
Ue5 small knowledge freezerendering view rendered objects in the cone
After learning classes and objects, I wrote a date class
How to estimate the population with samples? (mean, variance, standard deviation)
Flink kakfa data read and write to Hudi
Lagrange polynomial
Excellent PM must experience these three levels of transformation!