[go: up one dir, main page]

CN102523386B - Auto Exposure Method Based on Histogram Equalization - Google Patents

Auto Exposure Method Based on Histogram Equalization Download PDF

Info

Publication number
CN102523386B
CN102523386B CN201110432474.XA CN201110432474A CN102523386B CN 102523386 B CN102523386 B CN 102523386B CN 201110432474 A CN201110432474 A CN 201110432474A CN 102523386 B CN102523386 B CN 102523386B
Authority
CN
China
Prior art keywords
image
exposure
histogram equalization
mean value
brightness
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.)
Expired - Fee Related
Application number
CN201110432474.XA
Other languages
Chinese (zh)
Other versions
CN102523386A (en
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.)
Northwestern Polytechnical University
XiAn Institute of Optics and Precision Mechanics of CAS
Original Assignee
XiAn Institute of Optics and Precision Mechanics of CAS
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 XiAn Institute of Optics and Precision Mechanics of CAS filed Critical XiAn Institute of Optics and Precision Mechanics of CAS
Priority to CN201110432474.XA priority Critical patent/CN102523386B/en
Publication of CN102523386A publication Critical patent/CN102523386A/en
Application granted granted Critical
Publication of CN102523386B publication Critical patent/CN102523386B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The invention relates to an automatic exposure method based on histogram equalization, which comprises the steps of collecting a frame of image, recording the exposure time of the frame, calculating the brightness mean value of the collected image, carrying out histogram equalization processing on the collected image, calculating the gray mean value of the image after the histogram equalization processing, calculating the exposure time of the next frame according to the principle that the exposure time is in direct proportion to the brightness mean value of the image, setting the exposure adjustment tolerance and the like. The invention solves the technical problem that the shooting subject has underexposure or overexposure in the prior art, and adopts the gray level mean value of the image after histogram equalization as the optimal mean value. The optimal mean value can fully reflect the brightness characteristics of the image, and the optimal mean value is dynamic and can adapt to various brightness environments.

Description

基于直方图均衡化的自动曝光方法Auto Exposure Method Based on Histogram Equalization

技术领域 technical field

本发明涉及基于直方图均衡化的自动曝光方法。The invention relates to an automatic exposure method based on histogram equalization.

背景技术 Background technique

相机所采用的曝光方式既可以采用测光手动曝光也可以采用自动曝光。The exposure method adopted by the camera can be either metered manual exposure or automatic exposure.

测光手动曝光就是由拍摄者自己选择光圈系数、快门速度,使用相机的测光系统判断曝光是否合适的曝光方式。Metering manual exposure is an exposure method in which the photographer chooses the aperture factor and shutter speed, and uses the camera's metering system to determine whether the exposure is appropriate.

自动曝光是由相机根据自身测光系统的测光结果,自动选定光圈系数、快门速度来获得准确曝光的暴光方式。自动曝光可以分为光圈先决式自动曝光、快门先决式自动曝光、程序式自动曝光等形式。Automatic exposure is an exposure method in which the camera automatically selects the aperture factor and shutter speed according to the metering results of its own metering system to obtain accurate exposure. Automatic exposure can be divided into aperture priority automatic exposure, shutter priority automatic exposure, program automatic exposure and other forms.

光圈先决式自动曝光就是人为选定光圈系数,相机自动选择快门速度。Aperture-priority automatic exposure means that the aperture factor is selected artificially, and the camera automatically selects the shutter speed.

快门先决式自动曝光就是人为选定快门速度,相机自动选择光圈系数。Shutter-priority auto exposure means that the shutter speed is selected artificially, and the camera automatically selects the aperture factor.

程序式自动曝光是指光圈系数和快门速度均由相机内置的程序自动调节。它的优点是不需要拍摄者设定光圈系数和快门速度。Programmed automatic exposure means that the aperture factor and shutter speed are automatically adjusted by the camera's built-in program. Its advantage is that it does not require the photographer to set the aperture factor and shutter speed.

传统的自动曝光控制方法中,有的采用特定的微处理器硬件电路控制曝光;有的采用图像的整体亮度来控制曝光,但是如果拍摄主体与背景之间的亮度差太大,会使得拍摄主体出现曝光不足或者曝光过度的现象;有的采用参照亮度值,将图像分块,每一块子图像的亮度被用于设置参照亮度值,该参照亮度值可以通过调整光圈大小获得,当然同样也可以通过设置快门速度获得该参照亮度值;还有的则通过研究不同光照条件下的亮度与曝光值之间的关系来进行曝光控制。In the traditional automatic exposure control methods, some use a specific microprocessor hardware circuit to control the exposure; some use the overall brightness of the image to control the exposure, but if the brightness difference between the subject and the background is too large, it will make the subject The phenomenon of underexposure or overexposure occurs; some use the reference brightness value to divide the image into blocks, and the brightness of each sub-image is used to set the reference brightness value. The reference brightness value can be obtained by adjusting the size of the aperture, of course, it can also be The reference brightness value is obtained by setting the shutter speed; others control the exposure by studying the relationship between the brightness and the exposure value under different lighting conditions.

发明内容 Contents of the invention

为了解决现有技术中拍摄主体出现曝光不足或者曝光过度的技术问题,本发明提供一种基于直方图均衡化的自动曝光方法。In order to solve the technical problem of underexposure or overexposure of the subject in the prior art, the present invention provides an automatic exposure method based on histogram equalization.

本发明的技术解决方案:Technical solution of the present invention:

基于直方图均衡化的自动曝光方法,其特殊之处在于:包括以下步骤:The automatic exposure method based on histogram equalization is special in that it includes the following steps:

1】采集一帧图像,并记录该帧的曝光时间told1] Collect a frame of image, and record the exposure time t old of the frame;

2】计算处所采集图像的亮度均值m(Y);2] Calculate the brightness mean value m(Y) of the collected image;

3】对所采集图像做直方均衡化处理;3] Perform histogram equalization processing on the collected images;

4】计算经直方均衡化处理后的图像的灰度均值Yt;4) Calculating the gray mean value Yt of the image processed by the histogram equalization;

5】计算下一帧的曝光时间tnew,根据公式tnew=told*(Yt/m(Y))(曝光时间与图像的亮度均值成正比)5] Calculate the exposure time t new of the next frame, according to the formula t new =t old *(Y t /m(Y)) (the exposure time is proportional to the average brightness of the image)

6】若|tnew-told|<δ(曝光调整容限),说明下一帧曝光时间不需调整,tnew=told,继续执行步骤1】;6] If |t new -t old |<δ (exposure adjustment tolerance), it means that the exposure time of the next frame does not need to be adjusted, t new =t old , continue to step 1];

若|tnew-told|>δ,说明下一帧曝光时间需要按新的曝光时间tnew调整,继续执行步骤1】。If |t new -t old |>δ, it means that the exposure time of the next frame needs to be adjusted according to the new exposure time t new , and proceed to step 1].

本发明所具有的优点:The advantages that the present invention has:

1、本发明直方图均衡化后的图像具有覆盖整个灰度范围的灰度级值的优点,即加强了图像的对比度,因此我们可以采用直方图均衡化后的图像的灰度均值作为最优均值。该最优均值能充分反映图像的亮度特性,并且这个最优均值是动态的,能适应各种亮度环境。1. The image after the histogram equalization of the present invention has the advantage of covering the gray level value of the entire gray scale range, that is, the contrast of the image is enhanced, so we can use the average gray value of the image after the histogram equalization as the optimal mean. The optimal mean value can fully reflect the brightness characteristics of the image, and the optimal mean value is dynamic and can adapt to various brightness environments.

2、本发明不需人工设定最优亮度均值。2. The present invention does not need to manually set the optimal average brightness value.

3、本发明数据处理量小。3. The data processing capacity of the present invention is small.

附图说明 Description of drawings

图1为本发明的流程图。Fig. 1 is a flowchart of the present invention.

具体实施方式 Detailed ways

如图1所示,基于直方图均衡化的自动曝光方法,包括以下步骤:As shown in Figure 1, the automatic exposure method based on histogram equalization includes the following steps:

1】采集一帧图像,并记录该帧的曝光时间told1] Collect a frame of image, and record the exposure time t old of the frame;

2】计算处所采集图像的亮度均值m(Y);2] Calculate the brightness mean value m(Y) of the collected image;

3】对所采集图像做直方均衡化处理;3] Perform histogram equalization processing on the collected images;

4】计算经直方均衡化处理后的图像的亮度均值Yt;4) Calculating the brightness mean value Yt of the image processed by the histogram equalization;

5】计算下一帧的曝光时间tnew,根据公式tnew=told*(Yt/m(Y))(曝光时间与图像的亮度均值成正比)5] Calculate the exposure time t new of the next frame, according to the formula t new =t old *(Y t /m(Y)) (the exposure time is proportional to the average brightness of the image)

6】若|tnew-told|<δ(曝光调整容限,该值以图像亮度的主观感觉为选择标准),说明前后两帧图像曝光时间基本相同,下一帧曝光时间不需调整,tnew=told,继续执行步骤1】;6] If |t new -t old |<δ (exposure adjustment tolerance, the value is based on the subjective perception of image brightness as the selection criterion), it means that the exposure time of the two frames before and after is basically the same, and the exposure time of the next frame does not need to be adjusted. t new =t old , proceed to step 1】;

若|tnew-told|>δ,说明前后两帧图像曝光时间差别较大,下一帧曝光时间需要按新的曝光时间tnew调整,继续执行步骤1】;If |t new -t old |>δ, it means that the exposure time of the two frames before and after is quite different, and the exposure time of the next frame needs to be adjusted according to the new exposure time t new , and continue to step 1];

本发明原理:相机的曝光调整依据的是图像亮度与曝光时间成正比的原理,即曝光时间越长,图像越亮,图像亮度越高;曝光时间越短,图像越暗,图像亮度越低。当拍摄图像曝光不足,反映在图像上即是亮度均值偏小,使用直方图均衡化后的图像会覆盖整个灰度范围的灰度级值,即直方图均衡化后的图像均值较大,按照tnew=told*(Yt/m(Y))进行调整,计算出的tnew会长于told,这样就达到了当曝光不足时,加长曝光时间的目的。反之亦然。The principle of the present invention: the exposure adjustment of the camera is based on the principle that the image brightness is proportional to the exposure time, that is, the longer the exposure time, the brighter the image and the higher the image brightness; the shorter the exposure time, the darker the image and the lower the image brightness. When the captured image is underexposed, it is reflected in the image that the average brightness value is small, and the image after using the histogram equalization will cover the gray value of the entire gray scale range, that is, the average value of the image after the histogram equalization is larger, according to t new =t old *(Y t /m(Y)) is adjusted, and the calculated t new will be longer than t old , thus achieving the purpose of prolonging the exposure time when the exposure is insufficient. vice versa.

Claims (1)

1. the automatic explosion method based on histogram equalization, is characterized in that: comprise the following steps:
1] gather a two field picture, and record the time for exposure t of this frame old;
2] calculate the brightness average m (Y) of the image that gathers;
3] gathered image being done to histogram equalization processes;
4] calculate the gray average Y of the image after histogram equalization is processed t;
5] principle that is directly proportional to the brightness average of image according to the time for exposure, calculates the time for exposure t of next frame new, according to formula t new=t old* (Y t/ m (Y));
6] setting exposure adjustment tolerance limit is δ;
If | t new-t old| < δ, the real exposure time of next frame is t old, continue execution step 1];
If | t new-t old| > δ, the real exposure time of next frame is t new, continue execution step 1].
CN201110432474.XA 2011-12-16 2011-12-16 Auto Exposure Method Based on Histogram Equalization Expired - Fee Related CN102523386B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110432474.XA CN102523386B (en) 2011-12-16 2011-12-16 Auto Exposure Method Based on Histogram Equalization

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110432474.XA CN102523386B (en) 2011-12-16 2011-12-16 Auto Exposure Method Based on Histogram Equalization

Publications (2)

Publication Number Publication Date
CN102523386A CN102523386A (en) 2012-06-27
CN102523386B true CN102523386B (en) 2014-01-29

Family

ID=46294168

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110432474.XA Expired - Fee Related CN102523386B (en) 2011-12-16 2011-12-16 Auto Exposure Method Based on Histogram Equalization

Country Status (1)

Country Link
CN (1) CN102523386B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3563752A1 (en) * 2015-07-13 2019-11-06 SONY Corporation Medical observation device and medical observation method
US12047683B2 (en) 2019-11-12 2024-07-23 Tencent Technology (Shenzhen) Company Limited Image acquisition method and apparatus, device, and storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580923A (en) * 2014-12-30 2015-04-29 重庆金山科技(集团)有限公司 Exposure device and exposure method for electronic endoscope
CN105976343B (en) * 2016-04-29 2020-03-24 广东小天才科技有限公司 Picture exposure correction method and device and intelligent equipment
CN107786815B (en) * 2016-08-30 2020-02-21 比亚迪股份有限公司 Active night vision self-adaptive exposure method and system and vehicle
CN106657807B (en) * 2017-03-09 2019-05-10 上海航天控制技术研究所 A kind of automatic explosion method of color camera
WO2021046715A1 (en) * 2019-09-10 2021-03-18 深圳市汇顶科技股份有限公司 Exposure time calculation method, device, and storage medium
CN113411511B (en) * 2021-06-29 2022-05-17 中国科学院长春光学精密机械与物理研究所 Image preprocessing method for high frame rate imaging system based on histogram analysis
CN114007020B (en) * 2021-10-12 2022-11-29 深圳创维-Rgb电子有限公司 Image processing method and device, intelligent terminal and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6750994B1 (en) * 1998-08-26 2004-06-15 Pentax Corporation Exposure control device of image reading device
CN101253764A (en) * 2005-08-26 2008-08-27 皇家飞利浦电子股份有限公司 Imaging camera processing unit and method
CN101267504A (en) * 2007-03-14 2008-09-17 索尼株式会社 Image pickup device, image pickup method, exposure control method, and program
CN101917551A (en) * 2010-08-10 2010-12-15 浙江大学 A Single Exposure High Dynamic Range Image Acquisition Method
US20110090365A1 (en) * 2009-10-21 2011-04-21 Samsung Electronics Co., Ltd. Method and apparatus for controlling multiple exposures

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3615961B2 (en) * 1999-04-20 2005-02-02 ペンタックス株式会社 Exposure control apparatus for image reading apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6750994B1 (en) * 1998-08-26 2004-06-15 Pentax Corporation Exposure control device of image reading device
CN101253764A (en) * 2005-08-26 2008-08-27 皇家飞利浦电子股份有限公司 Imaging camera processing unit and method
CN101267504A (en) * 2007-03-14 2008-09-17 索尼株式会社 Image pickup device, image pickup method, exposure control method, and program
US20110090365A1 (en) * 2009-10-21 2011-04-21 Samsung Electronics Co., Ltd. Method and apparatus for controlling multiple exposures
CN101917551A (en) * 2010-08-10 2010-12-15 浙江大学 A Single Exposure High Dynamic Range Image Acquisition Method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3563752A1 (en) * 2015-07-13 2019-11-06 SONY Corporation Medical observation device and medical observation method
US10537233B2 (en) 2015-07-13 2020-01-21 Sony Corporation Medical observation device and medical observation method
US12047683B2 (en) 2019-11-12 2024-07-23 Tencent Technology (Shenzhen) Company Limited Image acquisition method and apparatus, device, and storage medium

Also Published As

Publication number Publication date
CN102523386A (en) 2012-06-27

Similar Documents

Publication Publication Date Title
CN102523386B (en) Auto Exposure Method Based on Histogram Equalization
CN102694981B (en) Automatic exposure method for histogram equalization based on adaptive threshold segmentation
CN107635098B (en) Method, device and equipment for removing high dynamic range image noise
CN110225248B (en) Image acquisition method and device, electronic equipment and computer readable storage medium
CN107241558B (en) Exposure processing method, device and terminal equipment
CN101237530B (en) Photographing apparatus, method for controlling photographing apparatus
CN104320593B (en) A kind of digital camera automatic exposure control method
JP5719418B2 (en) High dynamic range image exposure time control method
CN108401154B (en) Image exposure degree non-reference quality evaluation method
CN104184957B (en) Automatic exposure control method based on self-adaptive predictive image average brightness and suitable for space detection imaging
WO2019085705A1 (en) Method and device for obtaining exposure compensation value of high-dynamic-range image
CN106210523A (en) A kind of exposure adjustment method and device
CN108616689B (en) Portrait-based high dynamic range image acquisition method, device and equipment
TWI374664B (en) Focusing apparatus and method
WO2017035750A1 (en) Method and apparatus for taking pictures
CN110248105A (en) A kind of image processing method, video camera and computer storage medium
CN108337446B (en) High dynamic range image acquisition method, device and equipment based on double cameras
CN107888839B (en) High dynamic range image acquisition method, device and device
CN104052933A (en) Method for judging dynamic range mode and image acquisition device thereof
CN104506779B (en) A kind of traffic lights color antidote and picture pick-up device
CN110246101A (en) Image processing method and device
CN105578062A (en) Method for selecting light metering mode and its image acquisition device
CN111246114A (en) Photographing processing method and device, terminal equipment and storage medium
TWI558206B (en) Method for selecting metering mode and image capturing device thereof
CN103685973B (en) Method and device for local area exposure adjustment on basis of encoder

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
TR01 Transfer of patent right

Effective date of registration: 20161118

Address after: 710072 Xi'an friendship West Road, Shaanxi, No. 127

Patentee after: Northwestern Polytechnical University

Patentee after: XI'AN INSTITUTE OF OPTICS AND PRECISION MECHANICS OF CAS

Address before: 710119 Xi'an province high tech Zone New Industrial Park Information Avenue, No. 17

Patentee before: XI'AN INSTITUTE OF OPTICS AND PRECISION MECHANICS OF CAS

CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140129

Termination date: 20161216

CF01 Termination of patent right due to non-payment of annual fee