[go: up one dir, main page]

CN116193276A - An Improved 3A Image Preprocessing Algorithm Based on DM8127 - Google Patents

An Improved 3A Image Preprocessing Algorithm Based on DM8127 Download PDF

Info

Publication number
CN116193276A
CN116193276A CN202310122254.XA CN202310122254A CN116193276A CN 116193276 A CN116193276 A CN 116193276A CN 202310122254 A CN202310122254 A CN 202310122254A CN 116193276 A CN116193276 A CN 116193276A
Authority
CN
China
Prior art keywords
image
formula
improved
algorithm
automatic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310122254.XA
Other languages
Chinese (zh)
Inventor
吴蒙
王娟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Posts and Telecommunications
Original Assignee
Nanjing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Posts and Telecommunications filed Critical Nanjing University of Posts and Telecommunications
Priority to CN202310122254.XA priority Critical patent/CN116193276A/en
Publication of CN116193276A publication Critical patent/CN116193276A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Processing Of Color Television Signals (AREA)
  • Color Television Image Signal Generators (AREA)

Abstract

本发明属于图像处理技术领域,具体地说,是一种基于DM8127的改进3A图像预处理算法,通过对自动对焦算法的研究,对清晰度评价函数进行分析与比较,改进寻找最优值的搜索方式,减少搜索次数,达到较好的搜索效果。结合光圈对景深模糊的影响,增益对噪声的影响,基于质量评价函数,提出一种新的自动曝光算法,在景深模糊与噪声之间达到最佳综合图像质量的平衡。自动白平衡部分,将图像分区,通过YUV分量寻找灰色区域,并在DM8127平台上实验,调整参数使得结果收敛,比常用的自动白平衡算法取得了更好的效果。

Figure 202310122254

The invention belongs to the technical field of image processing, specifically, it is an improved 3A image preprocessing algorithm based on DM8127. Through the research on the autofocus algorithm, the sharpness evaluation function is analyzed and compared, and the search for the optimal value is improved. way to reduce the number of searches and achieve better search results. Combining the effect of aperture on depth of field blur and the effect of gain on noise, based on the quality evaluation function, a new automatic exposure algorithm is proposed to achieve the best balance of comprehensive image quality between depth of field blur and noise. In the automatic white balance part, the image is partitioned, the gray area is found through the YUV component, and the experiment is carried out on the DM8127 platform, and the parameters are adjusted to make the result converge, which is better than the commonly used automatic white balance algorithm.

Figure 202310122254

Description

一种基于DM8127的改进3A图像预处理算法An Improved 3A Image Preprocessing Algorithm Based on DM8127

技术领域technical field

本发明属于图像处理技术领域,具体地说,是一种基于DM8127的改进3A图像预处理算法。The invention belongs to the technical field of image processing, in particular, it is an improved 3A image preprocessing algorithm based on DM8127.

背景技术Background technique

如今视频与人类的日常生活息息相关,在无线网络背景下,高清视频、高清电视、高清通话都在纷纷体现高分辨率的重要性。如若用户获取到的视频分辨率低,影响观看体验及其信息的传递,那么这个视频的价值就会降低,像垃圾一样被丢弃在无尽的网络空间之中。每一天,同样一个视频数据会经历无数次的往返输送,人们需要视频能够快速地到达自己的用户设备,实时地获取最新的信息才能够在这个竞争型社会继续迈步向前。当然,视频的时效性要求传输速度必须要快。因此,在开放的无线环境下输送大量且重要的高清视频信息,如何提高获取的视频图像质量、实现快速安全地传输成为了视频处理领域的热点。Nowadays, video is closely related to people's daily life. Under the background of wireless network, high-definition video, high-definition TV, and high-definition calls all reflect the importance of high resolution. If the video resolution obtained by users is low, which affects the viewing experience and the transmission of information, then the value of this video will be reduced, and it will be discarded in the endless network space like garbage. Every day, the same piece of video data undergoes countless round-trip transmissions. People need videos to reach their user devices quickly and obtain the latest information in real time in order to continue to move forward in this competitive society. Of course, the timeliness of video requires that the transmission speed must be fast. Therefore, how to transmit a large amount of important high-definition video information in an open wireless environment, how to improve the quality of the acquired video image, and realize fast and secure transmission has become a hot spot in the field of video processing.

当前比较常用的图像预处理技术有色彩插值、色彩校正、伽马校正、图像增强和白平衡等。3A算法,是通过自动对焦、自动曝光、自动白平衡对图像进行分析,实现图像对比度最大、改善目标拍摄物曝光过度或者不足的情况,使画面在不同光线照射下的色差得到补偿,从而呈现较高质量的图像信息。The currently commonly used image preprocessing techniques include color interpolation, color correction, gamma correction, image enhancement, and white balance. The 3A algorithm is to analyze the image through auto-focus, auto-exposure, and auto-white balance to achieve maximum image contrast, improve the overexposure or underexposure of the target subject, and compensate the chromatic aberration of the picture under different light irradiation, so as to present a brighter image. High-quality image information.

DM8127芯片针对安防监控做了特殊优化,拥有独特的低照技术和高效率压缩功能,以1080P60帧/s全帧率输出视频,集3D降噪、宽动态范围和强光抑制处理技术、面部检测、视频稳定以及变焦失真校正等图像信号处理技术于一体,此外还采用最高支持1600万像素的图像采集技术,结合独有的750MHz的DSP用以智能分析,用于实现智能前端的高清化监控。The DM8127 chip is specially optimized for security monitoring. It has a unique low-light technology and high-efficiency compression function. It outputs video at a full frame rate of 1080P60 frames/s. It integrates 3D noise reduction, wide dynamic range and strong light suppression processing technology, and face detection. , video stabilization, zoom distortion correction and other image signal processing technologies, in addition, it also adopts the image acquisition technology that supports up to 16 million pixels, combined with the unique 750MHz DSP for intelligent analysis, and is used to realize the high-definition monitoring of the intelligent front end.

发明内容Contents of the invention

本发明以图像预处理为基本出发点,提出了一种基于DM8127的改进3A图像预处理算法。DM8127芯片具有分辨率高,算法库丰富、多核通信、DSP计算性能优越等优势,所以该方法以DM8127芯片作为计算平台,基于3A算法,对接收端的图像进行预处理,对寻找最优值的过程进行优化,在景深模糊与噪声之间寻找最佳平衡点,提高了图像质量。The present invention takes image preprocessing as the basic starting point, and proposes an improved 3A image preprocessing algorithm based on DM8127. The DM8127 chip has the advantages of high resolution, rich algorithm library, multi-core communication, and superior DSP computing performance. Therefore, this method uses the DM8127 chip as the computing platform, based on the 3A algorithm, to preprocess the image at the receiving end, and to optimize the process of finding the optimal value. Optimized to find the best balance between depth of field blur and noise, improving image quality.

本发明采用的具体技术方案如下:The concrete technical scheme that the present invention adopts is as follows:

一种基于DM8127的改进3A图像预处理算法,通过DM8127视频处理系统向PC机发送视频图像进行图像采集,采集过程基于3A算法,3A算法是通过自动对焦、自动曝光、自动白平衡对图像进行分析,实现图像对比度最大、改善目标拍摄物曝光过度或者不足的情况,使画面在不同光线照射下的色差得到补偿,从而呈现较高质量的图像信息。An improved 3A image preprocessing algorithm based on DM8127. The video image is sent to the PC through the DM8127 video processing system for image acquisition. The acquisition process is based on the 3A algorithm. The 3A algorithm analyzes the image through auto focus, auto exposure, and auto white balance. , realize the maximum image contrast, improve the overexposure or underexposure of the target subject, and compensate the chromatic aberration of the picture under different light irradiation, thereby presenting higher quality image information.

在上述技术方案中,DM8127主要由ARM核与DSP核两部分组成,其中,ARM核为Cortext-A8处理器,DSP核为数字信号处理器,还集成了M3-VPSS核和M3-VIDEO核这两个ARMCortex-M3核作为协处理器,分别用于高清视频处理子系统(High-Definition VideoProcessing Subsystem,HDVPSS)和高清视频图像协处理器(High-Definition VideoImage Coprocessor,HDVICP2)的控制和管理。DM8127各个核之间由L3内部总线连接,通过L3总线实现各个部件间的相互访问,其中,ARM核运行Linux系统调用VPSS核、Video核、DSP核,控制各个模块功能的实现。M3-VPSS核运行BIOS系统后,实现图像的采集与显示及缩放等;M3-VIDEO核运行BIOS系统后,接收预处理的图像数据,负责视频图像编解码处理工作。DSP核负责算法应用,运行BIOS系统进行图像的加密运算,最后,ARM核接收到数据流后,进行网络传输。In the above technical solution, DM8127 is mainly composed of ARM core and DSP core. Among them, the ARM core is a Cortext-A8 processor, and the DSP core is a digital signal processor. It also integrates M3-VPSS core and M3-VIDEO core. Two ARM Cortex-M3 cores are used as coprocessors for the control and management of the High-Definition Video Processing Subsystem (HDVPSS) and the High-Definition Video Image Coprocessor (HDVICP2) respectively. The cores of DM8127 are connected by the L3 internal bus, and the mutual access between the components is realized through the L3 bus. Among them, the ARM core runs the Linux system and calls the VPSS core, Video core, and DSP core to control the realization of the functions of each module. After the M3-VPSS core runs the BIOS system, it realizes image acquisition, display and zooming, etc.; after the M3-VIDEO core runs the BIOS system, it receives the pre-processed image data and is responsible for video image encoding and decoding processing. The DSP core is responsible for the application of the algorithm, and runs the BIOS system to perform image encryption operations. Finally, the ARM core receives the data stream and transmits it over the network.

本发明的进一步改进,对算法进行最优值优化,对全局搜索进行优化,将全局搜索范围划分为不同区域,每个区域采用不同的步长,针对对焦搜索问题,可以减少搜索的次数,有较好的搜索效果。The further improvement of the present invention optimizes the optimal value of the algorithm, optimizes the global search, divides the global search range into different regions, each region adopts a different step size, and can reduce the number of searches for the focus search problem. Better search results.

在上述技术方案中,自动曝光的过程分为两步:自动增益和自动光圈。自动增益是与光圈配合,调节进光量大小,DM8127平台的H3A模块进行计算当前亮度值curY,设目标亮度为targetY,计算比例ratio,计算公式如下:In the above technical solution, the automatic exposure process is divided into two steps: automatic gain and automatic aperture. The automatic gain is to cooperate with the aperture to adjust the amount of incoming light. The H3A module of the DM8127 platform calculates the current brightness value curY, sets the target brightness as targetY, and calculates the ratio ratio. The calculation formula is as follows:

Figure BDA0004080368500000021
Figure BDA0004080368500000021

再根据比例ratio调整曝光时间、传感器增益与芯片数字增益三项参数。Then adjust the three parameters of exposure time, sensor gain and chip digital gain according to the ratio ratio.

自动光圈是计算质量评价函数,改变光圈寻找最大值,定义对光圈的图像质量评价函数F(I)如下:The automatic aperture is to calculate the quality evaluation function, change the aperture to find the maximum value, and define the image quality evaluation function F(I) for the aperture as follows:

Figure BDA0004080368500000031
Figure BDA0004080368500000031

其中,采集图像I(x,y)与场景图像R(x,y)基本上是一致的,而场景图像R(x,y)质量未知,所以用采集图像I(x,y)的质量作为最佳光圈的标准。h(x,y,σ)为模糊函数,噪声受增益g的影响,最佳的图像质量应为景深模糊与噪声的平衡。Among them, the collected image I(x, y) is basically the same as the scene image R(x, y), and the quality of the scene image R(x, y) is unknown, so the quality of the collected image I(x, y) is used as The standard for optimum aperture. h(x, y, σ) is a blur function, and the noise is affected by the gain g, and the best image quality should be the balance between the depth of field blur and the noise.

自动白平衡包括光照估计和图像色彩校正。将图像分区域寻找灰色区域,白平衡算法在实验平台上实现,并调整参数使得结果收敛,比常用的自动白平衡算法取得了更好的效果。自动白平衡包括光照估计和图像色彩校正。灰度世界和完美反射是两种经典常见的假设算法。灰度世界的核心思想是控制三个通道的平均值相等,完美反射的核心思想则是控制三个通道的最大值相等。两种方法各有优缺点,对不同场景的适用程度不同。为了克服两种方法的缺陷,本发明在光照估计这一步骤中提出一种改进算法:将图像分区,越接近灰色越能满足灰度世界假设,调节每一区域中三个通道的增益,使各区域的均值接近灰色。定义图像I(,y,y),新增系数μr、μb、γr、γb用于校正图像的像素,根据式(1)和式(2)可以计算新的像素值,根据式(3)和(4)计算新的像素均值,根据式(5)和式(6)计算新的最大值:Automatic white balance includes lighting estimation and image color correction. The image is divided into areas to find the gray area, the white balance algorithm is implemented on the experimental platform, and the parameters are adjusted to make the result converge, which achieves better results than the commonly used automatic white balance algorithm. Automatic white balance includes lighting estimation and image color correction. Grayscale world and perfect reflection are two classic common assumption algorithms. The core idea of the grayscale world is to control the average values of the three channels to be equal, and the core idea of perfect reflection is to control the maximum values of the three channels to be equal. Both methods have their own advantages and disadvantages, and are applicable to different scenarios in different degrees. In order to overcome the defects of the two methods, the present invention proposes an improved algorithm in the step of illumination estimation: the image is partitioned, the closer to gray, the gray world assumption can be satisfied, and the gains of the three channels in each area are adjusted so that The mean of each area is close to gray. Define the image I(, y, y), and add coefficients μ r , μ b , γ r , γ b to correct the pixels of the image. According to formula (1) and formula (2), new pixel values can be calculated. According to formula (3) and (4) calculate the new pixel mean value, and calculate the new maximum value according to formula (5) and formula (6):

Figure BDA0004080368500000032
Figure BDA0004080368500000032

Figure BDA0004080368500000033
Figure BDA0004080368500000033

meanG=μrmeanR2rmeanR (3)meanG=μ r meanR 2r meanR (3)

meanG=μbmeanB2bmeanB (4)meanG=μ b meanB 2b meanB (4)

max(Rnew)=max{Ig(x,y)} (5)max(R new )=max{I g (x,y)} (5)

max(Bnew)=max{Ig(x,y)} (6)max(B new )=max{I g (x, y)} (6)

该改进方法不对绿色通道进行修正,满足灰度世界算法,新的红、蓝通道的均值与绿色通道相等;满足完美反射算法,新的红、蓝通道的最大值与绿色通道相等,将式(1)和式(2)代入式(5)和式(6)得:This improved method does not correct the green channel, and satisfies the gray-scale world algorithm, and the mean values of the new red and blue channels are equal to the green channel; satisfies the perfect reflection algorithm, and the maximum values of the new red and blue channels are equal to the green channel, and the formula ( 1) and formula (2) are substituted into formula (5) and formula (6) to get:

Figure BDA0004080368500000034
Figure BDA0004080368500000034

Figure BDA0004080368500000035
Figure BDA0004080368500000035

根据式(3)、式(4)、式(7)、式(8)将红、蓝通道的均值和最大值用矩阵形式表示,如式(9)和式(10)所示:According to formula (3), formula (4), formula (7), formula (8), the mean value and maximum value of the red and blue channels are expressed in matrix form, as shown in formula (9) and formula (10):

Figure BDA0004080368500000041
Figure BDA0004080368500000041

Figure BDA0004080368500000042
Figure BDA0004080368500000042

采用Gaussian消去法进行求解,得到红、蓝通道的增益系数如下:Using the Gaussian elimination method to solve, the gain coefficients of the red and blue channels are obtained as follows:

Figure BDA0004080368500000043
Figure BDA0004080368500000043

Figure BDA0004080368500000044
Figure BDA0004080368500000044

Figure BDA0004080368500000045
Figure BDA0004080368500000045

Figure BDA0004080368500000046
Figure BDA0004080368500000046

将此方法在DM8127平台上进行实验,并调整参数使得结果收敛,比常用的自动白平衡算法取得了更好的效果。This method is tested on the DM8127 platform, and the parameters are adjusted to make the result converge, which is better than the commonly used automatic white balance algorithm.

本发明的有益效果:本发明在无光照条件下,通过黑电平调整将各通道的数值尽可能接近于0;自动曝光模块调整曝光时间、光圈大小等参数,选择合适的光照强度;自动对焦确定合适的焦距;自动白平衡是根据不同场景修正色彩的影响;图像中的缺陷像素在坏点校正流程中进行处理;2D降噪能够降低噪声,提高插值的准确性;Bayer插值生产红绿蓝三通道的数据;伽玛校正、彩色校正用于修正图像的对比度和色彩;亮度对比度增强、边缘增强模块能够提升亮度,增强图像清晰度;最后在畸变校正模块对失真图像进行校正。图像预处理的各个模块相对独立,彼此配合,获取高质量图像。Beneficial effects of the present invention: the present invention adjusts the value of each channel as close to 0 as possible under the condition of no light; the automatic exposure module adjusts parameters such as exposure time and aperture size, and selects the appropriate light intensity; autofocus Determine the appropriate focal length; automatic white balance is to correct the influence of color according to different scenes; defective pixels in the image are processed in the dead point correction process; 2D noise reduction can reduce noise and improve the accuracy of interpolation; Bayer interpolation produces red, green and blue Three-channel data; gamma correction and color correction are used to correct the contrast and color of the image; the brightness contrast enhancement and edge enhancement modules can improve brightness and enhance image clarity; finally, the distortion correction module corrects the distorted image. Each module of image preprocessing is relatively independent and cooperates with each other to obtain high-quality images.

附图说明Description of drawings

图1为本发明实施例中的预处理流程图。FIG. 1 is a flow chart of preprocessing in an embodiment of the present invention.

图2为本发明实施例中的算法流程图。Fig. 2 is an algorithm flow chart in the embodiment of the present invention.

图3为本发明实施例中的自动曝光流程图。Fig. 3 is a flow chart of automatic exposure in the embodiment of the present invention.

图4为本发明实施例中的H3A模块框图。Fig. 4 is a block diagram of the H3A module in the embodiment of the present invention.

具体实施方式Detailed ways

为了加深对本发明的理解,下面将结合附图和实施例对本发明做进一步详细描述,该实施例仅用于解释本发明,并不对本发明的保护范围构成限定。In order to deepen the understanding of the present invention, the present invention will be described in further detail below in conjunction with the accompanying drawings and embodiments, which are only used to explain the present invention and do not limit the protection scope of the present invention.

实施例:如图1所示,一种基于DM8127的改进3A图像预处理算法,通过DM8127视频处理系统向PC机发送视频图像,考虑影响图像质量的各个因素,从图像色彩、光照强度、摄像机焦距等多个模块进行研究,使各个模块相互调节配合:在无光照条件下,通过黑电平调整将各通道的数值尽可能接近于0;自动曝光模块调整曝光时间、光圈大小等参数,选择合适的光照强度;自动对焦确定合适的焦距;自动白平衡是根据不同场景修正色彩的影响;图像中的缺陷像素在坏点校正流程中进行处理;2D降噪能够降低噪声,提高插值的准确性;Bayer插值生产红绿蓝三通道的数据;伽玛校正、彩色校正用于修正图像的对比度和色彩;亮度对比度增强、边缘增强模块能够提升亮度,增强图像清晰度;最后在畸变校正模块对失真图像进行校正。图像预处理的各个模块相对独立,彼此配合,获取高质量图像。Embodiment: as shown in Figure 1, a kind of improved 3A image preprocessing algorithm based on DM8127, send video image to PC through DM8127 video processing system, consider each factor that affects image quality, from image color, illumination intensity, camera focal length and other modules to conduct research, so that each module can adjust and cooperate with each other: under the condition of no light, the value of each channel is as close to 0 as possible through black level adjustment; the automatic exposure module adjusts parameters such as exposure time and aperture size, and selects the appropriate The intensity of light; Auto focus to determine the appropriate focal length; Auto white balance corrects the influence of color according to different scenes; Defective pixels in the image are processed in the dead point correction process; 2D noise reduction can reduce noise and improve the accuracy of interpolation; Bayer interpolation produces red, green and blue three-channel data; gamma correction and color correction are used to correct the contrast and color of the image; brightness contrast enhancement and edge enhancement modules can improve brightness and enhance image clarity; finally, distorted images are corrected in the distortion correction module Make corrections. Each module of image preprocessing is relatively independent and cooperates with each other to obtain high-quality images.

如图2所示,本发明在DM8127视频处理系统的基础上,对H3A模块进行优化研究和调节,实现图像质量的优化,通过ISIF、H3A、IPIPE三个硬件模块进行图像预处理。同时预处理过程还增加了2A(自动曝光及自动白平衡)、场景自适应局部动态范围增强、视频稳定、镜头畸变校正、噪声滤波、屏幕软件显示等算法进行优化调节。As shown in Figure 2, on the basis of the DM8127 video processing system, the present invention optimizes, studies and adjusts the H3A module to optimize the image quality, and performs image preprocessing through the three hardware modules of ISIF, H3A and IPIPE. At the same time, the preprocessing process also adds 2A (automatic exposure and automatic white balance), scene adaptive local dynamic range enhancement, video stabilization, lens distortion correction, noise filtering, screen software display and other algorithms for optimization and adjustment.

图3为本发明实施例中的自动曝光流程图。首先设定初始光圈,根据实际场景计算亮度。如果在阈值范围内,参数不变。如果超过阈值,判断是否达到低光照阈值的条件,小于低光照阈值时,选用最大光圈和最大曝光时间进行增益;大于低光照阈值时,按照正常光照进行实验。正常光照下,根据质量评价函数调整光圈大小,找到函数最大值,自动曝光过程结束,未找到最大值,则重复如下步骤直至找到最大值:根据场景亮度调整光圈方向。若光照强度变大,则闭合调整光圈;若光照强度变小,则打开调整光圈。Fig. 3 is a flow chart of automatic exposure in the embodiment of the present invention. First set the initial aperture, and calculate the brightness according to the actual scene. If within the threshold range, the parameters are unchanged. If it exceeds the threshold, judge whether the low-light threshold is met. When it is less than the low-light threshold, select the maximum aperture and maximum exposure time for gain; if it is greater than the low-light threshold, conduct the experiment according to normal light. Under normal lighting, adjust the aperture size according to the quality evaluation function, find the maximum value of the function, the automatic exposure process ends, if the maximum value is not found, repeat the following steps until the maximum value is found: adjust the aperture direction according to the brightness of the scene. If the light intensity becomes larger, then close the adjustment aperture; if the light intensity becomes smaller, then open the adjustment aperture.

正常光照条件下,首先调节增益,利用DM8127平台的H3A模块进行计算,再根据设定的目标亮度targetY,计算公式如下:Under normal lighting conditions, first adjust the gain, use the H3A module of the DM8127 platform to calculate, and then according to the set target brightness targetY, the calculation formula is as follows:

Figure BDA0004080368500000051
Figure BDA0004080368500000051

再计算当前图像的质量评价函数,如下式:Then calculate the quality evaluation function of the current image, as follows:

Figure BDA0004080368500000052
Figure BDA0004080368500000052

根据质量评价函数寻找最大值,光圈设为该最大值,自动曝光过程结束;若无最大值,根据光照方向调整增益。若场景变亮,应闭合光圈,减少景深模糊;若场景变暗,应打开光圈,降低噪声影响,重复这一过程直至找到最优值。Find the maximum value according to the quality evaluation function, set the aperture to the maximum value, and the automatic exposure process ends; if there is no maximum value, adjust the gain according to the direction of light. If the scene becomes brighter, the aperture should be closed to reduce the depth of field blur; if the scene is darker, the aperture should be opened to reduce the impact of noise, and this process is repeated until the optimal value is found.

如图4所示,DM8127的硬件3A模块为自动曝光提供像素统计的硬件支持,采集过程如下:As shown in Figure 4, the hardware 3A module of DM8127 provides hardware support for pixel statistics for automatic exposure, and the acquisition process is as follows:

首先对图像进行降采样,将每一帧图像分成窗口,每个窗口分为2×2的块,对每个块每个像素被分别统计,然后对图像进行饱和检查,若块的像素超过限定,则不计入未饱和块数目,替换限定值后再统计。最后对每个像素窗口进行累加并输出。First, the image is down-sampled, and each frame of image is divided into windows, and each window is divided into 2×2 blocks, and each pixel of each block is counted separately, and then the image is saturated. Check, if the pixel of the block exceeds the limit , the number of unsaturated blocks will not be counted, and the count will be counted after replacing the limit value. Finally, each pixel window is accumulated and output.

对H3A模块进行深入的研究和分析,本发明通过对景深模糊的研究,将景深带来的模糊加入到光圈调整的考虑因素中,提出了一种针对最优化光圈的评价函数,结合此评价函数,可以寻找到最佳光圈大小,找到景深模糊与噪声之间的最佳平衡点,使图像综合质量达到最优。Through the in-depth research and analysis of the H3A module, the present invention adds the blur caused by the depth of field into the consideration factors of the aperture adjustment through the research on the blur of the depth of field, and proposes an evaluation function for the optimal aperture. Combined with this evaluation function , you can find the optimal aperture size, find the optimal balance point between depth of field blur and noise, and optimize the comprehensive image quality.

以上显示和描述了本发明的基本原理、主要特征及优点。本行业的技术人员应该了解,本发明不受上述实施例的限制,上述实施例和说明书中描述的只是说明本发明的原理,在不脱离本发明精神和范围的前提下,本发明还会有各种变化和改进,这些变化和改进都落入要求保护的本发明范围内。本发明要求保护范围由所附的权利要求书及其等效物界定。The basic principles, main features and advantages of the present invention have been shown and described above. Those skilled in the industry should understand that the present invention is not limited by the above-mentioned embodiments. What are described in the above-mentioned embodiments and the description only illustrate the principle of the present invention. Without departing from the spirit and scope of the present invention, the present invention will also have Variations and improvements are possible, which fall within the scope of the claimed invention. The protection scope of the present invention is defined by the appended claims and their equivalents.

Claims (6)

1. The improved 3A image preprocessing algorithm based on the DM8127 is characterized in that a DM8127 video processing system sends video images to a PC for image acquisition, the acquisition process is based on a 3A algorithm, and the 3A algorithm specifically comprises automatic focusing, automatic exposure and automatic white balance.
2. The improved 3A image preprocessing algorithm based on DM8127 as set forth in claim 1, wherein the DM8127 VIDEO processing system is composed of an ARM core and a DSP core, wherein the ARM core is a Cortex-A8 processor, the DSP core is a digital signal processor, and two ARM Cortex-M3 cores, an M3-VPSS core and an M3-VIDEO core, are integrated as coprocessors for controlling and managing the high definition VIDEO processing subsystem and the high definition VIDEO image coprocessor, respectively; the cores of the DM8127 are connected by an L3 internal bus, and mutual access among the components is realized through the L3 bus.
3. The improved DM8127 based 3A image preprocessing algorithm as recited in claim 2, wherein the process of automatic exposure is divided into two steps: the automatic gain and the automatic aperture, the target brightness is set as targetY, the ratio is calculated, and the calculation formula is as follows:
Figure QLYQS_1
and adjusting three parameters of exposure time, sensor gain and chip digital gain according to the ratio.
4. The improved DM8127 based 3A image preprocessing algorithm as set forth in claim 3, wherein the automatic aperture is a calculated quality-evaluation function, the aperture-finding maximum is changed, and the image quality-evaluation function F (I) for the aperture is defined as follows:
Figure QLYQS_2
wherein the acquired image I (x, y) is substantially identical to the scene image R (x, y) and the scene image R (x, y) is of unknown quality, so the quality of the acquired image I (x, y) is used as a standard of an optimal aperture, h (x, y, sigma) is a blurring function, noise is influenced by the gain g, and the optimal image quality should be a balance of depth blurring and noise.
5. The improved 3A image preprocessing algorithm based on DM8127 as set forth in claim 4, wherein in said automatic exposure process, the image is partitioned, the closer to gray the more can be satisfied the gray world assumption, the gains of three channels in each region are adjusted so that the average value of each region is close to gray, the image I (x, y) is defined, and the new coefficient μ is added r 、μ b 、γ r 、γ b Pixels for correcting an image, new pixel values are calculated according to the formula (1) and the formula (2), new pixel mean values are calculated according to the formula (3) and the formula (4), and new maximum values are calculated according to the formula (5) and the formula (6):
Figure QLYQS_3
Figure QLYQS_4
meanG=μ r meanR 2r meanR (3)
meanG=μ b meanB 2b mmeanB (4)
max(R new )=max{I g (x,y)} (5)
max(B new )=max{I g (x,y)} (6),
substituting the formula (1) and the formula (2) into the formula (5) and the formula (6) to obtain:
Figure QLYQS_5
Figure QLYQS_6
the average value and the maximum value of the red and blue channels are expressed in matrix form according to the formula (3), the formula (4), the formula (7) and the formula (8), as shown in the formulas (9) and (10):
Figure QLYQS_7
Figure QLYQS_8
solving by using a Gaussian elimination method to obtain gain coefficients of the red and blue channels as follows:
Figure QLYQS_9
Figure QLYQS_10
Figure QLYQS_11
Figure QLYQS_12
6. the DM8127 based improved 3A image preprocessing algorithm as recited in claim 5, wherein the DM8127 video processing system 3A module provides hardware support for pixel statistics for automatic exposure, and the acquisition process is as follows: firstly, downsampling an image, dividing each frame of image into windows, dividing each window into 2 multiplied by 2 blocks, respectively counting each pixel of each block, then carrying out saturation examination on the image, if the pixels of the block exceed the limit, counting after replacing the limit value, and finally accumulating and outputting each pixel window without counting the number of unsaturated blocks.
CN202310122254.XA 2023-02-16 2023-02-16 An Improved 3A Image Preprocessing Algorithm Based on DM8127 Pending CN116193276A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310122254.XA CN116193276A (en) 2023-02-16 2023-02-16 An Improved 3A Image Preprocessing Algorithm Based on DM8127

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310122254.XA CN116193276A (en) 2023-02-16 2023-02-16 An Improved 3A Image Preprocessing Algorithm Based on DM8127

Publications (1)

Publication Number Publication Date
CN116193276A true CN116193276A (en) 2023-05-30

Family

ID=86437957

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310122254.XA Pending CN116193276A (en) 2023-02-16 2023-02-16 An Improved 3A Image Preprocessing Algorithm Based on DM8127

Country Status (1)

Country Link
CN (1) CN116193276A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1455910A (en) * 2000-07-18 2003-11-12 索尼电子有限公司 Color cast detection and removal in digital images
CN103984967A (en) * 2014-05-08 2014-08-13 杭州同尊信息技术有限公司 Automatic detection system and automatic detection method applied to commodity label detection

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1455910A (en) * 2000-07-18 2003-11-12 索尼电子有限公司 Color cast detection and removal in digital images
CN103984967A (en) * 2014-05-08 2014-08-13 杭州同尊信息技术有限公司 Automatic detection system and automatic detection method applied to commodity label detection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
杨波: "基于DM8127的高清视频分析平台的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 3, 15 March 2016 (2016-03-15), pages 6 - 25 *

Similar Documents

Publication Publication Date Title
WO2021077963A1 (en) Image fusion method and apparatus, electronic device, and readable storage medium
US8111300B2 (en) System and method to selectively combine video frame image data
US8797421B2 (en) System and method to selectively combine images
US8135235B2 (en) Pre-processing method and apparatus for wide dynamic range image processing
CN107038680B (en) Self-adaptive illumination beautifying method and system
CN110072051A (en) Image processing method and device based on multiple image
JP2024502938A (en) High dynamic range technique selection for image processing
CN110619593A (en) Double-exposure video imaging system based on dynamic scene
CN202190327U (en) Low-illumination camera imaging control device and shooting system
CN109816608B (en) An adaptive brightness enhancement method for low-illumination images based on noise suppression
CN110062159A (en) Image processing method and device based on multi-frame image and electronic equipment
CN116324882A (en) Image signal processing in a multi-camera system
CN110868548B (en) An image processing method and electronic device
CN108156369A (en) Image processing method and device
US8655098B2 (en) Image signal processing apparatus and computer-readable recording medium recording image signal processing program
CN107392879B (en) A low-illumination surveillance image enhancement method based on reference frames
CN107341782B (en) Image processing method, image processing device, computer equipment and computer readable storage medium
Jiang et al. Multiple templates auto exposure control based on luminance histogram for onboard camera
CN107682611A (en) Method, apparatus, computer-readable recording medium and the electronic equipment of focusing
JP5619882B2 (en) Lens roll-off correction operation using values corrected based on luminance information
KR20120122574A (en) Apparatus and mdthod for processing image in a digital camera
CN113891081A (en) Video processing method, device and equipment
CN107451971A (en) The blind convolved image restoring method of low-light (level) of priori is combined based on dark and Gauss
CN116193276A (en) An Improved 3A Image Preprocessing Algorithm Based on DM8127
JP2012134745A (en) Image signal processing device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination