CN109102481B - Automatic wide dynamic processing algorithm based on illumination analysis - Google Patents

Automatic wide dynamic processing algorithm based on illumination analysis Download PDF

Info

Publication number
CN109102481B
CN109102481B CN201810758199.2A CN201810758199A CN109102481B CN 109102481 B CN109102481 B CN 109102481B CN 201810758199 A CN201810758199 A CN 201810758199A CN 109102481 B CN109102481 B CN 109102481B
Authority
CN
China
Prior art keywords
image
dark
histogram
bright
shutter
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
Application number
CN201810758199.2A
Other languages
Chinese (zh)
Other versions
CN109102481A (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.)
Jiangsu Anweishi Intelligent Security Co ltd
Original Assignee
Jiangsu Anweishi Intelligent Security Co ltd
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 Jiangsu Anweishi Intelligent Security Co ltd filed Critical Jiangsu Anweishi Intelligent Security Co ltd
Priority to CN201810758199.2A priority Critical patent/CN109102481B/en
Publication of CN109102481A publication Critical patent/CN109102481A/en
Application granted granted Critical
Publication of CN109102481B publication Critical patent/CN109102481B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20221Image fusion; Image merging

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses an automatic wide dynamic processing algorithm based on illumination analysis, which comprises the following steps of illumination analysis and a histogram statistics-based method; adjusting exposure parameters, and adjusting shutter values according to the points of the bright and dark image histograms in dark and bright areas; setting fusion coefficients of the three images, and fusing the three images into a clothes image; when compressing, firstly, determining a compression coefficient according to the illumination distribution, namely a histogram of the fused image; and compressing the fused image according to the compression coefficient, and outputting the image. The algorithm of the invention firstly dynamically analyzes the brightness distribution condition of each frame of image, and then dynamically adjusts the parameters of wide dynamic exposure and fusion in real time, thereby ensuring that the image is clear and transparent no matter how the illumination changes.

Description

Automatic wide dynamic processing algorithm based on illumination analysis
Technical Field
The invention relates to the field of image processing, in particular to an algorithm for automatically configuring wide dynamic intensity according to illumination.
Background
The wide dynamic technology refers to a technology for making the whole picture shot by a camera clear in a complex illumination environment. When a high-brightness area and a shadow, a backlight and other areas with relatively low brightness under the irradiation of a strong light source (sunlight, lamps, reflected light and the like) exist in an image at the same time, the image shot by a common camera can be changed into white due to overexposure in a bright area, and can be changed into black due to underexposure in a dark area, so that effective information can not be obtained, and the image quality is seriously influenced. There is a limit to the appearance of the camera in the same scene of the brightest and darker areas, which is the dynamic range of the camera.
To improve the dynamic range of the camera, the current method is to perform multi-frame fusion on the images with different brightness after multiple exposures, and then compress and output the images, but the fusion and compression inevitably cause image information loss, especially when the illumination changes and the fusion compression method does not change, a large amount of effective information loss is caused, and the images become blurred and are seriously distorted.
Disclosure of Invention
The invention provides an automatic wide dynamic processing algorithm based on illumination analysis to solve the technical problem. The algorithm firstly dynamically analyzes the brightness distribution condition of each frame of image, and then dynamically adjusts the parameters of wide dynamic exposure and fusion in real time, thereby ensuring that the image is clear and transparent no matter how the illumination changes.
In order to solve the above technical problems, the present invention provides an automatic wide dynamic processing algorithm based on illumination analysis, comprising the following steps,
a. illumination analysis, a histogram statistics based approach;
b. adjusting exposure parameters, and adjusting shutter values according to the points of the bright and dark image histograms in dark and bright areas;
c. setting fusion coefficients of the three images, and fusing the three images into one image;
d. when compressing, firstly, determining a compression coefficient according to the illumination distribution, namely a histogram of the fused image;
e. and compressing the fused image according to the compression coefficient, and outputting the image.
Further, in the step a, the histogram statistical method comprises the following steps:
Hm=Hist(Im)
Iminputting a middle brightness image, wherein m is 1:3 and represents three images of light, middle and dark respectively, and HmIs its corresponding histogram in the range of [ 0255]。
Further, in the step b, the concrete steps are as follows: b1) histogram H of statistically bright image1Total number of spots in dark area:
Figure GDA0003093903910000021
in the formula, l is a threshold value and can be set. P1Is brightThe total number of points of the image in the dark area; the shutter value algorithm for adjusting exposure is as follows:
Figure GDA0003093903910000022
where ph1 and pl1 are both thresholds, settable parameters, step is the step size of the shutter adjustment, E1The shutter value of the bright map;
b2) histogram H of statistically dark images3Total number of dots in bright area:
Figure GDA0003093903910000023
h is a threshold value, a settable parameter. P3The specific adjustment method adjusts the shutter value of the exposure for the total number of points of the dark image in the bright area according to the following formula:
Figure GDA0003093903910000024
where ph3 and pl3 are both threshold values, settable parameters, E3The shutter value is a dark map.
Further, the shutter value of the intermediate brightness is E2Setting in an automatic exposure algorithm; when setting the shutter values of the three completed images, the following constraint is also needed: e1>E2>E3
Further, in step c, the fusion method for fusing the three images into one image is as follows:
Figure GDA0003093903910000031
wherein, y1Is the pixel value, y, in the luminance map2Is the pixel value, y, in the middle graph3Is the pixel value, y, in the dark mapfIs the fused pixel value.
Further, in step d, i.e. the fused mapIfDetermining a compression coefficient, IfThe histogram of (a) is:
Hf=Hist(If)
Hffor the histogram of the fused image, the calculation formula of the compression coefficient is as follows:
Figure GDA0003093903910000032
xhis a histogram HfValue of (a), khH _ th is a threshold value, which is a set parameter, for the compression coefficient.
Further, in step e, the pixel algorithm of image compression is:
Figure GDA0003093903910000033
yfto fuse pixel values of the image, ycAre the compressed pixel values.
Further, in step e, the dynamic range of the compressed image is finally normalized to the range [ 0255 ]:
Figure GDA0003093903910000034
yois the pixel value of the final output image.
The invention has the technical effects that: the invention provides an automatic wide dynamic processing algorithm based on illumination analysis to solve the problem. The algorithm firstly dynamically analyzes the brightness distribution condition of each frame of image, then dynamically adjusts the parameters of wide dynamic exposure and fusion in real time, synthesizes three frames of images with different brightness through the wide dynamic state of illumination analysis, adjusts the exposure and fusion parameters, finally fuses the three images into one image after setting a shutter value, and finally compresses the fused image according to a compression coefficient, thereby ensuring that the image is clear and transparent no matter how the illumination changes.
Drawings
Fig. 1 is a schematic diagram of an automatic wide dynamic processing algorithm based on illumination analysis according to the present invention.
Detailed Description
The present invention is further described with reference to the following drawings and specific examples so that those skilled in the art can better understand the present invention and can practice the present invention, but the examples are not intended to limit the present invention.
As shown in fig. 1, the automatic wide dynamic processing algorithm based on illumination analysis according to the present invention is composed of two parts: the illumination condition is analyzed first, and then parameters of wide dynamic exposure and fusion are adjusted based on the illumination distribution.
1. Illumination analysis
The illumination analysis is based on a histogram statistical method, the wide dynamic state of the algorithm adopts three frames of image synthesis with different brightness (bright, medium and dark), so the illumination analysis firstly carries out the histogram statistics on the image with the middle brightness:
Hm=Hist(Im)
Iminputting a middle brightness image, wherein m is 1:3 and represents three images of light, middle and dark respectively, and HmIs its corresponding histogram in the range of [ 0255]。
2. Adjusting exposure and fusion parameters
Firstly, adjusting exposure parameters, wherein the process comprises the following steps:
1) histogram H of statistically bright image1Total number of spots in dark area:
Figure GDA0003093903910000041
wherein l is a threshold value and can be set. P1The larger the value of the total number of points of the bright image in the dark area, the more the number of the dark pixels in the bright image is, the bright image still needs to be brightened again, and the smaller the value of the dark pixels in the bright image is, the brighter image is, and the brightness needs to be adjusted appropriately.
2) The specific adjusting method adjusts the shutter value of exposure according to the following formula:
Figure GDA0003093903910000042
in the above formula, ph1 and pl1 are threshold values, settable parameters, step is the step of adjusting the shutter, E1The shutter value of the bright map.
3) Histogram H of statistically dark images3Total number of dots in bright area:
Figure GDA0003093903910000051
in the formula, h is a threshold value and can be set. P3The larger the value of the total number of points of the dark image in the bright area, the more bright pixels in the dark image are, the dark image needs to be dimmed again, and the value of the total number of points of the dark image in the bright area is too small, the image is too dark, and the brightness needs to be adjusted appropriately.
4) The specific adjusting method adjusts the shutter value of exposure according to the following formula:
Figure GDA0003093903910000052
in the above formula, ph3 and pl3 are both threshold values and can be set. E3The shutter value is a dark map.
5) Shutter value E of intermediate brightness2The invention is not concerned with setting in the auto-exposure algorithm. When setting the shutter values of the three completed images, the following constraint is also needed:
E1>E2>E3
that is, the shutter value of the bright image is ensured to be maximum, and the shutter value of the dark image is ensured to be minimum.
1. After the shutter value is set, the fusion coefficients of the three images are also set. The fusion method for fusing the three images into one image comprises the following steps:
Figure GDA0003093903910000053
1is the pixel value, y, in the luminance map2Is the pixel value, y, in the middle graph3Is the pixel value, y, in the dark mapfIs the fused pixel value.
2. Since the dynamic range of each of the three images is [ 0255]From the above formula, the fused graph IfThe dynamic range of (a) is: [ 0255E1/E3]
Due to E1>E3Therefore the dynamic range of the fused map will exceed [ 0255 ]]But the dynamic range of the fused output image is still [ 0255 ]]Therefore, the dynamic range of the fused image must be compressed and then output.
Compressing according to the distribution of light, i.e. fused image IfDetermining a compression coefficient, IfThe histogram of (a) is:
Hf=Hist(If)
Hfis a histogram of the fused image.
The calculation formula of the compression coefficient is as follows:
Figure GDA0003093903910000061
xhis a histogram HfValue of (a), khH _ th is a threshold value, a settable parameter, for compressing the coefficient. The meaning of the formula is that if the number of pixels of a certain gray value of an image is enough, the dynamic range of the gray value is not compressed, otherwise, the compression is performed, and the compression is stronger when the number of pixels is less.
3. And finally, the pixel algorithm for compressing the fused image according to the compression coefficient is as follows:
Figure GDA0003093903910000062
yfto fuse pixel values of the image, ycAre the compressed pixel values.
And finally normalizing the dynamic range of the compressed image to [ 0255 ]:
Figure GDA0003093903910000063
yois the pixel value of the final output image.
Finally, the output graph is cleaned through.
The above-mentioned embodiments are merely preferred embodiments for fully illustrating the present invention, and the scope of the present invention is not limited thereto. The equivalent substitution or change made by the technical personnel in the technical field on the basis of the invention is all within the protection scope of the invention. The protection scope of the invention is subject to the claims.

Claims (5)

1. An automatic wide dynamic processing algorithm based on illumination analysis is characterized by comprising the following steps,
a. illumination analysis, a histogram statistics based approach;
b. adjusting exposure parameters, and adjusting shutter values according to the points of bright and dark image histograms in dark and bright areas, wherein the method specifically comprises the following steps:
b1) histogram H of statistically bright image1Total number of spots in dark area:
Figure FDA0003093903900000011
where l is a threshold, a settable parameter, P1The total number of points in the dark area for a bright image; the shutter value algorithm for adjusting exposure is as follows:
Figure FDA0003093903900000012
where ph1 and pl1 are both thresholds, step is the step size of the shutter adjustment, E1The shutter value of the bright map;
b2) histogram H of statistically dark images3Total number of dots in bright area:
Figure FDA0003093903900000013
wherein h is a threshold value, P3The shutter value of the exposure is adjusted for the total number of points of the dark image in the bright area according to the following formula:
Figure FDA0003093903900000014
where ph3 and pl3 are both thresholds, E3Shutter values that are dark images;
c. setting fusion coefficients of the three images, and fusing the three images into one image; the fusion method for fusing the three images into one image comprises the following steps:
Figure FDA0003093903900000015
in the formula, y1Is the pixel value in the luminance map, y2Is the pixel value in the middle graph, y3Is the pixel value in the dark map, yfIs the fused pixel value; e1The shutter value of the bright figure, E2Shutter value of intermediate brightness, E3Shutter values that are dark images;
d. when compressing, firstly, determining a compression coefficient according to the illumination distribution, namely a histogram of the fused image; fused Panel IfDetermining a compression coefficient, IfThe histogram of (a) is:
Hf=Hist(If);
Hffor the histogram of the fused image, the calculation formula of the compression coefficient is as follows:
Figure FDA0003093903900000021
in the formula, xhIs a histogram HfValue of (a), khIs the compression coefficient, h _ th is the threshold;
e. and compressing the fused image according to the compression coefficient, and outputting the image.
2. The automatic wide dynamic processing algorithm based on illumination analysis according to claim 1, wherein in step a, the histogram statistics method is as follows:
Hm=Hist(Im);
in the formula ImInputting a middle brightness image, wherein m is 1:3 and represents three images of light, middle and dark respectively, and HmIs its corresponding histogram in the range of [ 0255]。
3. The illumination analysis-based automatic wide dynamic processing algorithm according to claim 1, wherein in step c, when setting shutter values for completing three graphs, the following constraint is required: e1>E2>E3
4. An automatic wide dynamic processing algorithm based on illumination analysis according to claim 1, characterized in that in step e, the pixel algorithm of image compression is:
Figure FDA0003093903900000022
yfto fuse pixel values of the image, ycFor the compressed pixel value, khIs the compression factor.
5. An automatic wide dynamic processing algorithm based on illumination analysis according to claim 4 characterized by normalizing the compressed image dynamic range to the range [ 0255 ]]Finally outputting the pixel value y of the imageoThe formula is as follows:
Figure FDA0003093903900000023
CN201810758199.2A 2018-07-11 2018-07-11 Automatic wide dynamic processing algorithm based on illumination analysis Active CN109102481B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810758199.2A CN109102481B (en) 2018-07-11 2018-07-11 Automatic wide dynamic processing algorithm based on illumination analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810758199.2A CN109102481B (en) 2018-07-11 2018-07-11 Automatic wide dynamic processing algorithm based on illumination analysis

Publications (2)

Publication Number Publication Date
CN109102481A CN109102481A (en) 2018-12-28
CN109102481B true CN109102481B (en) 2021-09-28

Family

ID=64845969

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810758199.2A Active CN109102481B (en) 2018-07-11 2018-07-11 Automatic wide dynamic processing algorithm based on illumination analysis

Country Status (1)

Country Link
CN (1) CN109102481B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442617A (en) * 2008-12-23 2009-05-27 北京中星微电子有限公司 Method for blocked exposure and apparatus thereof
CN103826066A (en) * 2014-02-26 2014-05-28 芯原微电子(上海)有限公司 Automatic exposure adjusting method and system
CN104144298A (en) * 2014-07-16 2014-11-12 浙江宇视科技有限公司 Wide dynamic image synthesis method
CN104159046A (en) * 2014-09-04 2014-11-19 上海航天电子通讯设备研究所 Self-adaptive wide dynamic imaging method and device applied to moon exploration project
CN105872397A (en) * 2016-04-01 2016-08-17 成都振芯科技股份有限公司 Single frame wide dynamic enhancement method and system capable of automatically identifying bright area and dark area

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130031574A (en) * 2011-09-21 2013-03-29 삼성전자주식회사 Image processing method and image processing apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442617A (en) * 2008-12-23 2009-05-27 北京中星微电子有限公司 Method for blocked exposure and apparatus thereof
CN103826066A (en) * 2014-02-26 2014-05-28 芯原微电子(上海)有限公司 Automatic exposure adjusting method and system
CN104144298A (en) * 2014-07-16 2014-11-12 浙江宇视科技有限公司 Wide dynamic image synthesis method
CN104159046A (en) * 2014-09-04 2014-11-19 上海航天电子通讯设备研究所 Self-adaptive wide dynamic imaging method and device applied to moon exploration project
CN105872397A (en) * 2016-04-01 2016-08-17 成都振芯科技股份有限公司 Single frame wide dynamic enhancement method and system capable of automatically identifying bright area and dark area

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
Blending for Wide Dynamic Range Image using Different Exposure Image;Seungmin Lee 等;《2018 International Conference on Electronics, Information, and Communication》;20180405;第1-2页 *
一种适用于硬件实现的宽动态图像合成算法;周海勇 等;《电视技术》;20130602;第37卷(第11期);第47-50页 *
基于FPGA的宽动态范围视频监控***的研究与设计;胡伟;《中国优秀硕士学位论文全文数据库 信息科技辑》;20140215(第2期);第I136-452页 *

Also Published As

Publication number Publication date
CN109102481A (en) 2018-12-28

Similar Documents

Publication Publication Date Title
CN110599433B (en) Double-exposure image fusion method based on dynamic scene
CN105208281B (en) A kind of night scene image pickup method and device
CN103593830B (en) A kind of low illumination level video image enhancement
CN109785240B (en) Low-illumination image enhancement method and device and image processing equipment
US20090317017A1 (en) Image characteristic oriented tone mapping for high dynamic range images
CN106981054B (en) Image processing method and electronic equipment
CN102148936B (en) High dynamic range imaging optimization method and device
CN101115149B (en) Image processing method
CN110163807B (en) Low-illumination image enhancement method based on expected bright channel
CN105578068A (en) High-dynamic-range image generation method, device and mobile terminal
US20130039577A1 (en) Method for improving image quality
CN110113510B (en) Real-time video image enhancement method and high-speed camera system
JP2012109900A (en) Photographing device, photographing method and program
CN106550227B (en) A kind of image saturation method of adjustment and device
Feng et al. Low-light image enhancement based on multi-illumination estimation
CN105376498A (en) Image processing method and system for expanding dynamic range of camera
US20180025476A1 (en) Apparatus and method for processing image, and storage medium
CN106454144B (en) A kind of bearing calibration of pair of Google glass image overexposure
CN114449175A (en) Automatic exposure adjusting method, automatic exposure adjusting device, image acquisition method, medium and equipment
CN103685973A (en) Method and device for local area exposure adjustment on basis of encoder
JP2008206111A (en) Photographing apparatus and photographing method
Li et al. Soft binary segmentation-based backlit image enhancement
CN109102481B (en) Automatic wide dynamic processing algorithm based on illumination analysis
CN114302068B (en) Image shooting method and device
Chung et al. Under-exposed image enhancement using exposure compensation

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
GR01 Patent grant
GR01 Patent grant
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: Automatic Wide Dynamic Processing Algorithm Based on Light Analysis

Granted publication date: 20210928

Pledgee: Bank of Jiangsu Co.,Ltd. Yancheng branch

Pledgor: JIANGSU ANWEISHI INTELLIGENT SECURITY CO.,LTD.

Registration number: Y2024980021949