CN104361566A - Picture processing method for optimizing dark region - Google Patents

Picture processing method for optimizing dark region Download PDF

Info

Publication number
CN104361566A
CN104361566A CN201410660940.3A CN201410660940A CN104361566A CN 104361566 A CN104361566 A CN 104361566A CN 201410660940 A CN201410660940 A CN 201410660940A CN 104361566 A CN104361566 A CN 104361566A
Authority
CN
China
Prior art keywords
gray
value
pixel
scale
level
Prior art date
Application number
CN201410660940.3A
Other languages
Chinese (zh)
Other versions
CN104361566B (en
Inventor
张伟
傅松林
许清泉
张长定
Original Assignee
厦门美图之家科技有限公司
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 厦门美图之家科技有限公司 filed Critical 厦门美图之家科技有限公司
Priority to CN201410660940.3A priority Critical patent/CN104361566B/en
Publication of CN104361566A publication Critical patent/CN104361566A/en
Application granted granted Critical
Publication of CN104361566B publication Critical patent/CN104361566B/en

Links

Abstract

The invention discloses a picture processing method for optimizing a dark region. Region segmentation is carried out on a picture to be processed, independent histogram statistics is carried out on each region, gray level calculation and interpolation calculation are carried out on the picture to be processed, a gravel level picture and a gray scale picture are obtained, finally, brightness enhancing calculation is carried out on pixel points according to the gravel level picture and the gray scale picture, and the final effect picture is obtained. The method is simple in algorithm and high in calculation speed, the effect of improving the dark region of the picture is obvious, and the method is especially suitable for carrying out brightness enhancing processing on a photo shot under an indoor low-light environment or backlight environment.

Description

A kind of image processing method optimizing dark portion region

Technical field

The present invention relates to image processing techniques, particularly a kind of image processing method optimizing dark portion region.

Background technology

When capture apparatus such as routine use video cameras, usually can run into the shooting body be in backlight state under or situation under indoor low luminous environment, when the shooting body is in backlight state, because a large amount of light is injected into the photosensitive array of capture apparatus from the background of the shooting body, thus there is the shooting body under-exposure in the image making capture apparatus obtain, the problem that background parts is over-exposed; When the shooting body is in low luminous environment, there is the problem of the shooting body under-exposure too, cause the image effect taking out undesirable.

In the BLC disposal route of prior art, first the histogram of pending image is obtained, to judge that according to histogram pending image is the need of carrying out backlight compensation, specifically, it is by acquisition first brightness cut off value and the second brightness cut off value, according to the brightness range of above two brightness cut off value determination pixels, different penalty functions is adopted to carry out backlight compensation for the pixel belonging to different brightness range, processing procedure is too complicated, arithmetic speed is comparatively slow, and very high to system performance requirements.

Summary of the invention

The present invention, for solving the problem, provides a kind of image processing method optimizing dark portion region, and it utilizes histogram and gray-scale pitcture to carry out the calculating of brightness enhancing to pending image, and algorithm is simple, and Be very effective.

For achieving the above object, the technical solution used in the present invention is:

Optimize the image processing method in dark portion region, it is characterized in that, comprise the following steps:

10. pair pending image carries out region segmentation, and carries out independent statistics with histogram to each region;

20. pairs of pending images carry out gray count, obtain gray-scale map;

30., according to the gray-scale value of each pixel of pending image on gray-scale map, obtain the statistics with histogram value of this pixel affiliated area;

40. carry out interpolation calculation according to the statistics with histogram value of described pixel to this pixel, obtain the gray-level value of this pixel;

50., using the color value of the gray-level value of described pixel as this pixel, obtain gray-scale pitcture;

60. carry out the calculating of brightness enhancing according to described gray-scale map and gray-scale pitcture to described pixel, obtain final effect figure.

Preferably, in described step 10, statistics with histogram is carried out to pending image, mainly pending image is carried out reducing process, then region segmentation is carried out to the pending image reduced, and calculate each region statistics with histogram table separately.

Preferably, carry out gray count in described step 20 to pending image, its computing method are as follows:

GRAY=0.299*RED+0.587*GREEN+0.114*BLUE;

Or

GRAY=(RED*306+GREEN*601+BLUE*117+512)/1024;

Wherein, GRAY is the gray-scale value of the current pixel point of gray-scale map; RED, GREEN, BLUE are respectively the color value of the red, green, blue passage of the current pixel point of pending image.

Preferably, according to the gray-scale value of each pixel of pending image on gray-scale map in described step 30, obtain the statistics with histogram value of this pixel affiliated area, mainly first judge the cut zone belonging to current pixel point, obtain the maxima and minima of the color value in this region, and obtain this statistics with histogram value by following formulae discovery:

total=((low+high)*0.4+26+gray*0.5)/255;

Wherein, total is the statistics with histogram value of current pixel point, and gray is the gray-scale value of current pixel point, and low is the minimum value of the color value in current pixel point affiliated area; High is the maximal value of the color value in current pixel point affiliated area.

Preferably, the statistics with histogram value according to described pixel in described step 40 carries out interpolation calculation to this pixel, obtains the gray-level value of this pixel, and its computing formula is as follows:

graylevel=low*total+(1.0-total)*high;

Wherein, graylevel is the gray-level value of current pixel point; Low is the minimum value of the color value in current pixel point affiliated area; High is the maximal value of the color value in current pixel point affiliated area; Total is the statistics with histogram value of current pixel point.

Preferably, according to described gray-scale map and gray-scale pitcture, the calculating of brightness enhancing is carried out to described pixel in described step 60, mainly threshold values calculating is carried out to the gray-level value of described pixel, obtain new gray-level value, and the calculating of brightness enhancing is carried out according to the color value of described pixel on pending image, gray-scale value on gray-scale map and new gray-level value, obtain the color value of described pixel on final effect figure.

Preferably, the described gray-level value to described pixel carries out threshold values calculating, if the gray-level value of described pixel is greater than threshold values, then the computing method of new gray-level value are as follows:

new=(gray-level)*((level-M)*(level-M)/255+128)/level+(level-M)*(level-M)/255+128;

Wherein, new is the value of new gray shade scale; Level is the value of corresponding pixel points in gray-scale pitcture; Gray is the value of corresponding pixel points on gray-scale map, and M is default threshold values.

Preferably, the described gray-level value to described pixel carries out threshold values calculating, if the gray-level value of described pixel is less than threshold values, then the computing method of new gray-level value are as follows:

new=gray*4;

Wherein, new is the value of new gray shade scale, and gray is the value of corresponding pixel points on gray-scale map.

Preferably, the span of described threshold values is between 10 to 40.

Preferably, the described calculating carrying out brightness enhancing according to the color value of described pixel on pending image, gray-scale value on gray-scale map and new gray-level value, obtain the color value of described pixel on final effect figure, its computing method are as follows:

new=lumLevel-(newLum-128)*(newLum-128)/255;

old=lumLevel-(oldLum-128)*(oldLum-128)/255;

retult=newLum+(color-oldLum)*min(new/old,5);

Wherein, retult is the color value of described pixel on final effect figure; NewLum is new gray-level value; OldLum is gray-scale value; LumLevel is the dark portion threshold value of gray-scale value, and its span is between 40 to 90; New is new gray-level value and the difference of lumLevel; Old is the difference value of gray-scale value and lumLevel; Color is the color value of pending image.

The invention has the beneficial effects as follows:

A kind of image processing method optimizing dark portion region of the present invention, it is by carrying out region segmentation to pending image, independent statistics with histogram is carried out to each region, and gray count and interpolation calculation are carried out to pending image, obtain gray-scale map and gray-scale pitcture, gray-scale map described in last basis and gray-scale pitcture carry out the calculating of brightness enhancing to described pixel, obtain final effect figure, not only algorithm is simple for it, fast operation, and the improvement Be very effective to image dark portion region, be specially adapted to strengthen process to the brightness of the photo taken under the low luminous environment in indoor or backlight environment.

Accompanying drawing explanation

Accompanying drawing described herein is used to provide a further understanding of the present invention, forms a part of the present invention, and schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:

Fig. 1 is a kind of general flow chart optimizing the image processing method in dark portion region of the present invention;

Fig. 2 is the pending image of the present invention one specific embodiment;

Fig. 3 is the gray-scale map of Fig. 2;

Fig. 4 is the gray-scale pitcture of Fig. 2;

Fig. 5 is the final effect figure of Fig. 2.

Embodiment

In order to make technical matters to be solved by this invention, technical scheme and beneficial effect clearly, understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein only in order to explain the present invention, be not intended to limit the present invention.

As shown in Figure 1, a kind of image processing method optimizing dark portion region of the present invention, it comprises the following steps:

10. pair pending image (as Fig. 2) carries out region segmentation, and carries out independent statistics with histogram to each region;

20. pairs of pending images carry out gray count, obtain gray-scale map (as Fig. 3);

30., according to the gray-scale value of each pixel of pending image on gray-scale map, obtain the statistics with histogram value of this pixel affiliated area;

40. carry out interpolation calculation according to the statistics with histogram value of described pixel to this pixel, obtain the gray-level value of this pixel;

50. using the color value of the gray-level value of described pixel as this pixel, obtains gray-scale pitcture (as Fig. 4);

60. carry out the calculating of brightness enhancing according to described gray-scale map and gray-scale pitcture to described pixel, obtain final effect figure (as Fig. 5).

In described step 10, statistics with histogram is carried out to pending image, mainly pending image is carried out reducing process, then region segmentation is carried out to the pending image reduced, and calculate each region statistics with histogram table separately.

Carry out gray count to pending image in described step 20, its computing method are as follows:

GRAY=0.299*RED+0.587*GREEN+0.114*BLUE;

Or

GRAY=(RED*306+GREEN*601+BLUE*117+512)/1024;

Wherein, GRAY is the gray-scale value of the current pixel point of gray-scale map; RED, GREEN, BLUE are respectively the color value of the red, green, blue passage of the current pixel point of pending image.

According to the gray-scale value of each pixel of pending image on gray-scale map in described step 30, obtain the statistics with histogram value of this pixel affiliated area, mainly first judge the cut zone belonging to current pixel point, obtain the maxima and minima of the color value in this region, and obtain this statistics with histogram value by following formulae discovery:

total=((low+high)*0.4+26+gray*0.5)/255;

Wherein, total is the statistics with histogram value of current pixel point, and gray is the gray-scale value of current pixel point, and low is the minimum value of the color value in current pixel point affiliated area; High is the maximal value of the color value in current pixel point affiliated area.

Statistics with histogram value according to described pixel in described step 40 carries out interpolation calculation to this pixel, obtains the gray-level value of this pixel, and its computing formula is as follows:

graylevel=low*total+(1.0-total)*high;

Wherein, graylevel is the gray-level value of current pixel point; Low is the minimum value of the color value in current pixel point affiliated area; High is the maximal value of the color value in current pixel point affiliated area; Total is the statistics with histogram value of current pixel point.

According to described gray-scale map and gray-scale pitcture, the calculating of brightness enhancing is carried out to described pixel in described step 60, mainly threshold values calculating is carried out to the gray-level value of described pixel, obtain new gray-level value, and the calculating of brightness enhancing is carried out according to the color value of described pixel on pending image, gray-scale value on gray-scale map and new gray-level value, obtain the color value of described pixel on final effect figure; The span of described threshold values is between 10 to 40, and preferably, described threshold values is 26.

Circular is as follows:

If a. the gray-level value of described pixel is greater than threshold values, then the computing method of new gray-level value are as follows:

new=(gray-level)*((level-M)*(level-M)/255+128)/level+(level-M)*(level-M)/255+128;

Wherein, new is the value of new gray shade scale; Level is the value of corresponding pixel points in gray-scale pitcture; Gray is the value of corresponding pixel points on gray-scale map, and M is default threshold values.

If b. the gray-level value of described pixel is less than threshold values, then the computing method of new gray-level value are as follows:

new=gray*4;

Wherein, new is the value of new gray shade scale, and gray is the value of corresponding pixel points on gray-scale map.

C. the described calculating carrying out brightness enhancing according to the color value of described pixel on pending image, gray-scale value on gray-scale map and new gray-level value, obtain the color value of described pixel on final effect figure, its computing method are as follows:

new=lumLevel-(newLum-128)*(newLum-128)/255;

old=lumLevel-(oldLum-128)*(oldLum-128)/255;

retult=newLum+(color-oldLum)*min(new/old,5);

Wherein, retult is the color value of described pixel on final effect figure; NewLum is new gray-level value; OldLum is gray-scale value; LumLevel is the dark portion threshold value of gray-scale value, and its span, between 40 to 90, is preferably 70; New is new gray-level value and the difference of lumLevel; Old is the difference value of gray-scale value and lumLevel; Color is the color value of pending image.

Above-mentioned explanation illustrate and describes the preferred embodiments of the present invention, be to be understood that the present invention is not limited to the form disclosed by this paper, should not regard the eliminating to other embodiments as, and can be used for other combinations various, amendment and environment, and can in invention contemplated scope herein, changed by the technology of above-mentioned instruction or association area or knowledge.And the change that those skilled in the art carry out and change do not depart from the spirit and scope of the present invention, then all should in the protection domain of claims of the present invention.

Claims (10)

1. optimize the image processing method in dark portion region, it is characterized in that, comprise the following steps:
10. pair pending image carries out region segmentation, and carries out independent statistics with histogram to each region;
20. pairs of pending images carry out gray count, obtain gray-scale map;
30., according to the gray-scale value of each pixel of pending image on gray-scale map, obtain the statistics with histogram value of this pixel affiliated area;
40. carry out interpolation calculation according to the statistics with histogram value of described pixel to this pixel, obtain the gray-level value of this pixel;
50., using the color value of the gray-level value of described pixel as this pixel, obtain gray-scale pitcture;
60. carry out the calculating of brightness enhancing according to described gray-scale map and gray-scale pitcture to described pixel, obtain final effect figure.
2. a kind of image processing method optimizing dark portion region according to claim 1, it is characterized in that: in described step 10, statistics with histogram is carried out to pending image, mainly pending image is carried out reducing process, then region segmentation is carried out to the pending image reduced, and calculate each region statistics with histogram table separately.
3. a kind of image processing method optimizing dark portion region according to claim 1, it is characterized in that: carry out gray count to pending image in described step 20, its computing method are as follows:
GRAY=0.299*RED+0.587*GREEN+0.114*BLUE;
Or
GRAY=(RED*306+GREEN*601+BLUE*117+512)/1024;
Wherein, GRAY is the gray-scale value of the current pixel point of gray-scale map; RED, GREEN, BLUE are respectively the color value of the red, green, blue passage of the current pixel point of pending image.
4. a kind of image processing method optimizing dark portion region according to claim 1, it is characterized in that: according to the gray-scale value of each pixel of pending image on gray-scale map in described step 30, obtain the statistics with histogram value of this pixel affiliated area, mainly first judge the cut zone belonging to current pixel point, obtain the maxima and minima of the color value in this region, and obtain this statistics with histogram value by following formulae discovery:
total=((low+high)*0.4+26+gray*0.5)/255;
Wherein, total is the statistics with histogram value of current pixel point, and gray is the gray-scale value of current pixel point, and low is the minimum value of the color value in current pixel point affiliated area; High is the maximal value of the color value in current pixel point affiliated area.
5. a kind of image processing method optimizing dark portion region according to claim 4, it is characterized in that: the statistics with histogram value according to described pixel in described step 40 carries out interpolation calculation to this pixel, obtain the gray-level value of this pixel, its computing formula is as follows:
graylevel=low*total+(1.0-total)*high;
Wherein, grayl evel is the gray-level value of current pixel point; Low is the minimum value of the color value in current pixel point affiliated area; High is the maximal value of the color value in current pixel point affiliated area; Total is the statistics with histogram value of current pixel point.
6. a kind of image processing method optimizing dark portion region according to claim 1, it is characterized in that: in described step 60, according to described gray-scale map and gray-scale pitcture, the calculating of brightness enhancing is carried out to described pixel, mainly threshold values calculating is carried out to the gray-level value of described pixel, obtain new gray-level value, and the calculating of brightness enhancing is carried out according to the color value of described pixel on pending image, gray-scale value on gray-scale map and new gray-level value, obtain the color value of described pixel on final effect figure.
7. a kind of image processing method optimizing dark portion region according to claim 6, it is characterized in that: the described gray-level value to described pixel carries out threshold values calculating, if the gray-level value of described pixel is greater than threshold values, then the computing method of new gray-level value are as follows:
new=(gray-level)*((level-M)*(level-M)/255+128)/level+(level-M)*(level-M)/255+128;
Wherein, new is the value of new gray shade scale; Level is the value of corresponding pixel points in gray-scale pitcture; Gray is the value of corresponding pixel points on gray-scale map, and M is default threshold values.
8. a kind of image processing method optimizing dark portion region according to claim 6, it is characterized in that: the described gray-level value to described pixel carries out threshold values calculating, if the gray-level value of described pixel is less than threshold values, then the computing method of new gray-level value are as follows:
new=gray*4;
Wherein, new is the value of new gray shade scale, and gray is the value of corresponding pixel points on gray-scale map.
9. a kind of image processing method optimizing dark portion region according to claim 6 or 7 or 8, is characterized in that: the span of described threshold values is between 10 to 40.
10. a kind of image processing method optimizing dark portion region according to claim 6, it is characterized in that: the described calculating carrying out brightness enhancing according to the color value of described pixel on pending image, gray-scale value on gray-scale map and new gray-level value, obtain the color value of described pixel on final effect figure, its computing method are as follows:
new=lumLevel-(newLum-128)*(newLum-128)/255;
old=lumLevel-(oldLum-128)*(oldLum-128)/255;
retult=newLum+(color-oldLum)*min(new/old,5);
Wherein, retult is the color value of described pixel on final effect figure; NewLum is new gray-level value; OldLum is gray-scale value; LumLevel is the dark portion threshold value of gray-scale value, and its span is between 40 to 90; New is new gray-level value and the difference of lumLevel; Old is the difference value of gray-scale value and lumLevel; Color is the color value of pending image.
CN201410660940.3A 2014-11-17 2014-11-17 A kind of image processing method in optimization dark portion region CN104361566B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410660940.3A CN104361566B (en) 2014-11-17 2014-11-17 A kind of image processing method in optimization dark portion region

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410660940.3A CN104361566B (en) 2014-11-17 2014-11-17 A kind of image processing method in optimization dark portion region

Publications (2)

Publication Number Publication Date
CN104361566A true CN104361566A (en) 2015-02-18
CN104361566B CN104361566B (en) 2018-08-10

Family

ID=52528824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410660940.3A CN104361566B (en) 2014-11-17 2014-11-17 A kind of image processing method in optimization dark portion region

Country Status (1)

Country Link
CN (1) CN104361566B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700426A (en) * 2015-04-02 2015-06-10 厦门美图之家科技有限公司 Method and system for judging whether image is too dark or too bright
CN106651819A (en) * 2016-12-15 2017-05-10 深圳市华星光电技术有限公司 Image processing method and apparatus
CN106851124A (en) * 2017-03-09 2017-06-13 广东欧珀移动通信有限公司 Image processing method, processing unit and electronic installation based on the depth of field
CN109544486A (en) * 2018-10-18 2019-03-29 维沃移动通信(杭州)有限公司 A kind of image processing method and terminal device
CN110111281A (en) * 2019-05-08 2019-08-09 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060082689A1 (en) * 2004-10-15 2006-04-20 Genesis Microchip Inc. Method of generating transfer curves for adaptive contrast enhancement
CN101739672A (en) * 2009-12-02 2010-06-16 北京中星微电子有限公司 Method and device for equalizing histogram based on sub-regional interpolation
CN104021531A (en) * 2014-06-18 2014-09-03 厦门美图之家科技有限公司 Improved method for enhancing dark environment images on basis of single-scale Retinex

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060082689A1 (en) * 2004-10-15 2006-04-20 Genesis Microchip Inc. Method of generating transfer curves for adaptive contrast enhancement
CN101739672A (en) * 2009-12-02 2010-06-16 北京中星微电子有限公司 Method and device for equalizing histogram based on sub-regional interpolation
CN104021531A (en) * 2014-06-18 2014-09-03 厦门美图之家科技有限公司 Improved method for enhancing dark environment images on basis of single-scale Retinex

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许志远等: "基于双线性插值动态直方图均衡化的雾天图像增强算法", 《大连海事大学学报》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700426A (en) * 2015-04-02 2015-06-10 厦门美图之家科技有限公司 Method and system for judging whether image is too dark or too bright
CN104700426B (en) * 2015-04-02 2017-11-03 厦门美图之家科技有限公司 It is a kind of judge image whether partially dark or partially bright method and system
CN106651819A (en) * 2016-12-15 2017-05-10 深圳市华星光电技术有限公司 Image processing method and apparatus
CN106851124A (en) * 2017-03-09 2017-06-13 广东欧珀移动通信有限公司 Image processing method, processing unit and electronic installation based on the depth of field
CN109544486A (en) * 2018-10-18 2019-03-29 维沃移动通信(杭州)有限公司 A kind of image processing method and terminal device
CN110111281A (en) * 2019-05-08 2019-08-09 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN104361566B (en) 2018-08-10

Similar Documents

Publication Publication Date Title
Wen et al. Single underwater image enhancement with a new optical model
EP2987135B1 (en) Reference image selection for motion ghost filtering
CN101304489B (en) Automatic exposure method and apparatus
KR100866490B1 (en) Apparatus and method for compensating chromatic aberration of image
US20150170389A1 (en) Automatic selection of optimum algorithms for high dynamic range image processing based on scene classification
CN106251301B (en) A kind of single image to the fog method based on dark primary priori
JP5832855B2 (en) Image processing apparatus, imaging apparatus, and image processing program
CN101783963B (en) Nighttime image enhancing method with highlight inhibition
CN103402102B (en) The method and apparatus of dual camera camera system and white balance adjusting thereof
US9131201B1 (en) Color correcting virtual long exposures with true long exposures
CN102231206B (en) Colorized night vision image brightness enhancement method applicable to automotive assisted driving system
CN105046666B (en) A kind of method of the real-time defogging of traffic video based on dark primary priori
KR102145201B1 (en) Method and apparatus for dynamic range enhancement of an image
TWI514323B (en) Method and system for image haze removal based on hybrid dark channel prior
JP2009055610A (en) Method and apparatus for correcting chromatic aberration of image
US9619873B2 (en) Image processing device and image processing method
CN102568386B (en) Dynamic backlight local control liquid crystal display and system
CN103327345B (en) White balance processing method and processing device thereof
CN103929632B (en) A kind of method for correcting automatic white balance and device
CN103218778B (en) The disposal route of a kind of image and video and device
CN103996174B (en) Method for performing hole repair on Kinect depth images
US9350905B2 (en) Image signal processing apparatus, image signal processing method, and image capturing apparatus
CN105761227A (en) Underwater image enhancement method based on dark channel prior algorithm and white balance
CN103297789B (en) White balance correcting method and white balance correcting device
CN104580925A (en) Image brightness controlling method, device and camera

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