Summary of the invention
The purpose of this invention is to provide a kind ofly, use this method can obtain the best quality image on the objective sense apace for having source images that decline type gray scale spectrum distributes method in bottom layer image mining based on the excavating optimum image of information entropy and logarithm contrast weighted sum.
The objective of the invention is to realize that through such technical scheme this method may further comprise the steps:
(1) gray scale of detection resources image spectrum distributes, and confirms to have decline type gray scale spectrum and distributes, then the gray scale of calculation sources image spectrum continuous bandwidth BW;
(2) set up image quality evaluation function IQAF, its computing formula is:
InEn is an image information entropy,
Be the average contrast, the computing formula of image information entropy InEn is:
P in the formula (i) is the pixel count of image on i gray level, when p (i)=0, makes Log
2P (i)=0; The average contrast
Computing formula be:
M, N be image at x, the pixel count of y direction, (x is that ((x+1 y) is pixel (x+l, gray-scale value y) to G to pixel for x, gray-scale value y) y) to G;
(3) carry out bottom layer image mining; And with excavating the value of the corresponding information entropy InEn of image with average logarithm contrast
calculating evaluation function IQAF, the bottom layer image mining formula is:
Constraint condition:
TG (x, y), OG (x, y) expression is excavated image and source images at pixel (x respectively; Y) gray-scale value, Theta [0,255] and Delta [1; 255] for excavating parameter, starting point and the gray-level that excavates image are excavated in expression respectively, and K is the space telescopic factor; For bottom layer image mining, get k=255, Theta=0;
Make Theta=0; Delta increases 1 from 1 to gray scale spectrum continuous bandwidth BW at every turn changes; Source images is carried out bottom layer image mining; Use the value of information entropy InEn with average logarithm contrast
the computed image quality assessment function IQAF of the pairing excavation image of each Delta value, up to the maximal value that obtains IQAF;
(4) image of excavating according to the said bottom layer image mining formula of step (3) with the pairing excavation parameter of image quality evaluation function IQAF maximal value Delta, Theta is image the best in quality.
The detection method (this method is documented in the patent of invention that the patent No. is ZL200610054324.9) that is used for the gradation of image spectrum that the present invention is used has strong bottom layer image information excavating function; Visual precision with a pixel; General grey level histogram and logarithm grey level histogram can not be compared; The image of under low-light (level) very, taking; Compose all information that shown this image through the gray scale behind the gradually flattening, the scope that the clear image information of the width table of its spectrum exists, we are referred to as the gray scale spectrum continuous bandwidth of image and represent with BW.Used formula is:
In the formula, O (g), T (g) represent original image and the pixel count of target image on g gray level respectively; G=0,1,2 ... N-1, N=255, expression gray scale or gamut of chromaticities; M is a positive integer, is called the planarization level;
The present invention is applicable to that source images has the bottom layer image mining that decline type gray scale spectrum distributes; The image that decline type gray scale spectrum distributes is meant that image information comes into existence and maximum in 0 grayscale image information from 0 gray level, promptly is the situation that decline type gray scale spectrum distributes from 0 gray level.According to practical experience, the original image of under the very low condition of illuminance, taking has this gray scale spectrum to distribute more, and therefore when excavation has the best quality image of the original image that decline type gray scale spectrum distributes, excavating that starting point Theta fixedly installs is 0.
Find according to experimental result repeatedly, the image that Delta is each time excavated after changing, from the value of the excavation image information entropy InEn that calculates, along with the increase of Delta, image information entropy InEn is dull ascendant trend with the increase of Del ta.
According to experimental result discovery repeatedly; To the image of excavating after the Delta variation each time; From the image averaging logarithm contrast of excavating
value that calculates; Along with the increase of Delta, the average logarithm contrast of image
increases variation with Delta and is dull downtrending.
Find according to experimental result repeatedly: the image that Delta is each time excavated after changing; From the image quality evaluation function IQAF value of calculating; Increase along with Delta; The weighted sum of image information entropy InEn that excavates and average logarithm contrast
has maximal value with the increase variation of Delta, does not promptly have ginseng image quality evaluation function
maximal value is arranged; We are excavating image with the variation of Delta on one side in the experiment repeatedly; Calculate on one side when excavating image quality in images evaluation function IQAF value and find: change with Delta excavate image quality from poor to good; And then to the degradation of image; Consistent with image quality evaluation function IQAF value with the trend of the variation of Delta; And when the image quality evaluation function was got maximal value, it was the best in quality to utilize the picture quality that the described bottom layer image mining formula of above-mentioned steps (3) excavates and the image comparison that all are excavated with its pairing excavation parameter Delta and Theta.
The invention has the beneficial effects as follows: this method can promptly obtain the best quality image on the objective sense in the bottom layer image mining process of the source images with the distribution of decline type spectrum, the image of under the very low shooting condition of illumination, taking can obtain the optimized image of objective natural scene clearly through this method; This method is embedded existing camera arrangement can realize the shooting of general camera night scene, and obtain best night scene quality image, embed existing supervisory system and can realize round-the-clock monitoring, embed existing lll night vision system raising existing system function.
Embodiment
Below in conjunction with accompanying drawing and embodiment the present invention is described further:
The process flow diagram of the inventive method is as shown in Figure 1, and concrete steps are following:
(1) gray scale of detection resources image spectrum distributes, and confirms to have decline type gray scale spectrum and distributes, then the gray scale of calculation sources image spectrum continuous bandwidth BW; The gray scale spectrum that shown in Fig. 3 (a), can obviously find out present embodiment is the distribution of decline type spectrum; Gray scale spectrum continuous bandwidth BW=19.
The detection method (this method is documented in the patent of invention that the patent No. is ZL200610054324.9) that is used for the gradation of image spectrum used in the step of the present invention (1) has strong bottom layer image information excavating function; Visual precision with a pixel; General grey level histogram and logarithm grey level histogram can not be compared; The image of under low-light (level) very, taking; Compose all information that shown this image through the gray scale behind the gradually flattening, the scope that the clear image information of the width table of its spectrum exists, we are referred to as the gray scale spectrum continuous bandwidth of image and represent with BW.Used formula is:
In the formula, O (g), T (g) represent original image and the pixel count of target image on g gray level respectively; G=0,1,2 ... N-1, N=255, expression gray scale or gamut of chromaticities; M is a positive integer, is called the planarization level;
(2) set up image quality evaluation function IQAF, its computing formula is:
InEn is an image information entropy;
is the average contrast, and the computing formula of image information entropy InEn is:
P in the formula (i) is the pixel count of image on i gray level, when p (i)=0, and order
Log
2p(i)=0;
Average contrast's
computing formula is:
M, N be image at x, the pixel count of y direction, (x is that ((x+1 y) is pixel (x+1, gray-scale value y) to G to pixel for x, gray-scale value y) y) to G;
(3) carry out bottom layer image mining; And with excavating the value of the corresponding information entropy InEn of image with average logarithm contrast
calculating evaluation function IQAF, the bottom layer image mining formula is:
Constraint condition:
TG (x, y), OG (x, y) expression is excavated image and source images at pixel (x respectively; Y) gray-scale value, Theta [0,255] and Delta [1; 255] for excavating parameter, starting point and the gray-level that excavates image are excavated in expression respectively, and K is the space telescopic factor; For bottom layer image mining, get k=255, Theta=0;
The present invention is applicable to that source images has the bottom layer image mining that decline type gray scale spectrum distributes; The image that decline type gray scale spectrum distributes is meant that image information comes into existence and maximum in 0 grayscale image information from 0 gray level, promptly is the situation that decline type gray scale spectrum distributes from 0 gray level.According to practical experience, the original image of under the very low condition of illuminance, taking has this gray scale spectrum to distribute more, and therefore when excavation had the best quality image of the original image that decline type gray scale spectrum distributes, it was 0 that the initial value of Theta fixedly installs.
Make Theta=0; Delta increases 1 from 1 to gray scale spectrum continuous bandwidth BW at every turn changes; Source images is carried out bottom layer image mining; Use the value of information entropy InEn with average logarithm contrast
the computed image quality assessment function IQAF of the pairing excavation image of each Delta value, up to the maximal value that obtains IQAF;
According to experimental result discovery repeatedly; To the image of excavating after the Delta variation each time; Value from the excavation image information entropy InEn that calculates; Along with the increase of Delta, image information entropy InEn is dull ascendant trend with the increase of Delta, and I as shown in Figure 2 is that information entropy InEn is with the Delta change curve.
According to experimental result discovery repeatedly; To the image of excavating after the Delta variation each time; From the image averaging logarithm contrast of excavating
value that calculates; Increase along with Delta; The average logarithm contrast of image
increases variation with Delta and is dull downtrending, and II as shown in Figure 2 is that average logarithm contrast
is with the Delta change curve.
Find according to experimental result repeatedly: the image that Delta is each time excavated after changing; From the image quality evaluation function IQAF value of calculating; Increase along with the gradation of image level Delta that excavates; The weighted sum of image information entropy InEn that excavates and average logarithm contrast
has maximal value with the increase variation of Delta; Promptly not having ginseng image quality evaluation function
, maximal value, III as shown in Figure 2 are arranged is that image quality evaluation function IQAF value is with the Delta change curve;
(4) image of excavating according to the said bottom layer image mining formula of step (3) with the pairing excavation parameter of image quality evaluation function IQAF maximal value Delta, Theta is image the best in quality.
We excavate image with the variation of Delta on one side in experiment; Calculate on one side when excavating image quality in images evaluation function IQAF value and find: increase according to Delta change each width of cloth image of excavating quality from poor to good; And then to the degradation of image; Consistent with image quality evaluation function IQAF value with the trend that Delta changes; And when the image quality evaluation function is got maximal value, utilize image that the described excavation formula of above-mentioned steps (3) excavates and its visual effect the best of image comparison that all are excavated with its pairing excavation parameter Delta and Theta.
Utilize the inventive method that the source images of present embodiment shown in Fig. 3 (a) carried out best quality image that bottom layer image mining obtained shown in Fig. 3 (b).
Following table is when excavating the present embodiment best quality image, and image information entropy InEn, average logarithm contrast
image quality evaluation function IQAF are with the situation of change of excavating parameter Delta.
Can find out from the experimental data of last table; Work as Theta=0; During Delta=3; The image quality evaluation function of present embodiment is to there being maximal value, and the (a) and (b) in the comparison diagram 3, (c) can find out: the picture quality of utilizing the corresponding excavation parameter Delta of this maximal value to excavate is best shown in Fig. 3 (b).
For the inventive method clearly is described; Last tabular has gone out present embodiment Delta when l to 9 changes; The situation of change of image quality evaluation function, information entropy, average logarithm contrast; As long as but calculating Delta in practice when getting a certain value, the value of image quality evaluation function begins to diminish, and promptly stops to the excavation of image with to the calculating of image quality evaluation functional value; And utilizing corresponding excavation parameter Delta of image quality evaluation function maximal value and Theta to excavate image, the image that is obtained is image the best in quality.For example work as in the present embodiment and calculate Delta=4; During IQAF=2.1656, the value of finding image quality evaluation function IQAF is less than working as Delta=3, during the value of IQAF=2.2411; Promptly stop the excavation of image and the calculating of image quality evaluation functional value; And the image when utilizing the described excavation formula of this method to excavate Delta=3, Theta=0, the image of being excavated is picture quality the best, shown in Fig. 3 (b).
The image information entropy InEn that can find out present embodiment from the experimental data of last table is varied to dull ascendant trend with the increase of Delta; The average logarithm contrast

of excavation image is dull downtrending with the increase variation of Delta, and image quality evaluation function IQAF has maximal value with the increase variation of Delta.In the present embodiment, when Delta=3, image quality evaluation function IQAF=2.2411 is a maximal value, utilizes the corresponding excavation parameter Theta=0 of this maximal value, and the image that Delta=3 excavates is shown in Fig. 3 (b).Corresponding excavation parameter Delta=1 for example when relatively the source images of present embodiment is got non-maximal value with image quality evaluation function IQAF shown in Fig. 3 (a); The image of excavating during Theta=0 can be found out shown in Fig. 3 (c): it is the best in quality that image quality evaluation function IQAF gets image such as Fig. 3 (b) that the maximal value correspondence excavates.
Camera of embedding the inventive method and video camera can be implemented in shoots picture rich in detail night.
The digital telescope that embeds the inventive method can be realized night-time observation.