CN105847708B - Line-scan digital camera automatic exposure method of adjustment based on image histogram analysis and system - Google Patents
Line-scan digital camera automatic exposure method of adjustment based on image histogram analysis and system Download PDFInfo
- Publication number
- CN105847708B CN105847708B CN201610355163.0A CN201610355163A CN105847708B CN 105847708 B CN105847708 B CN 105847708B CN 201610355163 A CN201610355163 A CN 201610355163A CN 105847708 B CN105847708 B CN 105847708B
- Authority
- CN
- China
- Prior art keywords
- value
- image
- exposure
- histogram
- adjustment
- 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.)
- Active
Links
- 238000004458 analytical method Methods 0.000 title claims abstract description 22
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000012937 correction Methods 0.000 claims description 6
- 238000001914 filtration Methods 0.000 claims description 5
- 230000000694 effects Effects 0.000 abstract description 5
- 238000003384 imaging method Methods 0.000 description 5
- 230000009466 transformation Effects 0.000 description 4
- 238000004364 calculation method Methods 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 2
- 230000001186 cumulative effect Effects 0.000 description 1
- 238000013480 data collection Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000005375 photometry Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000007619 statistical method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N23/00—Cameras or camera modules comprising electronic image sensors; Control thereof
- H04N23/70—Circuitry for compensating brightness variation in the scene
- H04N23/73—Circuitry for compensating brightness variation in the scene by influencing the exposure time
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/40—Image enhancement or restoration using histogram techniques
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Studio Devices (AREA)
- Image Input (AREA)
Abstract
本发明提供一种基于图像直方图分析的线阵相机自动曝光调整方法及系统,包括计算当前图像的灰度直方图,对灰度直方图进行归一化,获取当前图像的直方图的左边界、右边界和峰值;根据图像灰度直方图的期望峰值,计算相机曝光调整值;如果相机曝光调整值的绝对值大于等于调整阈值计算得到新的当前曝光值,绝对值小于调整阈值则不进行调整保持当前曝光值,根据当前曝光值进行拍照,当获取新的图像作为当前图像后,继续调整。本发明通过对获取的图像数据进行直方图分析,利用期望的影像质量和其直方图分布特征对相机曝光时间调整,达到相机自动调整曝光时间的效果。
The present invention provides an automatic exposure adjustment method and system for line array cameras based on image histogram analysis, including calculating the gray histogram of the current image, normalizing the gray histogram, and obtaining the left boundary of the histogram of the current image , right boundary and peak value; calculate the camera exposure adjustment value according to the expected peak value of the grayscale histogram of the image; if the absolute value of the camera exposure adjustment value is greater than or equal to the adjustment threshold value, the new current exposure value is calculated, and the absolute value is less than the adjustment threshold value. Adjust to maintain the current exposure value, take pictures according to the current exposure value, and continue to adjust after obtaining a new image as the current image. The present invention performs histogram analysis on acquired image data, utilizes expected image quality and its histogram distribution characteristics to adjust camera exposure time, and achieves the effect of camera automatically adjusting exposure time.
Description
技术领域technical field
本发明涉及数字图像处理领域,尤其涉及一种基于图像直方图分析的线阵相机自动曝光调整方法及系统。The invention relates to the field of digital image processing, in particular to an automatic exposure adjustment method and system for a line array camera based on image histogram analysis.
背景技术Background technique
对野外运动目标(如火车)成像,考虑到运动和拼接因素,多采用线阵相机拍照。相对于野外图像数据采集的环境来说,有源光源的补光是拍照的必要条件,但外部环境的变化,如夜晚、晴天、阴雨天、阳光直射、运动等现象的干扰,如何有效的消除,获得更好的图像效果,是必须解决的问题。图像的直方图分析通常用于图像的统计分析,可用于均衡化(如“一种红外图像的直方图均衡化方法”(CN 104252700A),但是鲜有用于反向指导调节相机曝光参数的方法。For imaging of moving targets (such as trains) in the field, taking into account the factors of movement and stitching, line array cameras are often used to take pictures. Compared with the environment of field image data collection, the supplementary light of active light sources is a necessary condition for taking pictures, but how to effectively eliminate the interference of external environment changes, such as night, sunny days, cloudy and rainy days, direct sunlight, and sports , to obtain a better image effect is a problem that must be solved. Image histogram analysis is usually used for statistical analysis of images and can be used for equalization (such as "a histogram equalization method for infrared images" (CN 104252700A), but there are few methods for reverse guidance and adjustment of camera exposure parameters.
通过测光设备、光强测量等手段,对外部环境光的变化进行测量,需要考虑阴影区域、外接光源干扰、物体运动等因素,并对成像物体自身反光等现象,当前还没有比较好的解决办法。因此,有必要提供一种新的相机曝光方法来自动调整,以方便获取明暗适宜、成像效果清晰的动态场景图片。To measure changes in external ambient light by means of photometry equipment, light intensity measurement, etc., factors such as shadow areas, external light source interference, and object movement need to be considered, as well as reflections on the imaging object itself. Currently, there is no good solution. Method. Therefore, it is necessary to provide a new camera exposure method to automatically adjust, so as to facilitate the acquisition of dynamic scene pictures with suitable brightness and clear imaging effect.
发明内容Contents of the invention
为了解决上述问题,本发明提出一种基于图像直方图分析的线阵相机自动曝光调整方法及系统,从成像质量分析上,把外部干扰因素体现在成像结果上,通过图像直方图分析获取适合当前环境和当前时刻的曝光时间,从而获取高质量图像。In order to solve the above problems, the present invention proposes an automatic exposure adjustment method and system for line scan cameras based on image histogram analysis. From the perspective of imaging quality analysis, external interference factors are reflected in the imaging results, and the current environment and the exposure time at the current moment to obtain high-quality images.
本发明的技术方案提供一种基于图像直方图分析的线阵相机自动曝光调整方法,其特征在于,包括以下步骤:The technical solution of the present invention provides a method for automatically adjusting the exposure of a line-scan camera based on image histogram analysis, which is characterized in that it comprises the following steps:
步骤1、获取当前图像,计算当前图像的灰度直方图,对灰度直方图进行归一化,获取当前图像的直方图的左边界Left_Pos、右边界Rigt_Pos和峰值;Step 1, obtain the current image, calculate the grayscale histogram of the current image, normalize the grayscale histogram, and obtain the left boundary Left_Pos, right boundary Rigt_Pos and peak value of the histogram of the current image;
步骤2、根据图像灰度直方图的期望峰值Exp_Bright,计算相机曝光调整值CExp如下,Step 2. Calculate the camera exposure adjustment value CExp according to the expected peak value Exp_Bright of the image gray histogram as follows,
其中,Exp_Bright为图像直方图的期望峰值,Left_Sec_Pos和Rigt_Sec_Pos为剔除边界峰值后的二次边界值,修正系数k1、k2为图像直方图线性变换系数;Among them, Exp_Bright is the expected peak value of the image histogram, Left_Sec_Pos and Rigt_Sec_Pos are the secondary boundary values after removing the boundary peak value, and the correction coefficients k1 and k2 are the linear transformation coefficients of the image histogram;
步骤3、比较相机曝光调整值CExp的绝对值和预设的调整阈值,如果相机曝光调整值CExp的绝对值大于等于调整阈值,将相机曝光调整值和当前曝光值相加,得到新的当前曝光值,进入步骤4;如果相机曝光调整值CExp的绝对值小于调整阈值,则不进行调整,保持当前曝光值,进入步骤4;Step 3. Compare the absolute value of the camera exposure adjustment value CExp with the preset adjustment threshold. If the absolute value of the camera exposure adjustment value CExp is greater than or equal to the adjustment threshold, add the camera exposure adjustment value and the current exposure value to obtain a new current exposure value, go to step 4; if the absolute value of the camera exposure adjustment value CExp is less than the adjustment threshold, no adjustment will be made, and the current exposure value will be kept, and go to step 4;
步骤4、根据当前曝光值进行拍照,当获取新的图像作为当前图像后,重新返回步骤1,继续调整。Step 4. Take pictures according to the current exposure value. After obtaining a new image as the current image, return to step 1 and continue to adjust.
而且,根据预设的过滤阈值,对直方图进行截取,更新当前图像的直方图的左边界Left_Pos、右边界Rigt_Pos和峰值。Moreover, the histogram is intercepted according to the preset filtering threshold, and the left boundary Left_Pos, the right boundary Rigt_Pos and the peak value of the histogram of the current image are updated.
而且,当前图像的行数采用预设的数值m。Moreover, the number of rows of the current image adopts a preset value m.
而且,m=1000。Also, m=1000.
而且,根据预设的数值n,n>1,步骤4中根据当前曝光值进行拍照时,是等待拍摄(n-1)×m行后才提取最新的m行图像作为新的当前图像,然后重新返回步骤1,继续调整。Moreover, according to the preset value n, n>1, when taking pictures according to the current exposure value in step 4, it is to wait for (n-1)×m lines to be taken before extracting the latest m lines of images as the new current image, and then Go back to step 1 and continue to adjust.
本发明还相应提供一种基于图像直方图分析的线阵相机自动曝光调整系统,包括以下模块:The present invention also correspondingly provides an automatic exposure adjustment system for line array cameras based on image histogram analysis, including the following modules:
第一模块,用于获取当前图像,计算当前图像的灰度直方图,对灰度直方图进行归一化,获取当前图像的直方图的左边界Left_Pos、右边界Rigt_Pos和峰值;The first module is used to obtain the current image, calculate the gray histogram of the current image, normalize the gray histogram, and obtain the left boundary Left_Pos, the right boundary Rigt_Pos and the peak value of the histogram of the current image;
第二模块,用于根据图像灰度直方图的期望峰值Exp_Bright,计算相机曝光调整值CExp如下,The second module is used to calculate the camera exposure adjustment value CExp according to the expected peak value Exp_Bright of the image grayscale histogram as follows,
其中,Exp_Bright为图像直方图的期望峰值,Left_Sec_Pos和Rigt_Sec_Pos为剔除边界峰值后的二次边界值,修正系数k1、k2为图像直方图线性变换系数;Among them, Exp_Bright is the expected peak value of the image histogram, Left_Sec_Pos and Rigt_Sec_Pos are the secondary boundary values after removing the boundary peak value, and the correction coefficients k1 and k2 are the linear transformation coefficients of the image histogram;
第三模块,用于比较相机曝光调整值CExp的绝对值和预设的调整阈值,如果相机曝光调整值CExp的绝对值大于等于调整阈值,将相机曝光调整值和当前曝光值相加,得到新的当前曝光值,命令第四模块工作;如果相机曝光调整值CExp的绝对值小于调整阈值,则不进行调整,保持当前曝光值,命令第四模块工作;The third module is used to compare the absolute value of the camera exposure adjustment value CExp with the preset adjustment threshold. If the absolute value of the camera exposure adjustment value CExp is greater than or equal to the adjustment threshold, add the camera exposure adjustment value and the current exposure value to obtain a new If the absolute value of the camera exposure adjustment value CExp is less than the adjustment threshold, no adjustment is made, the current exposure value is maintained, and the fourth module is ordered to work;
第四模块,用于根据当前曝光值进行拍照,当获取新的图像作为当前图像后,命令第一模块工作,继续调整。The fourth module is used to take pictures according to the current exposure value, and after obtaining a new image as the current image, order the first module to work and continue to adjust.
而且,根据预设的过滤阈值,对直方图进行截取,更新当前图像的直方图的左边界Left_Pos、右边界Rigt_Pos和峰值。Moreover, the histogram is intercepted according to the preset filtering threshold, and the left boundary Left_Pos, the right boundary Rigt_Pos and the peak value of the histogram of the current image are updated.
而且,当前图像的行数采用预设的数值m。Moreover, the number of rows of the current image adopts a preset value m.
而且,m=1000。Also, m=1000.
而且,根据预设的数值n,n>1,第四模块中根据当前曝光值进行拍照时,是等待拍摄(n-1)×m行后才提取最新的m行图像作为新的当前图像,然后命令第一模块工作,继续调整。Moreover, according to the preset value n, n>1, when taking pictures according to the current exposure value in the fourth module, it is to wait for shooting (n-1)×m lines before extracting the latest m lines of images as the new current image, Then order the first module to work and continue to adjust.
本发明通过对获取的图像数据进行直方图分析,利用峰值位置变化和直方图波形特征的改变,构建曝光时间跟峰值变化的对应关系,从而利用期望的影像质量和其直方图分布特征对相机曝光时间调整,使获得的图像数据的直方图特征与期望值相匹配,从而达到相机自动调整曝光时间的效果。The present invention conducts histogram analysis on the acquired image data, utilizes the change of the peak position and the change of the waveform characteristics of the histogram, and constructs the corresponding relationship between the exposure time and the peak value change, thereby using the desired image quality and its histogram distribution characteristics to expose the camera Time adjustment, so that the histogram characteristics of the obtained image data match the expected value, so as to achieve the effect of the camera automatically adjusting the exposure time.
附图说明Description of drawings
图1为本发明实施例的应用系统体系结构图;Fig. 1 is the application system architecture diagram of the embodiment of the present invention;
图2为本发明实施例调节前获取的图像直方图。Fig. 2 is an image histogram obtained before adjustment according to an embodiment of the present invention.
图3为本发明实施例的调节后获取的对应图像直方图。Fig. 3 is a histogram of corresponding images acquired after adjustment according to an embodiment of the present invention.
具体实施方法Specific implementation method
为了便于本领域普通技术人员理解和实施本发明,下面结合附图及具体实施方式对本发明作进一步的详细描述。In order to make it easier for those skilled in the art to understand and implement the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
本发明实施例所提供一种基于图像直方图分析的线阵相机自动曝光调整方法,包括以下步骤:An embodiment of the present invention provides an automatic exposure adjustment method for a line scan camera based on image histogram analysis, comprising the following steps:
步骤1、获取当前图像,计算当前图像的灰度直方图,对灰度直方图进行归一化,获取当前图像的直方图的左边界、右边界和峰值;Step 1, obtain the current image, calculate the grayscale histogram of the current image, normalize the grayscale histogram, and obtain the left boundary, right boundary and peak value of the histogram of the current image;
实施例在步骤1中,对当前图像的灰度直方图进行归一化处理,为削弱噪声干扰,实施例中设置直方图的过滤阈值k=0.3,对直方图进行截取,从而获得当前图像的直方图新的左边界Left_Pos、右边界Rigt_Pos和峰值。具体实施时,本领域技术人员可自行预设过滤阈值,采用经验值可以削弱噪声的影响。Embodiment In step 1, the grayscale histogram of the current image is normalized. In order to weaken the noise interference, the filter threshold k=0.3 of the histogram is set in the embodiment, and the histogram is intercepted to obtain the grayscale of the current image. Histogram new left boundary Left_Pos, right boundary Rigt_Pos and peak value. During specific implementation, those skilled in the art can preset filtering thresholds by themselves, and using empirical values can weaken the influence of noise.
步骤2、根据图像灰度直方图的期望峰值,计算相机曝光调整值;Step 2. Calculate the camera exposure adjustment value according to the expected peak value of the image gray histogram;
在步骤2中,如果左边界Left_Pos=0或者右边界Rigt_Pos=255,则对图像在新的左右峰值之间求图像的累积分布,从而实现直方图均衡化,获取到均新的直方图的左边界Left_Sec_Pos、右边界Rigt_Sec_Pos。In step 2, if the left boundary Left_Pos=0 or the right boundary Rigt_Pos=255, then calculate the cumulative distribution of the image between the new left and right peaks, so as to achieve histogram equalization and obtain the left of the new histogram Boundary Left_Sec_Pos, Right Boundary Rigt_Sec_Pos.
实施例中,输入理想图像直方图的期望峰值参数Exp_Bright,根据公式计算相机曝光调整值CExp:In the embodiment, the expected peak parameter Exp_Bright of the ideal image histogram is input, and the camera exposure adjustment value CExp is calculated according to the formula:
其中,Exp_Bright为图像直方图的期望峰值,Left_Sec_Pos和Rigt_Sec_Pos为剔除边界峰值后的二次边界值。其中修正系数k1、k2为图像直方图线性变换系数,具体实施例时本领域技术人员可自行预设取值,例如可以通过在固定环境中改变相机的曝光时间得到标准图像灰度均值统计来得到,实施例取k1=5,k2=6。Among them, Exp_Bright is the expected peak of the image histogram, and Left_Sec_Pos and Rigt_Sec_Pos are the secondary boundary values after removing the boundary peak. Among them, the correction coefficients k1 and k2 are linear transformation coefficients of the image histogram, and those skilled in the art can preset the values by themselves during specific embodiments, for example, they can be obtained by changing the exposure time of the camera in a fixed environment to obtain the average gray value of the standard image. , the embodiment takes k1=5, k2=6.
步骤3、为保证系统调整的效率,具体实施时,本领域技术人员可自行预设调整阈值,取值越大效率越高,调整精确度越低,取值越小调整效率越低,调整精度越高。实施例设置调整阈值为10,即相机曝光调整值绝对值大于等于10,则说明效果尚不理想,将相机曝光调整值和当前曝光值相加,得到新的当前曝光值,按新的当前曝光值进入步骤4,进行拍照,当获取新的图像作为当前图像后,将返回步骤1,重复执行步骤1、步骤2和步骤3继续调整;如果曝光调整值绝对值小于10,则当前无需调整,令相机调整值等于零,保持使用当前曝光值,进入步骤4;Step 3. In order to ensure the efficiency of system adjustment, during specific implementation, those skilled in the art can preset the adjustment threshold by themselves. The larger the value, the higher the efficiency and the lower the adjustment accuracy. The smaller the value, the lower the adjustment efficiency and the adjustment accuracy. higher. The embodiment sets the adjustment threshold to 10, that is, the absolute value of the camera exposure adjustment value is greater than or equal to 10, indicating that the effect is not satisfactory. Add the camera exposure adjustment value and the current exposure value to obtain a new current exposure value, press the new current exposure value Value enters step 4 to take a photo. When a new image is obtained as the current image, it will return to step 1 and repeat step 1, step 2 and step 3 to continue adjustment; if the absolute value of the exposure adjustment value is less than 10, no adjustment is currently required. Make the camera adjustment value equal to zero, keep using the current exposure value, and go to step 4;
步骤4、根据当前曝光值,相机正常拍照,获取图像。Step 4. According to the current exposure value, the camera normally takes pictures and acquires images.
在步骤4中,根据当前相机曝光值进行拍照,继续在取新的图像作为当前图像后,重新返回步骤1,继续调整,以达到持续获取清晰图像的目的。直到停止系统工作。In step 4, take photos according to the current camera exposure value, continue to take a new image as the current image, return to step 1, and continue to adjust, so as to achieve the purpose of continuously obtaining clear images. until the system stops working.
应用本发明技术方案的系统架构举例如图1所示,从初始相机抓取图像后,执行以上流程的计算机可以监测图像,调整相机参数,并存储到服务器,服务器输出相应命令到工控机,控制调整线阵相机的曝光值。例如,可用于室外动态运行的火车监测,获取清晰图像,以便于后续的车辆监测、识别。那么,主要使用环境为户外环境,使用条件应当适应多种天气变化。具体实施时,可采用1组倒“L”型支架;在倒“L”型支架的横杆上安装一台垂直向下拍照的工业相机拍摄顶部图像、竖杆上安装一台垂直于火车运行方向的工业相机,并增加若干补光设备,例如光源LED。硬件环境部署到位后就可以进行图像的采集工作,采用本发明技术方案获取第一幅图像后,调节根据外部环境,自动调节曝光时间,获取理想图像。An example of the system architecture applying the technical solution of the present invention is shown in Figure 1. After capturing the image from the initial camera, the computer that executes the above process can monitor the image, adjust the camera parameters, and store it in the server. The server outputs the corresponding command to the industrial computer to control the image. Adjust the exposure value of the line scan camera. For example, it can be used for outdoor dynamic train monitoring to obtain clear images for subsequent vehicle monitoring and identification. Then, the main use environment is the outdoor environment, and the use conditions should adapt to various weather changes. In the specific implementation, a set of inverted "L"-shaped brackets can be used; an industrial camera that takes pictures vertically downward is installed on the horizontal bar of the inverted "L"-shaped bracket to take pictures of the top image, and an industrial camera that is vertical to the train running is installed on the vertical bar. Direction of the industrial camera, and add a number of supplementary light equipment, such as light source LED. After the hardware environment is deployed in place, the image collection can be carried out. After the first image is obtained by adopting the technical solution of the present invention, the exposure time is automatically adjusted according to the external environment to obtain an ideal image.
根据线阵相机的特性,具体实施时,本领域技术人员可自行预设图像计算单元,即当前图像的行数采用预设的数值m。本实施例取初始的1000行图像作为一个图像计算单元,获取其直方图信息(如图2),结合之前的曝光时间,得到曝光时间调整值(如图3),然后对相机的曝光值进行调整,同样是获取调整后的1000行数据。即当前图像总是取m=1000行图像数据。According to the characteristics of the line scan camera, during specific implementation, those skilled in the art can preset the image calculation unit by themselves, that is, the number of lines of the current image adopts the preset value m. This embodiment takes the initial 1000-line image as an image calculation unit, obtains its histogram information (as shown in Figure 2), combines the previous exposure time, obtains the exposure time adjustment value (as shown in Figure 3), and then performs the calculation on the exposure value of the camera The adjustment is also to obtain the adjusted 1000 rows of data. That is, the current image always takes m=1000 lines of image data.
由于调整过程中,相机正常采集图像,为了避免过于频繁的调整曝光值,因此本发明进一步提出,不论按新的当前曝光值还是保留原有的当前曝光值进行拍照,可以不是马上获取新的图像作为当前图像,而是等待拍摄(n-1)×m行后才提取最新的m行图像作为新的当前图像。实施例中,在图像表现上接近于为每n×1000行调整一次曝光时间,其中可根据需要的调整效率设定n值,n>1,具体实施时,本领域技术人员可自行预设n的取值。实施例中n=2,直到调整工作结束。During the adjustment process, the camera normally collects images. In order to avoid adjusting the exposure value too frequently, the present invention further proposes that no matter whether the new current exposure value or the original current exposure value is used to take pictures, it is not necessary to obtain a new image immediately. As the current image, the latest m-line image is extracted as the new current image after waiting for (n-1)×m lines to be captured. In the embodiment, the image performance is close to adjusting the exposure time for every n×1000 lines, wherein the n value can be set according to the required adjustment efficiency, n>1, and those skilled in the art can preset n by themselves during specific implementation. value of . In the embodiment, n=2, until the adjustment work is finished.
具体实施时,本发明所提供方法可基于软件技术实现自动运行流程,也可采用模块化方式实现相应系统。During specific implementation, the method provided by the present invention can realize the automatic operation process based on software technology, and can also realize the corresponding system in a modular manner.
本发明实施例还相应提供一种基于图像直方图分析的线阵相机自动曝光调整系统,包括以下模块:The embodiment of the present invention also provides an automatic exposure adjustment system for line array cameras based on image histogram analysis, including the following modules:
第一模块,用于获取当前图像,计算当前图像的灰度直方图,对灰度直方图进行归一化,获取当前图像的直方图的左边界Left_Pos、右边界Rigt_Pos和峰值;The first module is used to obtain the current image, calculate the gray histogram of the current image, normalize the gray histogram, and obtain the left boundary Left_Pos, the right boundary Rigt_Pos and the peak value of the histogram of the current image;
第二模块,用于根据图像灰度直方图的期望峰值Exp_Bright,计算相机曝光调整值CExp如下,The second module is used to calculate the camera exposure adjustment value CExp according to the expected peak value Exp_Bright of the image grayscale histogram as follows,
其中,Exp_Bright为图像直方图的期望峰值,Left_Sec_Pos和Rigt_Sec_Pos为剔除边界峰值后的二次边界值,修正系数k1、k2为图像直方图线性变换系数;Among them, Exp_Bright is the expected peak value of the image histogram, Left_Sec_Pos and Rigt_Sec_Pos are the secondary boundary values after removing the boundary peak value, and the correction coefficients k1 and k2 are the linear transformation coefficients of the image histogram;
第三模块,用于比较相机曝光调整值CExp的绝对值和预设的调整阈值,如果相机曝光调整值CExp的绝对值大于等于调整阈值,将相机曝光调整值和当前曝光值相加,得到新的当前曝光值,命令第四模块工作;如果相机曝光调整值CExp的绝对值小于调整阈值,则不进行调整,保持当前曝光值,命令第四模块工作;The third module is used to compare the absolute value of the camera exposure adjustment value CExp with the preset adjustment threshold. If the absolute value of the camera exposure adjustment value CExp is greater than or equal to the adjustment threshold, add the camera exposure adjustment value and the current exposure value to obtain a new If the absolute value of the camera exposure adjustment value CExp is less than the adjustment threshold, no adjustment is made, the current exposure value is maintained, and the fourth module is ordered to work;
第四模块,用于根据当前曝光值进行拍照,当获取新的图像作为当前图像后,命令第一模块工作,继续调整。The fourth module is used to take pictures according to the current exposure value, and after obtaining a new image as the current image, order the first module to work and continue to adjust.
各模块具体实现可参见相应步骤,本发明不予赘述。For the specific implementation of each module, reference may be made to the corresponding steps, which will not be described in detail in the present invention.
以上所述仅是用以说明本发明的具体实施案例而已,并非用以限定本发明的可实施范围,举凡本领域熟练技术人员在未脱离本发明所指示的精神与原理下所完成的一切等效改变或修饰,仍应由本发明权利要求的范围所覆盖。The above descriptions are only used to illustrate the specific implementation cases of the present invention, and are not intended to limit the scope of the present invention. For example, all those skilled in the art have accomplished everything without departing from the spirit and principles indicated by the present invention. Effective changes or modifications should still be covered by the scope of the claims of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610355163.0A CN105847708B (en) | 2016-05-26 | 2016-05-26 | Line-scan digital camera automatic exposure method of adjustment based on image histogram analysis and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610355163.0A CN105847708B (en) | 2016-05-26 | 2016-05-26 | Line-scan digital camera automatic exposure method of adjustment based on image histogram analysis and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105847708A CN105847708A (en) | 2016-08-10 |
CN105847708B true CN105847708B (en) | 2018-09-21 |
Family
ID=56594613
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610355163.0A Active CN105847708B (en) | 2016-05-26 | 2016-05-26 | Line-scan digital camera automatic exposure method of adjustment based on image histogram analysis and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105847708B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW201822709A (en) * | 2016-12-30 | 2018-07-01 | 曦威科技股份有限公司 | Real-time heart rate detection method and real-time heart rate detection system therefor |
CN110572583A (en) * | 2018-05-18 | 2019-12-13 | 杭州海康威视数字技术股份有限公司 | method for shooting image and camera |
CN110873724B (en) * | 2018-09-03 | 2023-03-21 | 中国石油化工股份有限公司 | Shale core image acquisition method |
CN109348136A (en) * | 2018-11-22 | 2019-02-15 | 成都市鹰诺实业有限公司 | A method of camera parameter is adjusted by photo histogram |
CN111050088B (en) * | 2019-12-30 | 2021-12-21 | 英特尔产品(成都)有限公司 | Mechanism to calibrate imaging brightness of camera for detecting die defects |
CN111337132B (en) * | 2020-02-28 | 2021-08-27 | 创新奇智(北京)科技有限公司 | Temperature measuring method and device and digital image acquisition equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101064783A (en) * | 2006-04-30 | 2007-10-31 | 华为技术有限公司 | Method for obtaining automatic exposure control parameter and control method and image forming apparatus |
CN101399924A (en) * | 2007-09-25 | 2009-04-01 | 展讯通信(上海)有限公司 | Automatic exposure method and device based on brightness histogram |
CN101534453A (en) * | 2008-12-12 | 2009-09-16 | 昆山锐芯微电子有限公司 | Method for controlling automatic exposure, image processor and optical imaging device |
CN102724405A (en) * | 2012-06-21 | 2012-10-10 | 无锡市中兴光电子技术有限公司 | Method and device for automatic exposure compensation of backlit scenes in video imaging system |
CN102801920A (en) * | 2012-07-25 | 2012-11-28 | 中国科学院长春光学精密机械与物理研究所 | Sensorless continuous automatic exposure time adjusting and controlling device of camera |
CN103888667A (en) * | 2012-12-21 | 2014-06-25 | 佳能株式会社 | Image capturing apparatus and control method thereof |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030184673A1 (en) * | 2002-04-02 | 2003-10-02 | Michael Skow | Automatic exposure control for digital imaging |
-
2016
- 2016-05-26 CN CN201610355163.0A patent/CN105847708B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101064783A (en) * | 2006-04-30 | 2007-10-31 | 华为技术有限公司 | Method for obtaining automatic exposure control parameter and control method and image forming apparatus |
CN101399924A (en) * | 2007-09-25 | 2009-04-01 | 展讯通信(上海)有限公司 | Automatic exposure method and device based on brightness histogram |
CN101534453A (en) * | 2008-12-12 | 2009-09-16 | 昆山锐芯微电子有限公司 | Method for controlling automatic exposure, image processor and optical imaging device |
CN102724405A (en) * | 2012-06-21 | 2012-10-10 | 无锡市中兴光电子技术有限公司 | Method and device for automatic exposure compensation of backlit scenes in video imaging system |
CN102801920A (en) * | 2012-07-25 | 2012-11-28 | 中国科学院长春光学精密机械与物理研究所 | Sensorless continuous automatic exposure time adjusting and controlling device of camera |
CN103888667A (en) * | 2012-12-21 | 2014-06-25 | 佳能株式会社 | Image capturing apparatus and control method thereof |
Non-Patent Citations (1)
Title |
---|
车载数字相机自动曝光方法研究;易亮;《中国优秀硕士学位论文全文数据库 信息科技辑》;20130215;I138-1638 * |
Also Published As
Publication number | Publication date |
---|---|
CN105847708A (en) | 2016-08-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105847708B (en) | Line-scan digital camera automatic exposure method of adjustment based on image histogram analysis and system | |
WO2018000731A1 (en) | Method for automatically detecting curved surface defect and device thereof | |
CN111539582B (en) | A device and method for steel plate cutting planning based on image processing | |
CN102223484A (en) | Method and device for configuring head-end parameter of camera | |
CN105100632A (en) | Adjusting method and apparatus for automatic exposure of imaging device, and imaging device | |
CN105592258B (en) | Auto focusing method and device | |
CN112528861A (en) | Foreign matter detection method and device applied to track bed in railway tunnel | |
CN108416814A (en) | A method and system for fast positioning and identification of pineapple heads | |
CN110853145B (en) | High-spatial-resolution portable anti-shake hyperspectral imaging method and device | |
TWI383690B (en) | Method for image processing | |
CN113411510B (en) | Camera automatic exposure algorithm based on image quality evaluation and red hot forging | |
CN114257736A (en) | Self-adaptive shooting method for workpieces | |
CN112330568B (en) | A brightness compensation method for tobacco leaf images with uneven illumination | |
CN118968117A (en) | Screening and grading system and method for fresh cut peony flowers based on image recognition | |
TWI498830B (en) | A method and system for license plate recognition under non-uniform illumination | |
CN109218587A (en) | A kind of image-pickup method and system based on binocular camera | |
CN117690120B (en) | Vehicle monitoring method and system for mobile equipment snapshot license plate | |
CN109671044A (en) | A kind of more exposure image fusion methods decomposed based on variable image | |
CN118096682A (en) | Defect detection method and system based on binocular combination of traditional camera and event camera | |
CN114187204B (en) | Image processing method and device, equipment and storage medium for black edge optimization | |
CN114866705B (en) | Automatic exposure method, storage medium and electronic device | |
CN116797569A (en) | Wafer defect detection method and system | |
CN116309504A (en) | Visual detection image acquisition and analysis method | |
CN114782809A (en) | Method for detecting dynamic offset of key part of contact network | |
WO2021217445A1 (en) | Image processing method, device and system, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |