CN107424132B - Optimization method for rapid image defogging - Google Patents

Optimization method for rapid image defogging Download PDF

Info

Publication number
CN107424132B
CN107424132B CN201710610832.9A CN201710610832A CN107424132B CN 107424132 B CN107424132 B CN 107424132B CN 201710610832 A CN201710610832 A CN 201710610832A CN 107424132 B CN107424132 B CN 107424132B
Authority
CN
China
Prior art keywords
image
rgb image
source
gray
channel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710610832.9A
Other languages
Chinese (zh)
Other versions
CN107424132A (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.)
Xidian University
Original Assignee
Xidian University
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 Xidian University filed Critical Xidian University
Priority to CN201710610832.9A priority Critical patent/CN107424132B/en
Publication of CN107424132A publication Critical patent/CN107424132A/en
Application granted granted Critical
Publication of CN107424132B publication Critical patent/CN107424132B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques

Landscapes

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

Abstract

The invention discloses an optimization method for rapid image defoggingThe method mainly comprises the following steps: acquiring an original RGB image, carrying out dark channel defogging on the original RGB image to obtain a RGB image subjected to dark channel defogging, and respectively obtaining the gray level image average brightness of the RGB image subjected to dark channel defogging; the RGB image comprises three color channels, each pixel point in the RGB image comprises three color channels, R represents a red channel, G represents a green channel, and B represents a blue channel; obtaining an RGB image with balanced contrast and defogging and the average brightness of the gray level image of the RGB image with balanced contrast and defogging of a dark channel according to the original RGB image, and then calculating the gray level image of the original RGB image and an original RGB image IsourceThe average brightness of the gray level image is calculated to obtain the brightness unevenness measurement of the original RGB image; and finally, calculating to obtain a synthesized defogged image.

Description

Optimization method for rapid image defogging
Technical Field
The invention relates to the technical field of image defogging, in particular to an optimization method for rapid image defogging, which is suitable for rapidly defogging images or videos shot in haze weather.
Background
The dark channel prior defogging algorithm is a new direction for the rapid development of the image defogging field in the last two years, can well perform defogging operation on a foggy image, and is widely applied to the image defogging field; however, the original dark channel defogging algorithm has a large calculation cost during operations such as dark channel calculation, atmospheric optical parameter calculation, dark channel transmittance refinement and the like, and although some subsequent methods such as guided filtering and the like optimize the performance, the calculation amount is still huge, the model is complex, the parallelism degree is low, and the method is not suitable for running on a low-power-consumption embedded system; compared with a conventional algorithm such as a contrast-limited adaptive image equalization algorithm, the contrast-limited adaptive image equalization algorithm is a contrast enhancement algorithm applied to an image block, and has a certain effect of defogging, but due to the fact that the contrast-limited adaptive image equalization algorithm is a histogram equalization algorithm, supersaturation is easily caused, and the effect is not good enough for scenes with severe light and shade conversion.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide an image rapid defogging optimization method which is an image defogging method based on a dark channel and contrast histogram equalization limitation and can effectively solve the problems of large calculation amount, complex model, non-robust complex environment and unsuitability for running on low-power consumption equipment in the conventional image defogging algorithm.
In order to achieve the technical purpose, the invention is realized by adopting the following technical scheme.
An optimization method for rapid defogging of an image comprises the following steps:
step 1, obtaining an original RGB image IsourceFor the original RGB image IsourceCarrying out dark channel defogging to obtain an RGB image I after dark channel defoggingHazeFreeAnd obtaining an RGB image I after dark channel defoggingHazeFreeAverage brightness L of gray scale imagehazefreemean
The RGB image comprises three color channels, each pixel point in the RGB image comprises three color channels, R represents a red channel, G represents a green channel, and B represents a blue channel;
step 2, according to the original RGB image IsourceObtaining an RGB image I after defogging of the contrast-balanced dark channelHazeFree' and obtaining an RGB image I with the defogged contrast-equalized dark channelsHazeFree' average luminance L of gray-scale imagehazefreemean';
Step 3, respectively calculating the original RGB image IsourceGray scale image and original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanFurther calculating to obtain the original RGB image IsourceThe luminance unevenness measure std;
step 4, according to the RGB image I after the dark channel defoggingHazeFreeRGB image I after defogging of contrast-balanced dark channelHazeFree', RGB image I after dark channel defoggingHazeFreeAverage brightness L of gray scale imagehazefreemeanRGB image I after defogging of contrast-balanced dark channelHazeFree' average luminance L of gray-scale imagehazefreemean', original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanAnd an original RGB image IsourceThe brightness unevenness metric std, and finally calculating to obtain a synthetic defogged image IHazeFree”。
The invention has the beneficial effects that: compared with the existing algorithm, the method has low computational complexity, can meet the requirement of real-time processing of an embedded system, and can be out of work when the existing algorithm is used under severe conditions, such as overexposure, underexposure and uneven image brightness, but the method can still keep good effect.
Drawings
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
FIG. 1 is a flow chart of an optimization method for fast image defogging according to the present invention;
FIG. 2 is a flow chart of the dark channel defogging method of the present invention;
FIG. 3 is a flow chart of obtaining a RGB image after contrast equalization defogging according to the present invention;
FIG. 4 is a table value diagram of a mapping lookup table of pixels (χ, γ) at the position where the rows are χ and the columns are γ in α th and β th rows of image blocks (α) after bilinear interpolation;
FIG. 5 shows an original RGB image I obtained by the method of the inventionsourceA flow chart of a luminance non-uniformity metric of (1);
FIG. 6 is a defogged image I synthesized using the present inventionHazeFree"is used in the following description.
Detailed Description
Referring to fig. 1, it is a flow chart of an optimization method for fast defogging of an image according to the present invention; the optimization method for the rapid defogging of the image comprises the following steps:
step 1, obtaining an original RGB image IsourceFor the original RGB image IsourceCarrying out dark channel defogging to obtain an RGB image I after dark channel defoggingHazeFreeAnd obtaining an RGB image I after dark channel defoggingHazeFreeAverage brightness L of gray scale imagehazefreemean
Specifically, as shown in fig. 2, an RGB image is obtained, where RGB represents three color channels, and each pixel in the RGB image includes three color channels, where R represents a red channel, G represents a green channel, and B represents a blue channel; selecting three color channels of each pixel point in RGB image8-bit binary data of a track, denoted as original RGB image IsourceFor the original RGB image IsourceDark channel processing, i.e. selecting original RGB image I respectivelysourceThe channel brightness value with the minimum brightness in the three color channels of each pixel point is obtained; further obtaining a dark channel image IdarkAnd respectively calculating dark channel image IdarkAverage brightness value L of all the pixels in the middledarkmeanAnd dark channel image IdarkMaximum luminance L ofdarkmaxThe dark channel image IdarkAverage brightness value L of all the pixels in the middledarkmeanFor dark channel image IdarkDividing the sum of the brightness of all the pixel points by the total number of the pixel points, and obtaining a dark channel image IdarkMaximum luminance L ofdarkmaxFor dark channel image IdarkThe brightness of the pixel point with the maximum brightness in all the pixel points.
Then, the dark channel image I is compared point by pointdarkAnd dark channel image IdarkAverage brightness value L of all the pixels in the middledarkmeanCalculating to obtain a transmission image Ltrans,Ltrans=Min(Idark,Min(0.9,1.3×Ldarkmean÷255)×Idarkaverage) Min represents a function for comparing point by point to take a minimum value; i isdarkaverageRepresenting dark channel images IdarkThe average value of the brightness of the transversely adjacent 8 pixel points is obtained by the following steps:
dark channel image IdarkIs an N × M-dimensional matrix, i.e. N rows and M columns, N, M are positive integers respectively larger than 0, and any dark channel image IdarkBrightness i of pixel point in middle x row and y columnx,yFor dark channel image IdarkThe average value of the brightness of 8 transversely adjacent pixels (x, y) of the middle x-th row and the y-th column can be regarded as imeanx,yRepresenting dark channel images IdarkThe expression of the average value of the brightness of the transversely adjacent 8 pixel points is as follows:
Figure BDA0001359477250000031
wherein the subscripts y-3, y-2, or y-1, if any, are less than or equal to 0Subscripts y-3, y-2, or y-1 are set to 1, subscripts y +3, y +2, or y +1 are set to M if more than M, and x ∈ {1,2, …, N }, y ∈ {1,2, …, M }.
Min(Idark,Min(0.9,1.3×Ldarkmean÷255)×Idarkaverage) To regularize the smoothed image after the limiting process, Min (0.9,1.3 × L)darkmean÷255)×IdarkaverageAnd dark channel image IdarkTo obtain a sum of original RGB image IsourceThe transfer function measurement images with the same size are marked as transfer images Ltrans
Through LA=120+0.5×LmaxCalculating an atmospheric optical parameter estimation value LA
By passing
Figure BDA0001359477250000041
For the original RGB image IsourceCarrying out dark channel defogging to obtain an RGB image I after dark channel defoggingHazeFreeHere, the original RGB image I may be used if there is a demand for the calculation speedsourceAnd transmit the image LtransAs an RGB image after dark channel defogging; and rough stretching is carried out for compensation according to the brightness before fusion, so that the defogging quality of a dark channel is not seriously influenced.
Then calculating the RGB image I after the defogging of the dark channelHazeFreeThe average brightness of the gray level image is calculated by firstly calculating the RGB image I after the defogging of the dark channelHazeFreeThe process of obtaining the gray scale image is as follows:
dark channel defogged RGB image IHazeFreeContains N × M pixel points, and the three color channel values of the nth pixel point are recorded as (R)n,Gn,Bn),RnRed channel value, G, representing the nth pixelnGreen channel value, B, representing the nth pixelnExpressing the blue channel value of the nth pixel point, and calculating the Gray value Gray of the nth pixel pointn,
Grayn=(Rn×299+Gn×587+Bn× 114+ 500)/(1000, making n take 1 toN × N, obtaining the Gray value Gray of the 1 st pixel point respectively1Gray value Gray of pixel points from N × MN×MMarked as RGB image I after dark channel defoggingHazeFreeThe gray scale image of (1).
Further obtaining the RGB image I after the defogging of the dark channel by averagingHazeFreeAverage brightness L of gray scale imagehazefreemean(ii) a The RGB image I after the dark channel defoggingHazeFreeAverage brightness L of gray scale imagehazefreemeanRGB image I after defogging dark channelHazeFreeThe average value of the brightness of all the pixel points in the gray level image.
Step 2, according to the original RGB image IsourceObtaining an RGB image I after defogging of the contrast-balanced dark channelHazeFree' and obtaining an RGB image I with the defogged contrast-equalized dark channelsHazeFree' average luminance L of gray-scale imagehazefreemean'。
Specifically, the RGB image after contrast equalization defogging is calculated as shown in fig. 3; firstly, input original RGB image IsourceBlocking to obtain Ncrop×NcropImage block, NcropIs a positive integer greater than 0, N in this embodimentcrop=10;Ncrop×NcropThe length and the width of each image block in each image block are respectively the same, if the length and the width of each image block are different, the image blocks are cut out through conventional operation after mirror image expansion and defogging processing are carried out on the edges of the corresponding image blocks; each image block is W in lengthpatchEach image block is H in widthpatch(ii) a And the number of the pixel points in each image block is respectively the same and is marked as numpixInTile which is a positive integer greater than 0.
Setting a reduction coefficient as ClipLimit, wherein the ClipLimit is 0.001, and the reduction coefficient is used for controlling the defogging level; using the reduction coefficient as a contrast limiting parameter, wherein each pixel point in each image block is numpixInTile, and then calculating to obtain an original RGB image IsourceThe reduction amount of numClipLimit (b) of (a),
Figure BDA0001359477250000051
numBins represents the original RGB image IsourceAnd numBins is a positive integer greater than 0; original RGB image I in this embodimentsourceBinary data, which takes values from 0 to 255, so that numBins takes values of 256 here; round represents the rounding function.
(1) Initialization let t ' denote the t ' th image block, t ' ∈ {1,2, …, Ncrop×Ncrop},Ncrop×NcropRepresenting the original RGB image IsourceThe total number of image blocks contained after the partitioning; and the t' th image block corresponds to the original RGB image IsourceThe image blocks (a, b) in the row a and the column b,
Figure BDA0001359477250000052
t' has an initial value of 1, and (a, b) has an initial value of (1, 1).
(2) Calculating to obtain histogram vectors of three color channels of the RGB image of the t ' th image block, and averaging the histogram vectors of the three color channels of the RGB image of the t ' th image block to obtain an average histogram vector imgHist of the three color channels of the RGB image of the t ' th image blockt'Then, the limited contrast overflow value totalexpass of the t' th image block is calculatedt'
totalExcesst'=sum(max(imgHistt'Numlimit, 0)), max is the max-max operation, round is the rounding function, and sum is the sum function.
(3) Calculating to obtain the overflow average quantity avgBinIncr of the t' th image blockt'
avgBinIncrt'=round(totalExcesst'/numBins)
Then, the histogram average vector imgHist of three color channels of the RGB image of the t' th image block is usedt'The number numpixel of all pixels with the middle color channel brightness value liliAnd RGB image IsourceThe reduction numClipLimit is compared, if the brightness value of the color channel is li, the numpixel of all the pixel points isliIf the color channel brightness value is greater than the numClipLimit, all the images of all the pixel points with the color channel brightness value of li are processedNumber of pixel points numpixelliCut down to numclippi limit; if the brightness value of the color channel is li, the numpixel of all the pixel points isliThe upper limit value of the number of the pixel points of the image block smaller than numClipLimit and larger than ttht',upperLimitt'=numClipLimit-avgBinIncrt'Then, the number numpixel points of all the pixel points with the color channel brightness value li are setliIncreasing to numClipLimit, and further obtaining the histogram average vector imgHist of three color channels of the RGB image of the t' th image blockt'The final pixel point number with the middle color channel brightness value li; simultaneously enabling the limited contrast overflow value totalexpass of the t' th image blockt'Subtract (numClipLimit-numpexel)li) Li ∈ {1,2, …, S ' }, S ' denotes the histogram average vector imgHist of the three color channels of the RGB image of the t ' th image blockt'The initial value of li is 1.
(4) Respectively taking 1 to S 'for li, and repeatedly executing the step (3) to respectively obtain histogram average vectors imgHist of three color channels of the RGB image of the t' -th image blockt'Average histogram vector imgHist of three color channels of RGB image from final pixel point number with middle color channel brightness value of 1 to t' th image blockt'The final number of pixels with the brightness value of the middle color channel being S 'is recorded as the average vector imgHist of histograms of three color channels of the RGB image of the t' th image blockt'The final number of pixels in (1).
(5) The histogram average vector imgHist of three color channels of RGB image of t' th image blockt'The number of final pixel points in (1) is less than upperLimitt'The sum of the number of pixels of the color channel brightness value and avgbinIncrt'Simultaneously enabling the limited contrast overflow value totalexpass of the t' th image blockt'Minus avgBinIncrt'Obtaining the optimized histogram average vector of the three color channels of the RGB image of the t' th image block
Figure BDA0001359477250000061
(6) If the limited contrast of the t' th image block overflowsOutput totalexpesst'0, then there is no need to optimize the histogram average vector for the three color channels of the RGB image of the t' th image block
Figure BDA0001359477250000071
Compensation is carried out, and transposition is carried out (9); if the limited contrast overflow value totalexpass of the t' th image blockt'If not 0, then the optimized histogram average vector of the three color channels of the RGB image of the t' th image block
Figure BDA0001359477250000072
Performing compensation operation to obtain the final optimized histogram average vector of the three color channels of the RGB image of the t' th image block
Figure BDA0001359477250000073
The process is as follows:
(7) initialization, namely, enabling k to represent the kth brightness, enabling k ∈ {0,1, …, M }, enabling M to represent the maximum brightness which can be represented by the tth image block, enabling the selected original RGB image to be 8-bit image data in the embodiment, enabling M to be 255, enabling the initial value of k to be 0, and setting the walking number of the tth image block to be stepSizet'
stepSizet'=max(round(numBins/totalExcesst'),1)。
(8) If the optimized histogram average vector of three channels of RGB image of t' th image block
Figure BDA0001359477250000074
If the number of the pixel points corresponding to the kth brightness is less than numClipLimit, the number of the pixel points corresponding to the kth brightness is added with 1, and meanwhile, the limited contrast overflow value totalexpess of the t' th image block is enabledt' Minus 1.
If the limited contrast overflow value totalexpass of the t' th image blockt'If the number of the color channels is zero, the iteration is stopped, and the optimized histogram average vectors of the three color channels of the RGB image of the t' th image block corresponding to the time when the iteration is stopped are calculated
Figure BDA0001359477250000075
Final optimized histogram average vector of three color channels of RGB image marked as t' th image block
Figure BDA0001359477250000076
Then turning to (10); otherwise go to (9).
(9) Let k add stepSizet'And if k ≦ M returning (8) if k ≦ M>M then returns k to 0 (8).
(10) Final optimized histogram average vector for three color channels of RGB image of t' th image block
Figure BDA0001359477250000077
Carrying out conventional accumulation summation operation on the color brightness values of all the pixel points to obtain an accumulated distribution function HistSum of the t' th image blockt'
(11) According to the cumulative distribution function HistSum of the t' th image blockt'Respectively setting the exponential distribution coefficients alpha of the t' th image blockt',alphat'0.4; setting a first distribution coefficient vmax of a t' th image blockt',vmaxt'1-exp (-alpha); setting a second distribution coefficient val of the t' th image blockt',valt'=(vmaxt'×HistSumt'NumPixInTile) and when valt'When the value is more than or equal to 1, the value is regulated to be 1-eps, and the log0 is prevented from occurring; setting a third distribution coefficient temp of the t' th image blockt',tempt'=-1/alpha×log(1-valt') And then calculating to obtain mapping lookup table mapping of the t' th image blockt',mappingt'=min(tempt'×Ml,Ml)。
(12) Let t' take 1 to N respectivelycrop×NcropAnd (2) to (11) are repeatedly executed until the mapping lookup table mapping of the 1 st image block is obtained1To Nthcrop×NcropMapping lookup table for image blocks
Figure BDA0001359477250000084
Is recorded as an original RGB image IsourceN of (A)crop×NcropA mapping look-up table.
(13) Let the original RGB image IsourceN of (A)crop×NcropThe q-th image block of the image blocks comprises WqIndividual pixel point, original RGB image IsourceN of (A)crop×NcropThe q image block in the image blocks corresponds to an original RGB image Isourceα th row, β th column of image blocks (α), and
Figure BDA0001359477250000081
and the pixel points at the α th row and β th column image block (α) with the row number of x and the column number of gamma are (x, gamma),
Figure BDA0001359477250000082
Hpatchrepresenting an original RGB image IsourceMaximum number of lines per image block, WpatchRepresenting an original RGB image IsourceThe maximum number of columns per image block.
(14) And (3) carrying out bilinear interpolation on pixel points (χ, γ) at the positions of rows χ and columns γ in the α th row and β th column image blocks (α) to obtain mapping lookup table values of the pixel points (χ, γ) at the positions of rows χ and columns γ in the α th row and β th column image blocks (α) after bilinear interpolation.
As shown in fig. 4, after bilinear interpolation is obtained, mapping lookup table values ptmamping of pixel points (χ, γ) at positions where rows are χ and columns are γ in α th and β th image blocks (α) are calculated(χ,γ)The expression is as follows:
Figure BDA0001359477250000083
wherein mapping(α,β)Mapping, a lookup table representing α th and β th lines of image blocks (α) after bilinear interpolation(α,β-1)Mapping a lookup table representing α th and β -1 th columns of image blocks (α -1) after bilinear interpolation(α-1,β)Representing the search of the α -1 st line, β th column of image blocks (α -1, β) after bilinear interpolationTABLE, mapping(α-1,β-1)A lookup table representing the block (α -1, β -1) of the image at line α -1 and column β -1 after bilinear interpolation, HpatchRepresenting an original RGB image IsourceWidth of each image block, WpatchRepresenting an original RGB image IsourceThe length of each image block in the image, and the subscript α -1 or β -1 is replaced by 1 when the value is 0.
Mapping lookup table values mapping of pixel points (χ, γ) at positions with row number χ and column number γ in α th and β th rows and columns of image blocks (α) after bilinear interpolation(χ,γ)The red channel brightness value R of the pixel point (χ, γ) at the position where the line number is χ and the column number is γ in the α th line and β th line image blocks (α) after bilinear interpolation is obtained respectively(χ,γ)And green channel brightness value G of pixel point (χ, γ) at position where row number is χ and column number is γ in α th row and β th column image block (α) after bilinear interpolation(χ,γ)And the blue channel brightness value B of a pixel point (chi, gamma) at the position where the number of rows is chi and the number of columns is gamma in the α th row and β th column image block (α) after bilinear interpolation(χ,γ)The luminance values (R) of the three color channels are recorded as pixel points (χ, γ) at the position where the number of rows is χ and the number of columns is γ in the α th and β th rows and columns of image blocks (α) after bilinear interpolation(χ,γ),G(χ,γ),B(χ,γ))。
(15) According to the luminance values (R) of three color channels of pixel points (x, gamma) at the positions of the α th line and β th column of image block (α) with the number of lines x and the number of columns gamma after bilinear interpolation(χ,γ),G(χ,γ),B(χ,γ)) Calculating to obtain three color channel brightness values I of pixel points (χ, γ) at positions with row number χ and column number γ in α th row and β th column image blocks (α) after defoggingsource(χ, γ), whose expression is:
Isource(χ,γ)=(mapping(χ,γ)(R(χ,γ)+1),mapping(χ,γ)(G(χ,γ)+1),mapping(χ,γ)(B(χ,γ)+1))。
(16) let (X, gamma) take (1,1) to (H) respectivelypatch,Wpatch) And (14) and (15) are repeatedly executed to respectively obtain the image blocks (α) of α th line and β th column after defogging, wherein the number of lines is 1,Pixel point (1,1) with 1 column number three color channel brightness value IsourceThe number of rows W in the (1,1) to α th and β th image blocks (α) after defoggingpatchThe number of rows is HpatchBrightness value I of three color channels of pixel point (chi, gamma)source(Hpatch,Wpatch) And recorded as a defogged α th row and β th column image block (α).
(17) Let (α) take (1,1) to (N) respectivelycrop,Ncrop) And (14), (15) and (16) are sequentially and repeatedly executed, and the 1 st row and 1 st column image blocks (1,1) to the N th defogged line and column image blocks are respectively obtainedcropLine, NcropColumn image block (N)crop,Ncrop) And is recorded as an RGB image I after contrast equalization defoggingHazeFree'。
RGB image I after calculating contrast balance defoggingHazeFree' average luminance L of gray-scale imagehazefreemean' in which the contrast is equalized and the RGB image I after defoggingHazeFreeThe calculation process of the gray image of' is:
RGB image I after contrast equalization defoggingHazeFree' includes N × M pixel points, the brightness value of RGB three color channels of the M pixel point is recorded as (R)m,Gm,Bm) Calculating the gray value of the mth pixel point
Graym,Graym=(Rm×299+Gm×587+Bm× 114+ 500)/(1000, and taking M from 1 to N × M to obtain RGB image I with balanced and defogged contrastHazeFree' Gray Gray value of the 1 st pixel point1RGB image I after contrast equalization and defoggingHazeFree' the Gray value Gray of the N × M pixel pointN×MAnd is recorded as an RGB image I after contrast equalization defoggingHazeFree' of the present invention.
The RGB image I after the contrast equalization defoggingHazeFree' average luminance L of gray-scale imagehazefreemean' RGB image I after contrast equalization defoggingHazeFree' the average value of the brightness of all the pixels in the gray image.
Step 3, respectively calculatingOriginal RGB image IsourceGray scale image and original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanFurther calculating to obtain the original RGB image IsourceThe luminance unevenness measure std.
3.1 in particular, with reference to FIG. 5, the original RGB image I is first calculatedsourceAverage luminance L of the gray-scale image ofsourcemeanAnd the original RGB image IsourceNcrop×NcropStandard deviation std of the gray-scale image luminance of the individual image blocks, wherein the original RGB image IsourceThe calculation process of the gray level image is as follows:
original RGB image IsourceThe brightness values of the RGB three color channels containing N × M pixel points and the M' th pixel point are recorded as (R)m',Gm',Bm'),Rm'Red channel value, G, representing the m' th pixelm'Green channel value, B, representing the m' th pixelm'And the blue channel value of the m' th pixel point is represented.
3.2 computing the original RGB image IsourceGray value Gray of middle m' th pixel pointm',
Graym'=(Rm'×299+Gm'×587+Bm'×114+500)÷1000。
3.3 let M' take 1 to N × M respectively, repeat 3.2 to get the original RGB image IsourceGray value Gray of middle 1 st pixel point1To the original RGB image IsourceGray value Gray of middle-Nth × M pixel pointN×MIs recorded as an original RGB image IsourceGray scale image Isourcegray
From the original RGB image IsourceGray scale image IsourcegrayTo obtain the original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanThe process is as follows:
the original RGB image IsourceGray scale image IsourcegrayDividing the sum of the brightness of all the pixel points by the total number of the pixel points to obtain an original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemean
3.4 pairs of original RGB image IsourceGray scale image IsourcegrayBlocking to obtain N'crop×N'cropGray scale image block, N'cropIs a positive integer greater than 0, N 'in the embodiment'crop=10;N'crop×N'cropThe length and width of each image block in each gray image block are respectively the same, if the length and width of each image block are different, mirror image expansion needs to be carried out on the edge of the corresponding image block, and the original RGB image I is processedsourceGray scale image IsourcegrayThe gray scale image blocks in the α 'th row and the β' th column are (α ', β'),
Figure BDA0001359477250000111
the initial value of (α ', β') is (1, 1).
3.5 original RGB image IsourceGray scale image IsourcegrayAdding the brightness of all pixel points in the gray image blocks (α ', β') of the α 'th row and β' th column, and dividing the sum by the number of the pixel points in the image blocks (α ', β') to obtain an original RGB image IsourceGray scale image IsourcegrayAverage brightness L of the gray image blocks (α ', β') of the α 'th row and β' th column(α',β')mean
3.6 taking (α ', β ') as (1,1) to (N 'crop,N'crop) And repeating the execution for 3.5 to obtain the original RGB image IsourceGray scale image IsourcegrayAverage brightness L of middle 1 st row and 1 st column gray scale image block (1,1)(1,1)meanTo the original RGB image IsourceGray scale image IsourcegrayMedium to N'cropLine and N'cropColumn grayscale image Block (N'crop,N'crop) Average brightness of
Figure BDA0001359477250000113
Is recorded as N'crop×N'cropAverage gray-scale luminance of individual gray-scale image blocks
Figure BDA0001359477250000112
Calculated using statistical methodsTo N'crop×N'cropThe average gray scale brightness standard deviation of each gray scale image block is recorded as the original RGB image IsourceThe luminance unevenness measure std.
Step 4, according to the RGB image I after the dark channel defoggingHazeFreeRGB image I after defogging of contrast-balanced dark channelHazeFree', RGB image I after dark channel defoggingHazeFreeAverage brightness L of gray scale imagehazefreemeanRGB image I after defogging of contrast-balanced dark channelHazeFree' average luminance L of gray-scale imagehazefreemean', original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanAnd an original RGB image IsourceThe brightness unevenness metric std, and finally calculating to obtain a synthetic defogged image IHazeFree”。
Specifically, referring to fig. 6, the calculated dark channel defogged RGB image IHazeFreeRGB image I after defogging by contrast equalizationHazeFree' As a mix input, calculate the original RGB image IsourceThe fusion factor Q of (a) is,
Figure BDA0001359477250000121
q is set between 5 and 70, and if this range is exceeded, is set to the close boundary value of 5 or 70; l issourcemeanRepresenting an original RGB image IsourceStd is the original RGB image IsourceIs measured by brightness non-uniformity.
Finally, the synthetic defogged image I is obtained through calculationHazeFree", the expression is:
Figure BDA0001359477250000122
wherein L ishazefreemeanRepresenting a dark channel dehazed RGB image IHazeFreeGray scale image average brightness of, Lhazefreemean' representing RGB image I after contrast equalization defoggingHazeFree' average luminance of gray-scale image, IHazeFreeRepresenting RGB image after dark channel defogging, IHazeFree' represents the RGB image after contrast equalization defogging;
Figure BDA0001359477250000123
performing brightness compensation operation on the RGB image subjected to defogging of the dark channel, and dividing by 8.0 to obtain regularization operation;
Figure BDA0001359477250000124
representing a dark channel dehazed RGB image IHazeFreeThe fusion weight of (a) is calculated,
Figure BDA0001359477250000125
representing contrast-equalized dehazed RGB image IHazeFree' fusion weight.

Claims (5)

1. An optimization method for rapid defogging of an image is characterized by comprising the following steps:
step 1, obtaining an original RGB image IsourceFor the original RGB image IsourceCarrying out dark channel defogging to obtain an RGB image I after dark channel defoggingHazeFreeAnd obtaining an RGB image I after dark channel defoggingHazeFreeAverage brightness L of gray scale imagehazefreemean
The RGB image comprises three color channels, each pixel point in the RGB image comprises three color channels, R represents a red channel, G represents a green channel, and B represents a blue channel;
step 2, according to the original RGB image IsourceObtaining an RGB image I after defogging of the contrast-balanced dark channelHazeFree' and obtaining an RGB image I with the defogged contrast-equalized dark channelsHazeFree' average luminance L of gray-scale imagehazefreemean′;
Step 3, respectively calculating the original RGB image IsourceGray scale image and original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanFurther calculating to obtain the original RGB image IsourceThe luminance unevenness measure std;
wherein, the original RGB image IsourceThe luminance unevenness metric std of (1) represents an average gray luminance standard deviation of each row and each column of gray image blocks in the gray image of the original RGB image;
step 4, according to the RGB image I after the dark channel defoggingHazeFreeRGB image I after defogging of contrast-balanced dark channelHazeFree', RGB image I after dark channel defoggingHazeFreeAverage brightness L of gray scale imagehazefreemeanRGB image I after defogging of contrast-balanced dark channelHazeFree' average luminance L of gray-scale imagehazefreemean', original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanAnd an original RGB image IsourceThe brightness unevenness metric std, and finally calculating to obtain a synthetic defogged image IHazeFree″。
2. The optimization method for rapidly defogging images according to claim 1, wherein the process of the step 1 is as follows:
for the original RGB image IsourceDark channel processing, i.e. selecting original RGB image I respectivelysourceThe channel brightness value with the minimum brightness in the three color channels of each pixel point is obtained; further obtaining a dark channel image IdarkAnd respectively calculating dark channel image IdarkAverage brightness value L of all the pixels in the middledarkmeanAnd dark channel image IdarkMaximum luminance L ofdarkmaxThe dark channel image IdarkAverage brightness value L of all the pixels in the middledarkmeanFor dark channel image IdarkDividing the sum of the brightness of all the pixel points by the total number of the pixel points, and obtaining a dark channel image IdarkMaximum luminance L ofdarkmaxFor dark channel image IdarkThe brightness of the pixel point with the maximum brightness in all the pixel points;
then, the dark channel image I is compared point by pointdarkAnd dark channel image IdarkAverage brightness value L of all the pixels in the middledarkmeanCalculating to obtain a transmission image Ltrans,Ltrans=Min(Idark,Min(0.9,1.3×Ldarkmean÷255)×Idarkaverage) Min represents a function for comparing point by point to take a minimum value; i isdarkaverageRepresenting dark channel images IdarkThe average value of the brightness of the transversely adjacent 8 pixel points is obtained by the following steps:
dark channel image IdarkIs an N × M-dimensional matrix, i.e. N rows and M columns, N, M are positive integers respectively larger than 0, and any dark channel image IdarkBrightness i of pixel point in middle x row and y columnx,yFor dark channel image IdarkAverage value of brightness of 8 transversely adjacent pixel points (x, y) of the middle x-th row and the y-th column is obtained by using imeanx,yRepresenting dark channel images IdarkThe expression of the average value of the brightness of the transversely adjacent 8 pixel points is as follows:
Figure FDA0002476388740000021
wherein, if the subscript y-3, y-2 or y-1 is less than or equal to 0, the subscript y-3, y-2 or y-1 is set as 1, and if the subscript y +3, y +2 or y +1 is greater than M, the subscript y +3, y +2 or y +1 is set as M, x ∈ {1,2, …, N }, y ∈ {1,2, …, M };
Min(Idark,Min(0.9,1.3×Ldarkmean÷255)×Idarkaverage) To regularize the smoothed image after the limiting process, Min (0.9,1.3 × L)darkmean÷255)×IdarkaverageAnd dark channel image IdarkTo obtain a sum of original RGB image IsourceThe transfer function measurement images with the same size are marked as transfer images Ltrans
Through LA=120+0.5×LmaxCalculating an atmospheric optical parameter estimation value LA
By passing
Figure FDA0002476388740000022
For the original RGB image IsourceCarrying out dark channel defogging to obtain an RGB image I after dark channel defoggingHazeFree
Then calculateDark channel defogged RGB image IHazeFreeThe average brightness of the gray level image is calculated by firstly calculating the RGB image I after the defogging of the dark channelHazeFreeThe process of obtaining the gray scale image is as follows:
dark channel defogged RGB image IHazeFreeContains N × M pixel points, and the three color channel values of the nth pixel point are recorded as (R)n,Gn,Bn),RnRed channel value, G, representing the nth pixelnGreen channel value, B, representing the nth pixelnExpressing the blue channel value of the nth pixel point, and calculating the Gray value Gray of the nth pixel pointn
Grayn=(Rn×299+Gn×587+Bn× 114+ 500)/(1000, and making N take 1-N × N to obtain Gray level Gray of the 1 st pixel1Gray value Gray of pixel points from N × MN×MMarked as RGB image I after dark channel defoggingHazeFreeThe gray scale image of (1);
further obtaining the RGB image I after the defogging of the dark channel by averagingHazeFreeAverage brightness L of gray scale imagehazefreemean(ii) a The RGB image I after the dark channel defoggingHazeFreeAverage brightness L of gray scale imagehazefreemeanRGB image I after defogging dark channelHazeFreeThe average value of the brightness of all the pixel points in the gray level image.
3. The method as claimed in claim 2, wherein in step 2, the contrast-equalized dark channel defogged RGB image IHazeFree' equalizing the dark channel defogged RGB image I with the contrastHazeFree' average luminance L of gray-scale imagehazefreemean', its substeps are:
firstly, input original RGB image IsourceBlocking to obtain Ncrop×NcropImage block, NcropIs a positive integer greater than 0, Ncrop×NcropThe length and width of each image block in each image block are respectively the same, and the length of each image block is WpatchEach image block is H in widthpatch(ii) a The number of pixel points in each image block is the same and is marked as numpixInTile which is a positive integer greater than 0;
setting the reduction coefficient as ClipLimit, and calculating to obtain an original RGB image IsourceThe reduction amount of numClipLimit (b) of (a),
Figure FDA0002476388740000031
numBins represents the original RGB image IsourceAnd numBins is a positive integer greater than 0;
(1) initialization let t ' denote the t ' th image block, t ' ∈ {1,2, …, Ncrop×Ncrop},Ncrop×NcropRepresenting the original RGB image IsourceThe total number of image blocks contained after the partitioning; and the t' th image block corresponds to the original RGB image IsourceThe image blocks (a, b) in the row a and the column b,
Figure FDA0002476388740000041
t' has an initial value of 1, and (α, b) has an initial value of (1, 1);
(2) calculating to obtain histogram vectors of three color channels of the RGB image of the t ' th image block, and averaging the histogram vectors of the three color channels of the RGB image of the t ' th image block to obtain an average histogram vector imgHist of the three color channels of the RGB image of the t ' th image blockt′Then, the limited contrast overflow value totalexpass of the t' th image block is calculatedt′
totalExcesst′=sum(max(imgHistt′Numlimit, 0)), max is the maximum operation, round is the rounding function, sum is the summation function;
(3) calculating to obtain the overflow average quantity avgBinIncr of the t' th image blockt′
avgBinIncrt′=round(totalExcesst′/numBins)
Then will beHistogram average vector imgHist of three color channels of RGB image of t' th image blockt′The number numpixel of all pixels with the middle color channel brightness value liliAnd RGB image IsourceThe reduction numClipLimit is compared, if the brightness value of the color channel is li, the numpixel of all the pixel points isliIf the color channel brightness value is greater than the numClipLimit, the number numpixel of all the pixel points with the color channel brightness value li is numpixelliCut down to numclippi limit; if the brightness value of the color channel is li, the number numpexeI of all the pixel points isliThe upper limit value of the number of the pixel points of the image block smaller than numClipLimit and larger than ttht′,upperLimitt′=numClipLimit-avgBinIncrt′Then, the number numpixel points of all the pixel points with the color channel brightness value li are setliIncreasing to numClipLimit, and further obtaining the histogram average vector imgHist of three color channels of the RGB image of the t' th image blockt′The final pixel point number with the middle color channel brightness value li; simultaneously enabling the limited contrast overflow value totalexpass of the t' th image blockt′Subtract (numClipLimit-numpexel)li) Li ∈ {1,2, …, S ' }, S ' denotes the histogram average vector imgHist of the three color channels of the RGB image of the t ' th image blockt′The initial value of li is 1;
(4) respectively taking 1 to S 'for li, and repeatedly executing the step (3) to respectively obtain histogram average vectors imgHist of three color channels of the RGB image of the t' -th image blockt′Average histogram vector imgHist of three color channels of RGB image from final pixel point number with middle color channel brightness value of 1 to t' th image blockt′The final number of pixels with the brightness value of the middle color channel being S 'is recorded as the average vector imgHist of histograms of three color channels of the RGB image of the t' th image blockt′The final number of pixel points in (1);
(5) the histogram average vector imgHist of three color channels of RGB image of t' th image blockt′The number of final pixel points in (1) is less than upperLimitt′Of the color channel luminance valuesThe number of prime points plus avgBinIncrt′Simultaneously enabling the limited contrast overflow value totalexpass of the t' th image blockt′Minus avgBinIncrt′Obtaining the optimized histogram average vector of the three color channels of the RGB image of the t' th image block
Figure FDA0002476388740000051
(6) If the limited contrast overflow value totalexpass of the t' th image blockt′0, then there is no need to optimize the histogram average vector for the three color channels of the RGB image of the t' th image block
Figure FDA0002476388740000052
Compensation is carried out, and transposition is carried out (9); if the limited contrast overflow value totalexpass of the t' th image blockt′If not 0, then the optimized histogram average vector of the three color channels of the RGB image of the t' th image block
Figure FDA0002476388740000053
Performing compensation operation to obtain the final optimized histogram average vector of the three color channels of the RGB image of the t' th image block
Figure FDA0002476388740000054
The process is as follows:
(7) initialization is performed by setting k to represent the k-th luminance, k ∈ {0,1, …, M }, M to represent the maximum luminance that can be represented by the t '-th image block, setting the initial value of k to 0, and setting the number of walks of the t' -th image block to stepSizet′
stepSizet′=max(round(numBins/totalExcesst′),1);
(8) If the optimized histogram average vector of three channels of RGB image of t' th image block
Figure FDA0002476388740000055
If the number of the pixel points corresponding to the middle kth brightness is less than the numClipLimit, the kth brightness is orderedAdding 1 to the number of pixel points corresponding to k brightness, and simultaneously enabling the limited contrast overflow value totalexpess of the t' th image blockt′Subtracting 1;
if the limited contrast overflow value totalexpass of the t' th image blockt′If the number of the color channels is zero, the iteration is stopped, and the optimized histogram average vectors of the three color channels of the RGB image of the t' th image block corresponding to the time when the iteration is stopped are calculated
Figure FDA0002476388740000056
Final optimized histogram average vector of three color channels of RGB image marked as t' th image block
Figure FDA0002476388740000057
Then turning to (10); otherwise go to (9);
(9) let k add stepSizet′And if k is less than or equal to M, returning to (8), and if k is more than M, setting k to 0 and returning to (8);
(10) final optimized histogram average vector for three color channels of RGB image of t' th image block
Figure FDA0002476388740000061
Carrying out conventional accumulation summation operation on the color brightness values of all the pixel points to obtain an accumulated distribution function HistSum of the t' th image blockt′
(11) According to the cumulative distribution function HistSum of the t' th image blockt′Setting the index distribution coefficient α lpha of the t' th image blockt′,alphat′0.4; setting a first distribution coefficient vmax of a t' th image blockt′,vmaxt′1-exp (-alpha); setting a second distribution coefficient val of the t' th image blockt′,valt′=(vmaxt′×HistSumt′(numPixInTile); setting a third distribution coefficient temp of the t' th image blockt′,tempt′=-1/alpha×log(1-valt′) And then calculating to obtain mapping lookup table mapping of the t' th image blockt′,mappingt′=min(tempt′×Ml,Ml);
(12) Let t' take 1 to N respectivelycrop×NcropAnd (2) to (11) are repeatedly executed until the mapping lookup table mapping of the 1 st image block is obtained1To Nthcrop×NcropMapping lookup table for image blocks
Figure FDA0002476388740000062
Is recorded as an original RGB image IsourceN of (A)crop×NcropA mapping look-up table;
(13) let the original RGB image IsourceN of (A)crop×NcropThe q-th image block of the image blocks comprises WqIndividual pixel point, original RGB image IsourceN of (A)crop×NcropThe g-th image block in the image blocks corresponds to an original RGB image Isourceα th row, β th column of image blocks (α), and
Figure FDA0002476388740000063
for the α th row and β th column image block (α), the pixel point where the row number is χ and the column number is γ is (χ, γ),
Figure FDA0002476388740000064
Hpatchrepresenting an original RGB image IsourceMaximum number of lines per image block, WpatchRepresenting an original RGB image IsourceThe maximum number of columns of each image block;
(14) carrying out bilinear interpolation on pixel points (χ, γ) at the positions of rows χ and columns γ in α th and β th image blocks (α) to obtain mapping lookup table values of the pixel points (χ, γ) at the positions of rows χ and columns γ in α th and β th image blocks (α) after bilinear interpolation;
calculating mapping lookup table values ptmapping of pixel points (χ, γ) at positions where the line number is χ and the column number is γ in α th line and β th column image blocks (α) after bilinear interpolation(χ,γ)The expression is as follows:
Figure FDA0002476388740000071
wherein mapping(α,β)Mapping, a lookup table representing α th and β th lines of image blocks (α) after bilinear interpolation(α,β-1)Mapping a lookup table representing α th and β -1 th columns of image blocks (α -1) after bilinear interpolation(α-1,β)Mapping a lookup table representing α -1 st and β th lines of image blocks (α -1, β) after bilinear interpolation(α-1,β-1)A lookup table representing the block (α -1, β -1) of the image at line α -1 and column β -1 after bilinear interpolation, HpatchRepresenting an original RGB image IsourceWidth of each image block, WpatchRepresenting an original RGB image IsourceThe subscript α -1 or β -1 is replaced by 1 when the value is 0;
respectively obtaining the red channel brightness value R of the pixel point (chi, gamma) at the position where the line number is chi and the column number is gamma in the α th line and β th column image block (α) after bilinear interpolation(χ,γ)And green channel brightness value G of pixel point (χ, γ) at position where row number is χ and column number is γ in α th row and β th column image block (α) after bilinear interpolation(χ,γ)And the blue channel brightness value B of a pixel point (chi, gamma) at the position where the number of rows is chi and the number of columns is gamma in the α th row and β th column image block (α) after bilinear interpolation(χ,γ)The luminance values (R) of the three color channels are recorded as pixel points (χ, γ) at the position where the number of rows is χ and the number of columns is γ in the α th and β th rows and columns of image blocks (α) after bilinear interpolation(χ,γ),G(χ,γ),B(χ,γ));
(15) According to the luminance values (R) of three color channels of pixel points (x, gamma) at the positions of the α th line and β th column of image block (α) with the number of lines x and the number of columns gamma after bilinear interpolation(χ,γ),G(χ,γ),B(χ,γ)) Calculating to obtain three color channel brightness values I of pixel points (χ, γ) at positions with row number χ and column number γ in α th row and β th column image blocks (α) after defoggingsource(χ, γ), whose expression is:
Isource(χ,γ)=(ptmappmg(χ,γ)(R(χ,γ)+1),ptmapping(χ,γ)(G(χ,γ)+1),ptmapping(χ,γ)(B(χ,γ)+1));
(16) let (X, gamma) take (1,1) to (H) respectivelypatch,Wpatch) And (14) and (15) are repeatedly executed to respectively obtain three color channel brightness values I of pixel points (1,1) with the row number of 1 and the column number of 1 in the image blocks (α) of α th row and β th column after defoggingsourceThe number of rows W in the (1,1) to α th and β th image blocks (α) after defoggingpatchThe number of rows is HpatchPixel point of (H)patch,Wpatch) Three color channel luminance values Isource(Hpatch,Wpatch) Marked as a defogged α th row and β th column image block (α);
(17) let (α) take (1,1) to (N) respectivelycrop,Ncrop) And (14), (15) and (16) are sequentially and repeatedly executed, and the 1 st row and 1 st column image blocks (1,1) to the N th defogged line and column image blocks are respectively obtainedcropLine, NcropColumn image block (N)crop,Ncrop) And is recorded as an RGB image I after defogging of a contrast-balanced dark channelHazeFree′;
RGB image I after defogging of contrast-balanced dark channelHazeFree' average luminance L of gray-scale imagehazefreemean' RGB image I after defogging for contrast-equalized dark channelHazeFree' the average value of the brightness of all the pixels in the gray image.
4. The method as claimed in claim 3, wherein in step 3, the original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanAnd the original RGB image IsourceThe luminance nonuniformity metric std of (1) is calculated by:
3.1 computing the original RGB image IsourceAverage luminance L of the gray-scale image ofhazefreemean' and original RGB image IsourceNcrop×NcropStandard deviation std of the gray-scale image luminance of the individual image blocks, wherein the original RGB image IsourceThe calculation process of the gray level image is as follows:
original RGB image IsourceThe brightness values of the RGB three color channels containing N × M pixel points and the M' th pixel point are recorded as (R)m′,Gm′,Bm′),Rm′Red channel value, G, representing the m' th pixelm′Green channel value, B, representing the m' th pixelm′Expressing the blue channel value of the m' th pixel point;
3.2 computing the original RGB image IsourceGray value Gray of middle m' th pixel pointm′
Graym′=(Rm′×299+Gm′×587+Bm′×114+500)÷1000;
3.3 let M' take 1 to N × M respectively, repeat 3.2 to get the original RGB image IsourceGray value Gray of middle 1 st pixel point1To the original RGB image IsourceGray value Gray of middle-Nth × M pixel pointN×MIs recorded as an original RGB image IsourceGray scale image Isourcegray
From the original RGB image IsourceGray scale image IsourcegrayTo obtain the original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemeanThe process is as follows:
the original RGB image IsourceGray scale image IsourcegrayDividing the sum of the brightness of all the pixel points by the total number of the pixel points to obtain an original RGB image IsourceAverage luminance L of the gray-scale image ofsourcemean
3.4 pairs of original RGB image IsourceGray scale image IsourcegrayBlocking to obtain N'crop×N′cropGray scale image block, N'cropIs a positive integer greater than 0; n'crop×N′cropThe length and the width of each image block in the gray-scale image blocks are respectively the same; the original RGB image IsourceGray scale image IsourcegrayThe gray scale image blocks in the α 'th row and the β' th column are (α ', β'),
Figure FDA0002476388740000091
the initial value of (α ', β') is (1, 1);
3.5 original RGB image IsourceGray scale image IsourcegrayAdding the brightness of all pixel points in the gray image blocks (α ', β') of the α 'th row and β' th column, and dividing the sum by the number of the pixel points in the image blocks (α ', β') to obtain an original RGB image IsourceGray scale image IsourcegrayThe average brightness of the gray image blocks (α ', β') of the α 'th row and β' th column(α′,β′)mean
3.6 taking (α ', β ') as (1,1) to (N 'crop,N′crop) And repeating the execution for 3.5 to obtain the original RGB image IsourceGray scale image IsourcegrayAverage brightness L of middle 1 st row and 1 st column gray scale image block (1,1)(1,1)meanTo the original RGB image IsourceGray scale image IsourcegrayMedium to N'cropLine and N'cropColumn grayscale image Block (N'crop,N′crop) Average brightness of
Figure FDA0002476388740000092
Is recorded as N'crop×N′cropAverage gray-scale luminance of individual gray-scale image blocks
Figure FDA0002476388740000093
Calculated to N 'using statistical methods'crop×N′cropThe average gray scale brightness standard deviation of each gray scale image block is recorded as the original RGB image IsourceThe luminance unevenness measure std.
5. The method as claimed in claim 4, wherein in step 4, the synthesized defogged image isIHazeFree", the expression is:
Figure FDA0002476388740000101
Figure FDA0002476388740000102
wherein Q represents the original RGB image IsourceFusion factor of (1), LhazefreemeanRepresenting a dark channel dehazed RGB image IHazeFreeGray scale image average brightness of, Lhazefreemean' representing RGB image I after contrast-equalized dark channel defoggingHazeFree' average luminance L of gray-scale imagehazefreemean′,IHazeFreeRepresenting RGB image after dark channel defogging, IHazeFree' represents the RGB image after defogging of the contrast-equalized dark channel;
Figure FDA0002476388740000103
the brightness compensation operation for the RGB image after the defogging of the dark channel,
Figure FDA0002476388740000104
representing a dark channel dehazed RGB image IHazeFreeThe fusion weight of (a) is calculated,
Figure FDA0002476388740000105
representing contrast-equalized dark channel dehazed RGB image IHazeFree' a fusion weight; divide by 8.0 is the regularization operation.
CN201710610832.9A 2017-07-25 2017-07-25 Optimization method for rapid image defogging Active CN107424132B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710610832.9A CN107424132B (en) 2017-07-25 2017-07-25 Optimization method for rapid image defogging

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710610832.9A CN107424132B (en) 2017-07-25 2017-07-25 Optimization method for rapid image defogging

Publications (2)

Publication Number Publication Date
CN107424132A CN107424132A (en) 2017-12-01
CN107424132B true CN107424132B (en) 2020-07-07

Family

ID=60430292

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710610832.9A Active CN107424132B (en) 2017-07-25 2017-07-25 Optimization method for rapid image defogging

Country Status (1)

Country Link
CN (1) CN107424132B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108537756B (en) * 2018-04-12 2020-08-25 大连理工大学 Single image defogging method based on image fusion
CN109686342B (en) * 2018-12-25 2021-04-06 海信视像科技股份有限公司 Image processing method and device
CN110648297B (en) * 2019-09-26 2023-05-26 邓诗雨 Image defogging method, system, electronic device and storage medium
CN111915501B (en) * 2020-01-17 2022-07-15 杭州瞳创医疗科技有限公司 Brightness balancing method for fundus image
CN111563852A (en) * 2020-04-24 2020-08-21 桂林电子科技大学 Dark channel prior defogging method based on low-complexity MF
CN112581405B (en) * 2020-12-25 2023-04-07 合肥赛为智能有限公司 Low-illumination image enhancement algorithm for rail transit
CN114494084B (en) * 2022-04-14 2022-07-26 广东欧谱曼迪科技有限公司 Image color homogenizing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424623A (en) * 2013-08-19 2015-03-18 中国电信股份有限公司 Natural image defogging method and system
CN106469440A (en) * 2016-09-08 2017-03-01 西安电子科技大学 Dark mist elimination parallel optimization method based on OpenCL
CN106897972A (en) * 2016-12-28 2017-06-27 南京第五十五所技术开发有限公司 A kind of self-adapting histogram underwater picture Enhancement Method of white balance and dark primary
CN106933579A (en) * 2017-03-01 2017-07-07 西安电子科技大学 Image rapid defogging method based on CPU+FPGA

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102390918B1 (en) * 2015-05-08 2022-04-26 한화테크윈 주식회사 Defog system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104424623A (en) * 2013-08-19 2015-03-18 中国电信股份有限公司 Natural image defogging method and system
CN106469440A (en) * 2016-09-08 2017-03-01 西安电子科技大学 Dark mist elimination parallel optimization method based on OpenCL
CN106897972A (en) * 2016-12-28 2017-06-27 南京第五十五所技术开发有限公司 A kind of self-adapting histogram underwater picture Enhancement Method of white balance and dark primary
CN106933579A (en) * 2017-03-01 2017-07-07 西安电子科技大学 Image rapid defogging method based on CPU+FPGA

Also Published As

Publication number Publication date
CN107424132A (en) 2017-12-01

Similar Documents

Publication Publication Date Title
CN107424132B (en) Optimization method for rapid image defogging
CN109410126B (en) Tone mapping method of high dynamic range image with detail enhancement and brightness self-adaption
CN110009574B (en) Method for reversely generating high dynamic range image from low dynamic range image
CN110782407B (en) Single image defogging method based on sky region probability segmentation
WO2021114564A1 (en) Enhancement method for low-contrast infrared image
Hou et al. Underwater image dehazing and denoising via curvature variation regularization
CN110689490A (en) Underwater image restoration method based on texture color features and optimized transmittance
CN109919859A (en) A kind of Outdoor Scene image defogging Enhancement Method calculates equipment and its storage medium
CN111311525A (en) Image gradient field double-interval equalization algorithm based on histogram probability correction
Xue et al. Video image dehazing algorithm based on multi-scale retinex with color restoration
CN110766622A (en) Underwater image enhancement method based on brightness discrimination and Gamma smoothing
Jia et al. A reflectance re-weighted retinex model for non-uniform and low-light image enhancement
CN106296749B (en) RGB-D image eigen decomposition method based on L1 norm constraint
CN102542536A (en) Image quality strengthening method based on generalized equilibrium model
Park et al. ULBPNet: Low-light image enhancement using U-shaped lightening back-projection
CN109801246B (en) Global histogram equalization method for adaptive threshold
CN108122216B (en) system and method for dynamic range extension of digital images
CN112991240B (en) Image self-adaptive enhancement algorithm for real-time image enhancement
CN110852971A (en) Video defogging method based on dark channel prior and Retinex and computer program product
CN115937029A (en) Underwater image enhancement method
CN114565543A (en) Video color enhancement method and system based on UV histogram features
CN107317968A (en) Image defogging method, device, computer can storage medium and mobile terminals
CN111311514B (en) Image processing method and image processing apparatus for medical endoscope
Martinho et al. Underwater image enhancement based on fusion of intensity transformation techniques
Chang et al. Perceptual contrast enhancement of dark images based on textural coefficients

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant