CN100345160C - Histogram equalizing method for controlling average brightness - Google Patents

Histogram equalizing method for controlling average brightness Download PDF

Info

Publication number
CN100345160C
CN100345160C CNB2005100289968A CN200510028996A CN100345160C CN 100345160 C CN100345160 C CN 100345160C CN B2005100289968 A CNB2005100289968 A CN B2005100289968A CN 200510028996 A CN200510028996 A CN 200510028996A CN 100345160 C CN100345160 C CN 100345160C
Authority
CN
China
Prior art keywords
image
brightness
value
flow rate
mean flow
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
CNB2005100289968A
Other languages
Chinese (zh)
Other versions
CN1750043A (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.)
Central Research Institute Of Shanghai Radio And Television Group Co ltd
Original Assignee
Central Research Institute Of Shanghai Radio And Television Group 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 Central Research Institute Of Shanghai Radio And Television Group Co ltd filed Critical Central Research Institute Of Shanghai Radio And Television Group Co ltd
Priority to CNB2005100289968A priority Critical patent/CN100345160C/en
Publication of CN1750043A publication Critical patent/CN1750043A/en
Application granted granted Critical
Publication of CN100345160C publication Critical patent/CN100345160C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides a histogram equalizing method for controlling mean brightness. The brightness value of a digital image is extracted according to color models. A series of values, such as brightness, mean brightness, equalizing coefficient, etc. are calculated according to the statistic measurement histogram. The brightness of the image is mapped, and the digital image is reduced. The histogram equalizing method for controlling mean brightness provided by the present invention can effectively and directly control the brightness change brought by histogram equalization, and can save storage space.

Description

A kind of histogram equalizing method of controlling mean flow rate
Technical field
The present invention relates to a kind of histogram equalizing method of controlling mean flow rate, this method is applied to technical fields such as rest image processing, video image enhancing.
Background technology
Histogram is that output data is carried out classified statistics figure, and it has reflected the distribution probability feature of target data.Histogram equalization is that a kind of these classified statistics figure that utilizes carries out the technology that distribution characteristics is optimized, and optimizes later DATA DISTRIBUTION trend and evenly distributes.The histogram equalization technology is widely used in the figure image intensifying.
The histogram equalization technology is open by the following files:
1)Two-dimensional?Signal?and?Image?Processing,Prentice?hall,Englewoodcliffs,New?Jersey,1990
2)Digital?Image?Processing,R.C.Gonzalez,P.Wints,Addison-Wesley,Reading,Massachusetts
3)Evaluation?of?the?Effectiveness?of?Adaptive?Histogram?Equalization?forContrast?Enhancement,J.Zimmerman,S.prizer,E.Staab,E.Perry,W.McCarteney?and?B.Brenton,IEEE?Trans.on?Medical?Imaing,PP.304-312
4)Application?of?Adaptive?Histogram?Equalization?to?x-ray?chest?Image.Y.Li,W.Wang?and?D.Y.Yu,Proc.of?the?SPIE,PP.513-514,vol.2321,1994
These disclosed files studied the histogram equalization technology aspect Flame Image Process application and be practiced in medical imaging and the enhancing of radar image.
The essence of histogram equalization is that the gradient that make to strengthen the back data is directly proportional with the occurrence probability of these data, in a sub-picture, if certain is many more as numerical value, strengthen so the back it with adjacent just strong more as the contrast between the numerical value.Histogram equalization is in expanded contrast generally speaking, enlarged the dynamic range of image, make the visual experience of image improve, shown in Fig. 4 (a) and Fig. 4 (b), be respectively balanced preceding figure and the histogram after the equilibrium, with Fig. 4 (a) contrast, the pixel brightness contribution of Fig. 4 (b) no longer concentrates on somewhere, thereby more even, dynamic range is bigger.But the histogram equalization technology also has very significant disadvantages: its equilibrium result determines fully that by the distribution characteristics of data balancing procedure is uncontrolled.The shortcoming of histogram equalization is the intermediate value that the mean flow rate of the image after strengthening all tends to brightness values, when the mean flow rate of former figure is worth away from this, the mean flow rate of the image after the enhancing changes too greatly, and the overall visual of image also just changes bigger, does not meet application demand in many application scenarios.
Summary of the invention
A kind of histogram equalizing method of controlling mean flow rate provided by the invention, thus by the variation of control mean flow rate histogram equalization process is controlled.
In order to achieve the above object, the invention provides a kind of histogram equalizing method of controlling mean flow rate, it comprises 3 kinds of technical schemes:
A kind of histogram equalizing method of controlling mean flow rate, it comprises following steps:
Step a), input digital image are if color digital image then needs by color model extraction brightness number wherein; If gray level image is then directly used half-tone information as brightness number;
Step b), statistics brightness histogram H are made as array H[x], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
Step c), according to histogram, calculate brightness accumulated probability distribution function CDF, be made as CDF[x], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
Step d), the mean flow rate BA of calculating input image;
Step e), calculating are moved the equalizing coefficient K of restriction based on mean flow rate: establish DBA and be predetermined permission luminance shifting maximum magnitude, calculate: K=DBA/|BAH-BA|, if K>1, then make K=1, wherein, || expression takes absolute value, and BAH is the mean flow rate behind the histogram equalization, it is the intermediate value of brightness values, i.e. BAH=(X 0+ X N-1)/2;
Step f), calculating brightness mapping table, i.e. brightness values mapping table G[x], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values; Then: G[X j]=(1-K) * X j+ K * CDF[X j] * X N-1
Step g), the brightness value of setting input picture is Xin, the brightness value that calculates the original image after strengthening is Xout, then Xout=G[Xin];
According to the image property of input, the reduction number word image if input is coloured image, is then gone back original color image, if input is gray level image, then reduces gray level image.
In step e), K limits to equalizing coefficient: and K=min (DBA/ (BAH-BA), Kmax), wherein, Kmax is default maximum histogram equalization coefficient, can prevent bigger K value close when mean value or that produce when equaling BAH like this;
In step e), when image brightness distribution is comparatively concentrated, mean flow rate mobile smaller, when image brightness distribution was discrete, the mobile of mean flow rate can be more greatly; Event is carried out dynamic optimization design: DBA=C * Max (Sigma-C0,0) to the maximum mobile DBA of the mean flow rate of certain frame/field, and wherein, C is default constant, and Sigma is the luminance standard deviation of previous frame/field, and C0 is default constant; As Sigma during smaller or equal to this constant, when promptly the histogram dispersion degree was little, DBA was zero, and K also is zero, and histogram equalization does not strengthen effect, and standard deviation is big more, and the histogram equalization effect is big more; Use dispersion degree can obtain better pictures and handle robustness as control device.
In step e), the maximum mobile DBA of mean flow rate is adopted the mean square deviation dynamic design: DBA=C * Max (MSE-C0,0), wherein, MSE is the brightness mean square deviation.
In step e), to the differential attitude design of maximum mobile DBA employing simple average of mean flow rate: DBA=C * Max (ME-C0,0), wherein, ME is that simple average is poor, and its computation process is as follows: ME = 1 Num Σ j = 0 Num - 1 | B j - BA | , Wherein, Num is a sum of all pixels, B jBe j pixel intensity.
In described step a), color model can be the Y value of YUV color space, the Y value in YCbCr space, and the V value in HSV space also can be the L value in HSL space, perhaps their equivalent expression.
A kind of equalizing method for truncating histogram of controlling mean flow rate, it comprises following steps:
Step a), input digital image are if color digital image then needs by color model extraction brightness number wherein; If gray level image is then directly used half-tone information as brightness number;
Step b), statistic histogram H[x], truncating histogram CH[x], block picture number and CN, wherein x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
Step b1), the storage space of the above statistics of initialization target: H[x]=0; CH[x]=0; CN=0, x ∈ { X j| j=0,1 ..., N-1};
Step b2), traversing graph picture in order, read in the brightness value Xin of image current pixel;
Step b3), H[Xin]=H[Xin]+1;
Step b4), judge that whether the pairing truncating histogram storage of the brightness value of this pixel number component value is less than predetermined parameters CountMax, if then make CH[Xin]=CH[Xin]+1, if not, then make CN=CN+1;
Step b5), judge whether all pixels statisticses of image to be finished, if, execution in step c then), if not, then return circulation execution in step b2)~step b5);
Step c), calculate accumulated probability distribution function CDF, be made as CCDF[x based on truncating histogram], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
CCH[x defines arrays], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
CCH[X 0]=CH[X 0]+CN/N;
Recycle is calculated: CCH[X j]=CCH[X J-1]+CH[X j]+CN/N, j=1,2 ..., N-1;
Last cycle calculations: CCDF[X j]=CCH[X j]/Num, j=0,1 ..., N-1; Wherein Num is the sum of all pixels of this image;
Step d), calculating mean flow rate skew BAM_CUT:
BAM _ CUT = 1 Num Σ j = 0 N - 1 H [ X j ] × ( G [ X j ] - X j ) ;
Step e), calculating equalizing coefficient K:K=DBA/|BAM_CUT|, wherein, DBA is predetermined permission luminance shifting maximum magnitude, || expression takes absolute value; If the K that calculates greater than 1, then makes K=1;
Step f), calculating brightness mapping table G[x]: G[X j]=(1-K) * X j+ K * CCDF[X j] * X N-1, j=0,1 ..., N-1;
Step g), mapping input brightness value: the brightness value of establishing input picture is Xin, calculates the brightness value Xout of the original image after strengthening, then Xout=G[Xin];
According to the image property of input, the reduction number word image if input is coloured image, is then gone back original color image, if input is gray level image, then reduces gray level image.
At step b2) in, can traverse all pixels of image by row, column, backward, the row etc. of falling in proper order.
In step e), K limits to equalizing coefficient: and K=min (DBA/|BAH|, Kmax), wherein, Kmax is default maximum histogram equalization coefficient, can prevent bigger K value close when mean value or that produce when equaling BAH like this;
In step e), when image brightness distribution is comparatively concentrated, mean flow rate mobile smaller, when image brightness distribution was discrete, the mobile of mean flow rate can be more greatly; Event is carried out dynamic optimization design: DBA=C * Max (Sigma-C0,0) to the maximum mobile DBA of the mean flow rate of certain frame/field, and wherein, C is default constant, and Sigma is the luminance standard deviation of previous frame/field, and C0 is default constant; As Sigma during smaller or equal to this constant, when promptly the histogram dispersion degree was little, DBA was zero, and K also is zero, and histogram equalization does not strengthen effect, and standard deviation is big more, and the histogram equalization effect is big more; Use dispersion degree can obtain better pictures and handle robustness as control device.
In step e), the maximum mobile DBA of mean flow rate is adopted the mean square deviation dynamic design: DBA=C * Max (MSE-C0,0), wherein, MSE is the brightness mean square deviation.
In step e), to the differential attitude design of maximum mobile DBA employing simple average of mean flow rate: DBA=C * Max (ME-C0,0), wherein, ME is that simple average is poor, and its computation process is as follows: ME = 1 Num Σ j = 0 Num - 1 | B j - BA | , Wherein, Num is a sum of all pixels, B jBe j pixel intensity.
In described step a), color model can be the Y value of YUV color space, the Y value in YCbCr space, and the V value in HSV space also can be the L value in HSL space, perhaps their equivalent expression.
A kind of equalizing method for truncating histogram of controlling mean flow rate, it comprises following steps:
Step a), input digital image are if color digital image then needs by color model extraction brightness number wherein; If gray level image is then directly used half-tone information as brightness number;
Step b), statistics full figure brightness and S, truncating histogram CH[x], block picture number and CN, residue brightness and SS, wherein, x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
Step b1), the storage space of the above statistics of initialization target: S=0; SS=0; CH[x]=0; CN=0, wherein, x ∈ { X j| j=0,1 ..., N-1};
Step b2), traversing graph picture in order, read in the brightness value Xin of image current pixel;
Step b3), S=S+Xin;
Step b4), judge that whether the pairing truncating histogram storage of the brightness value of this pixel number component value is less than predetermined parameters CountMax, if then make CH[Xin]=CH[Xin]+1, SS=SS+Xin if not, then makes CN=CN+1;
Step b5), judge whether all pixels statisticses of image to be finished, if, execution in step c then), if not, then return circulation execution in step b2)~step b5);
Step c), calculate accumulated probability distribution function CDF, be made as CCDF[x based on truncating histogram], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
CCH[x defines arrays], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
CCH[X 0]=CH[X 0]+CN/N;
Recycle is calculated: CCH[X j]=CCH[X J-1]+CH[X j]+CN/N, j=1,2 ..., N-1;
Last cycle calculations: CCDF[X j]=CCH[X j]/Num, j=0,1 ..., N-1; Wherein Num is the sum of all pixels of this image;
Approximate mean flow rate BA_CUT after step d), the calculating equilibrium:
BA_CUT=[SS+(X 0+X N-1)×CN/2]/Num;
Step e), computed image mean flow rate BA:BA=S/Num;
Step f), calculating equalizing coefficient K:K=DBA/|BA_CUT-BA|, wherein, DBA is predetermined permission luminance shifting maximum magnitude; || expression takes absolute value;
Step g), calculating brightness mapping table G[x]: G[X j]=(1-K) * X j+ K * CCDF[X j] * X N-1J=0,1 ..., N-1;
Step h), mapping input brightness value: the brightness value of establishing input picture is Xin, calculates the brightness value Xout of the original image after strengthening, then Xout=G[Xin];
According to the image property of input, the reduction number word image if input is coloured image, is then gone back original color image, if input is gray level image, then reduces gray level image.
This method is offset mean flow rate carries out approximate treatment, has saved a statistics with histogram, and the calculating of mean flow rate skew is not needed by CCDF, has increased the concurrency of calculating.
At step b2) in, can traverse all pixels of image by row, column, backward, the row etc. of falling in proper order.
In step f), K limits to equalizing coefficient: and K=min (DBA/|BA_CUT-BA|, Kmax), wherein, Kmax is default maximum histogram equalization coefficient, can prevent bigger K value close when mean value or that produce when equaling BAH like this;
In step f), when image brightness distribution is comparatively concentrated, mean flow rate mobile smaller, when image brightness distribution was discrete, the mobile of mean flow rate can be more greatly; Event is carried out dynamic optimization design: DBA=C * Max (Sigma-C0,0) to the maximum mobile DBA of the mean flow rate of certain frame/field, and wherein, C is default constant, and Sigma is the luminance standard deviation of previous frame/field, and C0 is default constant; As Sigma during smaller or equal to this constant, when promptly the histogram dispersion degree was little, DBA was zero, and K also is zero, and histogram equalization does not strengthen effect, and standard deviation is big more, and the histogram equalization effect is big more; Use dispersion degree can obtain better pictures and handle robustness as control device.
In step f), the maximum mobile DBA of mean flow rate is adopted the mean square deviation dynamic design: DBA=C * Max (MSE-C0,0), wherein, MSE is the brightness mean square deviation.
In step f), to the differential attitude design of maximum mobile DBA employing simple average of mean flow rate: DBA=C * Max (ME-C0,0), wherein, ME is that simple average is poor, and its computation process is as follows: ME = 1 Num Σ j = 0 Num - 1 | B j - BA | , Wherein, Num is a sum of all pixels, B jBe j pixel intensity.
In described step a), color model can be the Y value of YUV color space, the Y value in YCbCr space, and the V value in HSV space also can be the L value in HSL space, perhaps their equivalent expression.
Use the histogram equalizing method of control mean flow rate provided by the invention, be used in combination forecasting techniques between frame/field, the eigenwert of histogram of present frame/field etc. is applied to the contrast expansion of next frame/field, can save storage space like this.
A kind of histogram equalizing method of controlling mean flow rate provided by the invention can effectively directly be controlled the brightness variation that histogram equalization brings.
Description of drawings
Fig. 1 is a kind of process flow diagram of controlling the histogram equalizing method of mean flow rate provided by the invention;
Fig. 2 is a kind of process flow diagram of controlling the equalizing method for truncating histogram of mean flow rate provided by the invention;
Fig. 3 is in a kind of equalizing method for truncating histogram of controlling mean flow rate provided by the invention, the process flow diagram that approximate treatment is carried out in skew to mean flow rate;
Among Fig. 4, Fig. 4 (a) and Fig. 4 (b) are respectively balanced preceding figure and the histogram after the equilibrium.
Embodiment
Followingly specify a kind of preferred forms of the present invention according to Fig. 1, Fig. 2, Fig. 3:
As shown in Figure 1, be the process flow diagram of the histogram equalizing method of control mean flow rate provided by the invention, it comprises following steps:
Step a), input digital image are if color digital image then needs by color model extraction brightness number wherein; If gray level image is then directly used half-tone information as brightness number;
Step b), statistics brightness histogram H are made as array H[x], x ∈ { X j| j=0,1 ..., 255}, X j=j; The corresponding utmost point black of j=0, the j=255 correspondence is white extremely.
Step c), according to histogram, calculate brightness accumulated probability distribution function CDF, be made as CDF[x], x ∈ { X j| j=0,1 ..., 255}, X j=j; The corresponding utmost point black of j=0, the j=255 correspondence is white extremely.
Step d), the mean flow rate BA of calculating input image;
Step e), calculating are moved the equalizing coefficient K of restriction based on mean flow rate: establish DBA and be predetermined permission luminance shifting maximum magnitude, calculate: K=DBA/|BAH-BA|, if K is greater than 1, then make K equal 1, wherein, || expression takes absolute value, and BAH is the mean flow rate behind the histogram equalization, it is generally the intermediate value of brightness values, i.e. BAH=(X 0+ X N-1)/2;
Step f), calculating brightness mapping table, i.e. brightness values mapping table G[x], x ∈ { X j| j=0,1 ..., 255}, X j=j; The corresponding utmost point black of j=0, the j=255 correspondence is white extremely; G[j then]=(1-K) * j+K * CDF[j] * 255;
Step g), the brightness value of setting input picture is Xin, the brightness value that calculates the original image after strengthening is Xout, then Xout=G[Xin];
According to the image property of input, the reduction number word image if input is coloured image, is then gone back original color image, if input is gray level image, then reduces gray level image.
In step e), K limits to equalizing coefficient: and K=min (DBA/ (BAH-BA), Kmax), wherein, Kmax is default maximum histogram equalization coefficient, can prevent bigger K value close when mean value or that produce when equaling BAH like this;
In step e), when image brightness distribution is comparatively concentrated, mean flow rate mobile smaller, when image brightness distribution was discrete, the mobile of mean flow rate can be more greatly; Event is carried out dynamic optimization design: DBA=C * Max (Sigma-C0,0) to the maximum mobile DBA of the mean flow rate of certain frame/field, and wherein, C is default constant, and Sigma is the luminance standard deviation of previous frame/field, and C0 is default constant; As Sigma during smaller or equal to this constant, when promptly the histogram dispersion degree was little, DBA was zero, and K also is zero, and histogram equalization does not strengthen effect, and standard deviation is big more, and the histogram equalization effect is big more; Use dispersion degree can obtain better pictures and handle robustness as control device.
In step e), the maximum mobile DBA of mean flow rate is adopted the mean square deviation dynamic design: DBA=C * Max (MSE-C0,0), wherein, MSE is the brightness mean square deviation.
In step e), to the differential attitude design of maximum mobile DBA employing simple average of mean flow rate: DBA=C * Max (ME-C0,0), wherein, ME is that simple average is poor, and its computation process is as follows: ME = 1 Num Σ j = 0 Num - 1 | B j - BA | , Wherein, Num is a sum of all pixels, B jBe j pixel intensity.
In described step a), color model can be the Y value of YUV color space, the Y value in YCbCr space, and the V value in HSV space also can be the L value in HSL space, perhaps their equivalent expression.
As shown in Figure 2, be the process flow diagram of the equalizing method for truncating histogram of control mean flow rate provided by the invention, it comprises following steps:
Step a), input digital image are if color digital image then needs by color model extraction brightness number wherein; If gray level image is then directly used half-tone information as brightness number;
Step b), statistic histogram H[x], truncating histogram CH[x], block picture number and CN, x ∈ { X j| j=0,1 ..., 255}, X j=j; The corresponding utmost point black of j=0, the j=255 correspondence is white extremely.
Step b1), the storage space of the above statistics of initialization target: H[X j]=0; CH[X j]=0; CN=0;
Step b2), traversing graph picture in order, read in the brightness value Xin of image current pixel;
Step b3), H[Xin]=H[Xin]+1;
Step b4), judge that whether the pairing truncating histogram storage of the brightness value of this pixel number component value is less than predetermined parameters CountMax, if then make CH[Xin]=CH[Xin]+1, if not, then make CN=CN+1;
Step b5), judge whether all pixels statisticses of image to be finished, if then carry out
Step c), if not, then return circulation execution in step b2)~step b5);
Step c), calculate accumulated probability distribution function CDF, be made as CCDF[x based on truncating histogram], x ∈ { X j| j=0,1 ..., 255}, X j=j; Produce 0 corresponding utmost point black, the j=255 correspondence is white extremely.
CCH[j defines arrays], j=0,1 ..., 255, and j is by the brightness value X of the corresponding 256 grades of discretizes of its size order 0, X 1..., X j..., X 255, i.e. j=X j
CCH[X 0]=CH[X 0]+CN/256;
Recycle is calculated: CCH[X j]=CCH[X J-1]+CH[X j]+CN/256, j=1,2 ..., 255;
Last cycle calculations: CCDF[X j]=CCH[X j]/Num, j=0,1 ..., 255; Wherein Num is the sum of all pixels of this image;
Step d), calculating mean flow rate skew BAM_CUT:
BAM _ CUT = 1 Num Σ j = 0 N - 1 H [ X j ] × ( G [ X j ] - X j ) ;
Step e), calculating equalizing coefficient K:K=DBA/|BAM_CUT|, wherein, DBA is predetermined permission luminance shifting maximum magnitude, || expression takes absolute value; If the K after calculating then makes K=1 greater than 1;
Step f), calculating brightness mapping table G[j]: G[X j]=(1-K) * X j+ K * CCDF[X j] * 255; J=0,1 ..., 255;
Step g), mapping input brightness value: the brightness value of establishing input picture is Xin, calculates the brightness value Xout of the original image after strengthening, then Xout=G[Xin];
According to the image property of input, the reduction number word image if input is coloured image, is then gone back original color image, if input is gray level image, then reduces gray level image.
At step b2) in, can traverse all pixels of image by row, column, backward, the row etc. of falling in proper order.
In step e), K limits to equalizing coefficient: and K=min (DBA/|BAH|, Kmax), wherein, Kmax is default maximum histogram equalization coefficient, can prevent bigger K value close when mean value or that produce when equaling BAH like this;
In step e), when image brightness distribution is comparatively concentrated, mean flow rate mobile smaller, when image brightness distribution was discrete, the mobile of mean flow rate can be more greatly; Event is carried out dynamic optimization design: DBA=C * Max (Sigma-C0,0) to the maximum mobile DBA of the mean flow rate of certain frame/field, and wherein, C is default constant, and Sigma is the luminance standard deviation of previous frame/field, and C0 is default constant; As Sigma during smaller or equal to this constant, when promptly the histogram dispersion degree was little, DBA was zero, and K also is zero, and histogram equalization does not strengthen effect, and standard deviation is big more, and the histogram equalization effect is big more; Use dispersion degree can obtain better pictures and handle robustness as control device.
In step e), the maximum mobile DBA of mean flow rate is adopted the mean square deviation dynamic design: DBA=C * Max (MSE-C0,0), wherein, MSE is the brightness mean square deviation.
In step e), to the differential attitude design of maximum mobile DBA employing simple average of mean flow rate: DBA=C * Max (ME-C0,0), wherein, ME is that simple average is poor, and its computation process is as follows: ME = 1 Num Σ j = 0 Num - 1 | B j - BA | , Wherein, Num is a sum of all pixels, B jBe j pixel intensity.
In described step a), color model can be the Y value of YUV color space, the Y value in YCbCr space, and the V value in HSV space also can be the L value in HSL space, perhaps their equivalent expression.
A kind of equalizing method for truncating histogram of controlling mean flow rate, as shown in Figure 3, it comprises following steps:
Step a), input digital image are if color digital image then needs by color model extraction brightness number wherein; If gray level image is then directly used half-tone information as brightness number;
Step b), statistics full figure brightness and S, truncating histogram CH[x], block picture number and CN, residue brightness and SS, wherein, x ∈ { X j] j=0,1 ..., 255}, X j=j; The corresponding utmost point black of j=0, the j=255 correspondence is white extremely.
Step b1), the storage space of the above statistics of initialization target: S=0; SS=0; CH[X j]=0; CN=0;
Step b2), traversing graph picture in order, read in the brightness value Xin of image current pixel;
Step b3), S=S+Xin;
Step b4), judge that whether the pairing truncating histogram storage of the brightness value of this pixel number component value is less than predetermined parameters CountMax, if then make CH[Xin]=CH[Xin]+1, SS=SS+Xin if not, then makes CN=CN+1;
Step b5), judge whether all pixels statisticses of image to be finished, if, execution in step c then), if not, then return circulation execution in step b2)~step b5);
Step c), calculate accumulated probability distribution function CDF, be made as CCDF[x based on truncating histogram], x ∈ { X j| j=0,1 ..., 255}, X j=j; The corresponding utmost point black of j=0, the j=255 correspondence is white extremely;
CCH[x defines arrays], x ∈ { X j| j=0,1 ..., 255}, X j=j; The corresponding utmost point black of j=0, the j=255 correspondence is white extremely;
CCH[X 0]=CH[X 0]+CN/256;
Recycle is calculated: CCH[X j]=CCH[X J-1]+CH[X j]+CN/256, j=1,2 ..., 255;
Last cycle calculations: CCDF[X j]=CCH[X j]/Num, j=0,1 ..., 255; Wherein Num is the sum of all pixels of this image;
Approximate mean flow rate BA_CUT after step d), the calculating equilibrium:
BA_CUT=[SS+(X 0+X N-1)×CN/2]/Num
Step e), computed image mean flow rate BA:BA=S/Num;
Step f), calculating equalizing coefficient K:K=DBA/|BA_CUT-BA|, wherein, DBA is predetermined permission luminance shifting maximum magnitude; || expression takes absolute value; If the K after calculating then makes K=1 greater than 1;
Step g), calculating brightness mapping table G[j]: G[X j]=(1-K) * X j+ K * CCDF[X j] * 255; J=0,1 ..., 255;
Step h), mapping input brightness value: the brightness value of establishing input picture is Xin, calculates the brightness value Xout of the original image after strengthening, then Xout=G[Xin];
According to the image property of input, the reduction number word image if input is coloured image, is then gone back original color image, if input is gray level image, then reduces gray level image.
This method is offset mean flow rate carries out approximate treatment, has saved a statistics with histogram, and the calculating of mean flow rate skew is not needed by CCDF, has increased the concurrency of calculating.
At step b2) in, can traverse all pixels of image by row, column, backward, the row etc. of falling in proper order.
In step f), K limits to equalizing coefficient: and K=min (DBA/|BA_CUT-BA|, Kmax), wherein, Kmax is default maximum histogram equalization coefficient, can prevent bigger K value close when mean value or that produce when equaling BAH like this;
In step f), when image brightness distribution is comparatively concentrated, mean flow rate mobile smaller, when image brightness distribution was discrete, the mobile of mean flow rate can be more greatly; Event is carried out dynamic optimization design: DBA=C * Max (Sigma-C0,0) to the maximum mobile DBA of the mean flow rate of certain frame/field, and wherein, C is default constant, and Sigma is the luminance standard deviation of previous frame/field, and C0 is default constant; As Sigma during smaller or equal to this constant, when promptly the histogram dispersion degree was little, DBA was zero, and K also is zero, and histogram equalization does not strengthen effect, and standard deviation is big more, and the histogram equalization effect is big more; Use dispersion degree can obtain better pictures and handle robustness as control device.
In step f), the maximum mobile DBA of mean flow rate is adopted the mean square deviation dynamic design: DBA=C * Max (MSE-C0,0), wherein, MSE is the brightness mean square deviation.
In step f), to the differential attitude design of maximum mobile DBA employing simple average of mean flow rate: DBA=C * Max (ME-C0,0), wherein, ME is that simple average is poor, and its computation process is as follows: ME = 1 Num Σ j = 0 Num - 1 | B j - BA | , Wherein, Num is a sum of all pixels, B jBe j pixel intensity.
In described step a), color model can be the Y value of YUV color space, the Y value in YCbCr space, and the V value in HSV space also can be the L value in HSL space, perhaps their equivalent expression.
The histogram equalizing method of control mean flow rate provided by the invention is used in combination forecasting techniques between frame/field, and the eigenwert of histogram of present frame/field etc. is applied to the contrast expansion of next frame/field, can save storage space like this.
A kind of histogram equalizing method of controlling mean flow rate provided by the invention can effectively directly be controlled the brightness variation that histogram equalization brings.

Claims (16)

1. a histogram equalizing method of controlling mean flow rate is characterized in that, comprises following steps:
Step a), input digital image are if color digital image then needs by color model extraction brightness number wherein; If gray level image is then directly used half-tone information as brightness number;
Step b), statistics brightness histogram H are made as array H[x], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
Step c), according to histogram, calculate brightness accumulated probability distribution function CDF, be made as CDF[x], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
Step d), the mean flow rate BA of calculating input image;
Step e), calculating are moved the equalizing coefficient K of restriction based on mean flow rate: establish DBA and be predetermined permission luminance shifting maximum magnitude, calculate: K=DBA/|BAH-BA|, if K>1 then makes K=1; Wherein, || expression takes absolute value, and BAH is the mean flow rate behind the histogram equalization;
Step f), calculating brightness mapping table, i.e. brightness values mapping table G[x], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values; Then: G[X j]=(1-K) * X j+ K * CDF[X j] * X N-1
The brightness value of step g), setting input picture is Xin, and the brightness value of the original image after the enhancing is Xout, then Xout=G[Xin];
According to the image property of input, the reduction number word image if input is coloured image, is then gone back original color image, if input is gray level image, then reduces gray level image.
2. the histogram equalizing method of control mean flow rate as claimed in claim 1 is characterized in that, in step e), K limits to equalizing coefficient: (DBA/ (BAH-BA), Kmax), wherein, Kmax is default maximum histogram equalization coefficient to K=min.
3. the histogram equalizing method of control mean flow rate as claimed in claim 2, it is characterized in that, in step e), luminance shifting maximum magnitude DBA to the mean flow rate of certain frame/field carries out dynamic optimization design: DBA=C * Max (Sigma-C0,0), wherein, C is default constant, Sigma is the luminance standard deviation of previous frame/field, and C0 is default constant; When Sigma≤C0, DBA is zero, and K is zero.
4. the histogram equalizing method of control mean flow rate as claimed in claim 3 is characterized in that, in step e), luminance shifting maximum magnitude DBA to mean flow rate adopts the mean square deviation dynamic design: DBA=C * Max (MSE-C0,0), wherein, MSE is the brightness mean square deviation.
5. the histogram equalizing method of control mean flow rate as claimed in claim 4, it is characterized in that, in step e), luminance shifting maximum magnitude DBA to mean flow rate adopts the differential attitude design of simple average: DBA=C * Max (ME-C0,0), wherein, ME is that simple average is poor, and its computation process is as follows: ME = 1 Num Σ j = 0 Num - 1 | B j - BA | , Wherein, Num is a sum of all pixels, B jBe j pixel intensity.
6. the histogram equalizing method of control mean flow rate as claimed in claim 5 is characterized in that, in step e), the mean flow rate BAH behind the described histogram equalization is the intermediate value of brightness values, i.e. BAH=(X 0+ X N-1)/2.
7. the histogram equalizing method of control mean flow rate as claimed in claim 1 is characterized in that, in described step a), color model is the Y value of YUV color space, or the Y value in YCbCr space, or the V value in HSV space, or the L value in HSL space, or their equivalent expression.
8. the histogram equalizing method of control mean flow rate as claimed in claim 1 is characterized in that, is used in combination forecasting techniques between frame/field, and the histogrammic eigenwert of present frame/field is applied to the contrast expansion of next frame/field, saves storage space.
9. an equalizing method for truncating histogram of controlling mean flow rate is characterized in that, comprises following steps:
Step a), input digital image are if color digital image then needs by color model extraction brightness number wherein; If gray level image is then directly used half-tone information as brightness number;
Step b), statistics full figure brightness and S, truncating histogram CH[x], block picture number and CN, residue brightness and SS, wherein, x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
Step b1), the storage space of the above statistics of initialization target: S=0; SS=0; CH[x]=0; CN=0, x ∈ { X j| j=0,1 ..., N-1};
Step b2), traversing graph picture in order, read in the brightness value Xin of image current pixel;
Step b3), S=S+Xin;
Step b4), judge that whether the pairing truncating histogram storage of the brightness value of this pixel number component value is less than predetermined parameters CountMax, if then make CH[Xin]=CH[Xin]+1, SS=SS+Xin if not, then makes CN=CN+1;
Step b5), judge whether all pixels statisticses of image to be finished, if, execution in step c then), if not, then return circulation execution in step b2)~step b5);
Step c), calculate accumulated probability distribution function CDF, be made as CCDF[x based on truncating histogram], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
CCH[x defines arrays], x ∈ { X j| j=0,1 ..., N-1}, wherein X 0, X 1..., X j..., X N-1Order is the brightness of image value of N level discretize, and X 0The minimal value of correspondence image brightness values, X N-1The maximum value of correspondence image brightness values;
CCH[X 0]=CH[X 0]+CN/N;
Recycle is calculated: CCH[X j]=CCH[X J-1]+CH[X j]+CN/N, j=1,2 ..., N-1;
Last cycle calculations: CCDF[X j]=CCH[X j]/Num, j=0,1 ..., N-1; Wherein Num is the sum of all pixels of this image;
Approximate mean flow rate BA_CUT after step d), the calculating equilibrium:
BA_CUT=[SS+(X 0+X N-1)×CN/2]/Num;
Step e), computed image mean flow rate BA:BA=S/Num;
Step f), calculating equalizing coefficient K:K=DBA/|BA_CUT-BA|, wherein, DBA is predetermined permission luminance shifting maximum magnitude; || expression takes absolute value; If the K that calculates greater than 1, then makes K=1;
Step g), calculating brightness mapping table G[x]: G[X j]=(1-K) * X j+ K * CCDF[X j] * X N-1J=0,1 ..., N-1;
Step h), mapping input brightness value: the brightness value of establishing input picture is Xin, calculates the brightness value Xout of the original image after strengthening, then Xout=G[Xin];
According to the image property of input, the reduction number word image if input is coloured image, is then gone back original color image, if input is gray level image, then reduces gray level image.
10. the equalizing method for truncating histogram of control mean flow rate as claimed in claim 9 is characterized in that, at step b2) in, traverse all pixels of image in proper order by row, column, backward, the row that fall.
11. the equalizing method for truncating histogram of control mean flow rate as claimed in claim 9 is characterized in that, in step f), K limits to equalizing coefficient: K=min (DBA/|BA_CUT-BA|, Kmax), wherein, Kmax is default maximum histogram equalization coefficient.
12. the equalizing method for truncating histogram of control mean flow rate as claimed in claim 11, it is characterized in that, in step f), luminance shifting maximum magnitude DBA to the mean flow rate of certain frame/field carries out dynamic optimization design: DBA=C * Max (Sigma-C0,0), wherein, C is default constant, Sigma is the luminance standard deviation of previous frame/field, and C0 is default constant; When Sigma≤C0, DBA is zero, and K is zero.
13. the equalizing method for truncating histogram of control mean flow rate as claimed in claim 12 is characterized in that, in step f), luminance shifting maximum magnitude DBA to mean flow rate adopts the mean square deviation dynamic design: DBA=C * Max (MSE-C0,0), wherein, MSE is the brightness mean square deviation.
14. the equalizing method for truncating histogram of control mean flow rate as claimed in claim 13, it is characterized in that, in step f), luminance shifting maximum magnitude DBA to mean flow rate adopts the differential attitude design of simple average: DBA=C * Max (ME-C0,0), wherein, ME is that simple average is poor, and its computation process is as follows: ME = 1 Num Σ j = 0 Num - 1 | B j - BA | , Wherein, Num is a sum of all pixels, B jBe j pixel intensity.
15. the equalizing method for truncating histogram of control mean flow rate as claimed in claim 9 is characterized in that, in described step a), color model is the Y value of YUV color space, the Y value in YCbCr space, the V value in HSV space, the L value in HSL space, perhaps their equivalent expression.
16. the equalizing method for truncating histogram of control mean flow rate as claimed in claim 9 is characterized in that, is used in combination forecasting techniques between frame/field, and the histogrammic eigenwert of present frame/field is applied to the contrast expansion of next frame/field, saves storage space.
CNB2005100289968A 2005-08-22 2005-08-22 Histogram equalizing method for controlling average brightness Expired - Fee Related CN100345160C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100289968A CN100345160C (en) 2005-08-22 2005-08-22 Histogram equalizing method for controlling average brightness

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100289968A CN100345160C (en) 2005-08-22 2005-08-22 Histogram equalizing method for controlling average brightness

Publications (2)

Publication Number Publication Date
CN1750043A CN1750043A (en) 2006-03-22
CN100345160C true CN100345160C (en) 2007-10-24

Family

ID=36605475

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100289968A Expired - Fee Related CN100345160C (en) 2005-08-22 2005-08-22 Histogram equalizing method for controlling average brightness

Country Status (1)

Country Link
CN (1) CN100345160C (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100502465C (en) * 2006-10-19 2009-06-17 四川长虹电器股份有限公司 Method for equalizing treatment of image greyscale histogram
CN101340510B (en) * 2008-08-07 2010-06-23 中兴通讯股份有限公司 Method for video enhancement and apparatus thereof
CN102930517A (en) * 2012-11-30 2013-02-13 江苏技术师范学院 histogram equalization image enhancement method
CN103051812B (en) * 2013-01-14 2015-02-25 成都西可科技有限公司 Method for realizing energy saving through automatically adjusting backlight brightness of mobile phone screen
KR102062921B1 (en) * 2013-05-14 2020-01-06 현대모비스 주식회사 Method for brightness equalization of various image
WO2015172340A1 (en) * 2014-05-14 2015-11-19 深圳市大疆创新科技有限公司 Method and system for adjusting dynamic contrast of digital image or video
CN105389572A (en) * 2015-12-10 2016-03-09 威海北洋电气集团股份有限公司 All-in-one machine for human face and identity card recognition and light supplementing method capable of automatically adjusting brightness
CN106028014B (en) * 2016-05-27 2017-12-08 京东方科技集团股份有限公司 A kind of method and apparatus for correcting video flashes
CN108122216B (en) * 2016-11-29 2019-12-10 京东方科技集团股份有限公司 system and method for dynamic range extension of digital images
CN106897963A (en) * 2017-01-04 2017-06-27 奇酷互联网络科技(深圳)有限公司 Adjust method, device and the terminal device of brightness of image
CN106791283B (en) * 2017-01-25 2019-11-19 京东方科技集团股份有限公司 A kind of method, apparatus and video equipment correcting video flashes
CN107680056B (en) * 2017-09-27 2020-03-10 深圳市华星光电半导体显示技术有限公司 Image processing method and device
CN108230257A (en) * 2017-11-15 2018-06-29 北京市商汤科技开发有限公司 Image processing method, device, electronic equipment and storage medium
CN110996174B (en) * 2019-12-19 2022-04-05 深圳市迅雷网络技术有限公司 Video image quality enhancement method and related equipment thereof

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4868651A (en) * 1988-05-17 1989-09-19 S&S Inficon, Inc. Digital radiography with image brightness and contrast normalization
CN1168049A (en) * 1996-03-09 1997-12-17 三星电子株式会社 Image enhancing method using mean-separate histogram equalization and circuit therefor
JPH10126647A (en) * 1996-08-19 1998-05-15 Samsung Electron Co Ltd Image quality improving method and its circuit using quantized mean-matching histogram equalization
JP2003333378A (en) * 2002-05-08 2003-11-21 Olympus Optical Co Ltd Imaging apparatus, method for displaying luminance distribution diagram, and control program
US20040008903A1 (en) * 2002-07-15 2004-01-15 Samsung Electronics Co., Ltd. Image quality enhancement circuit and method using inter-frame correlativity
EP1492052A2 (en) * 2003-06-27 2004-12-29 STMicroelectronics Asia Pacific Pte Ltd Method and system for contrast enhancement of digital video

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4868651A (en) * 1988-05-17 1989-09-19 S&S Inficon, Inc. Digital radiography with image brightness and contrast normalization
CN1168049A (en) * 1996-03-09 1997-12-17 三星电子株式会社 Image enhancing method using mean-separate histogram equalization and circuit therefor
JPH10126647A (en) * 1996-08-19 1998-05-15 Samsung Electron Co Ltd Image quality improving method and its circuit using quantized mean-matching histogram equalization
JP2003333378A (en) * 2002-05-08 2003-11-21 Olympus Optical Co Ltd Imaging apparatus, method for displaying luminance distribution diagram, and control program
US20040008903A1 (en) * 2002-07-15 2004-01-15 Samsung Electronics Co., Ltd. Image quality enhancement circuit and method using inter-frame correlativity
CN1472954A (en) * 2002-07-15 2004-02-04 ���ǵ�����ʽ���� Circuit and method for improving image quality by fram correlation
EP1492052A2 (en) * 2003-06-27 2004-12-29 STMicroelectronics Asia Pacific Pte Ltd Method and system for contrast enhancement of digital video

Also Published As

Publication number Publication date
CN1750043A (en) 2006-03-22

Similar Documents

Publication Publication Date Title
CN100345160C (en) Histogram equalizing method for controlling average brightness
CN1245033C (en) Equipment and method for regulating colour image colour saturation
CN1149828C (en) Image quality enhancement circuit and method therefor
CN1645914A (en) Image processing method, image processing apparatus, and computer program used therewith
CN1217526C (en) Image processing device, image processing method, image processing program and its recording medium
CN1625763A (en) Display apparatus
CN1305009C (en) Image processing device and image processing method and processing program
CN101032159A (en) Image processing device, method, and image processing program
CN1909671A (en) Method and apparatus for generating user preference data
CN1591172A (en) Image processing method and apparatus
CN1642220A (en) Image processing device, image display device, image processing method, and image processing program
CN1714372A (en) Image signal processing
CN1945627A (en) Method for correcting digital tongue picture colour cast
CN1925562A (en) Apparatus, method for taking an image and apparatus, method for processing an image and program thereof
CN1677442A (en) Luminance correction
CN101079954A (en) Method and device for realizing white balance correction
CN1816149A (en) Filtering-wave method of removing blocking-effect in video-frequency picture and loop filter
CN1554074A (en) Method and system for modifying a digital image taking into account its noise
CN1314266C (en) Image pickup apparatus
CN101061704A (en) Color adjusting device and method
CN101059951A (en) Image processing apparatus and method
CN1335579A (en) Image processing method, apparatus and recording medium for recording & executing the same method program
CN1812481A (en) Image processing apparatus and its method
CN1857008A (en) Image processing method
CN1941843A (en) Image processing apparatus and an image processing program

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
C17 Cessation of patent right
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20071024

Termination date: 20100822