CN107424133A - Image defogging method, device, computer can storage medium and mobile terminals - Google Patents

Image defogging method, device, computer can storage medium and mobile terminals Download PDF

Info

Publication number
CN107424133A
CN107424133A CN201710624518.6A CN201710624518A CN107424133A CN 107424133 A CN107424133 A CN 107424133A CN 201710624518 A CN201710624518 A CN 201710624518A CN 107424133 A CN107424133 A CN 107424133A
Authority
CN
China
Prior art keywords
image
defogging
preview image
processing
haze concentration
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.)
Granted
Application number
CN201710624518.6A
Other languages
Chinese (zh)
Other versions
CN107424133B (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201710624518.6A priority Critical patent/CN107424133B/en
Publication of CN107424133A publication Critical patent/CN107424133A/en
Application granted granted Critical
Publication of CN107424133B publication Critical patent/CN107424133B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details

Landscapes

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

Abstract

Can storage medium and mobile terminal the present invention relates to a kind of image defogging method, device, computer.Image defogging method, including:Preview mode and preview image is shown into taking pictures;Obtain the current visibility in the preview image location;Haze concentration scale is determined according to the visibility;Defogging processing is carried out to the preview image using corresponding defogging method according to the haze concentration scale.Above-mentioned image defogging method can determine that haze does concentration scale according to the visibility of acquisition, carry out adaptive defogging processing using corresponding defogging method for the preview image of different haze concentration scales, enhance defog effect, there is provided user experience.

Description

Image defogging method, device, computer can storage medium and mobile terminals
Technical field
, can storage medium more particularly to image defogging method, device, computer the present invention relates to field of computer technology And mobile terminal.
Background technology
With the popularization and application of mobile terminal, such as smart mobile phone, tablet personal computer mobile terminal in life can not or Lack, the various functions of mobile terminal annex are also increasingly paid close attention to by everybody.In daily life, with mobile terminal photograph work( The popularization of energy, the demand of picture processing is carried out using mobile terminal also increasingly to be increased, and also various image processing softwares also begin to gush It is existing.Under the weather conditions such as mist, haze, the suspended material in air causes visibility to reduce, and has influence under such weather condition The picture quality of captured photo.Therefore, image defogging technology is proposed, to remove the weather conditions such as above-mentioned mist, haze to taking Picture quality influence, strengthen image in object visibility.
Traditional defogging technology uses same defogging algorithm, the haze degree regardless of weather, final defogging processing The defogging degree of image afterwards is identical, and user experience is low.
The content of the invention
The embodiment of the present invention provide a kind of image defogging method, device, computer can storage medium and mobile terminal, can The adaptive defogging that algorithms of different is carried out to preview image is handled, and is enhanced defog effect, is improved user experience.
A kind of image defogging method, including:
Preview mode and preview image is shown into taking pictures;
Obtain the current visibility in the preview image location;
Haze concentration scale is determined according to the visibility;
Defogging processing is carried out to the preview image using corresponding defogging method according to the haze concentration scale.
Above-mentioned image defogging method, preview mode and preview image is shown into taking pictures;Obtain the preview image place The current visibility in area;Haze concentration scale is determined according to the visibility;According to the haze concentration scale using corresponding Defogging method to the preview image carry out defogging processing.Above-mentioned image defogging method can determine according to the visibility of acquisition Haze does concentration scale, is adaptively gone using corresponding defogging method for the preview image of different haze concentration scales Mist processing, enhances defog effect, there is provided user experience.
The embodiment of the present invention also provides a kind of image demister, including:
Display module, preview image is shown when taking pictures preview mode for entering;
Acquisition module, the visibility current for obtaining the preview image location;
Determining module, for determining haze concentration scale according to the visibility, wherein, the haze concentration scale and institute It is in inversely prroportional relationship to state visibility;And
Defogging module, for being carried out according to the haze concentration scale to the preview image using corresponding defogging method Defogging processing.
The embodiment of the present invention also provides a kind of computer-readable recording medium, is stored thereon with computer program, the program Image defogging method is realized when being executed by processor.
A kind of mobile terminal, including memory, processor and storage are on a memory and the meter that can run on a processor Calculation machine program, image defogging method is realized during the computing device described program.
Brief description of the drawings
Fig. 1 is the flow chart of image defogging method in one embodiment;
Fig. 2 is the flow chart of image defogging method in another embodiment;
Fig. 3 is that the stream for carrying out defogging processing to the preview image based on dark primary elder generation checking method is used in one embodiment Cheng Tu;
Fig. 4 is to carry out defogging to the preview image based on haze concentration factor and guiding filtering method in one embodiment The flow chart of processing;
Fig. 5 is haze weather Imaging physics model in one embodiment;
Fig. 6 is the inner frame figure of image demister in one embodiment;
Fig. 7 is the schematic diagram of image processing circuit in one embodiment.
Embodiment
In order to make the purpose , technical scheme and advantage of the present invention be clearer, it is right below in conjunction with drawings and Examples The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and It is not used in the restriction present invention.
The embodiment of the present invention provides a kind of image defogging method, and Fig. 1 is the flow of image defogging method in one embodiment Figure.A kind of image defogging method, comprises the following steps:
Step 102:Preview mode and preview image is shown into taking pictures.
It should be noted that a kind of image defogging method provided in an embodiment of the present invention is to be taken pictures on mobile terminals Scene under realize.Just start the imaging device of mobile terminal when user wants to take pictures, just opened when user wants to take pictures The imaging device of dynamic terminal, the imaging device can be front camera, rear camera, dual camera etc..Start mobile whole The imaging device at end, preview mode of taking pictures is made it into, and the object being taken is included into the display window in mobile terminal, and It is preview image by the image definition shown by now display window.
Wherein, five parts are generally comprised on imaging device hardware:Shell (motor), camera lens, infrared fileter, image pass Sensor (such as CCD or COMS) and flexible print wiring board (FPCB) etc..Under preview mode of taking pictures, the mistake of preview image is shown Cheng Zhong, camera lens are moved under the driving of motor, and the object being taken is imaged on the image sensor by camera lens.Imaging sensor Electric signal is converted optical signals to by optical-electronic conversion and is defeated by image processing circuit progress subsequent treatment.Wherein, image procossing electricity Road can utilize hardware and/or component software to realize, it may include define ISP (Image Signal Processing, image letter Number processing) pipeline various processing units.
Step 104:Obtain the current visibility in the preview image location.
Specifically, by being built in the weather forecast plug-in unit of mobile terminal, networking obtains the shifting that weather forecast plug-in unit provides The dynamic Weather information of terminal seat area at that time.Wherein, Weather information include weather forecast (rain, mist, snow, dense fog early warning etc.), Air quality (air quality index, haze early warning) and visibility etc..Visibility, it is a finger for reflecting atmospheric transparency Mark, the people that aeronautical chart is defined as having twenty-twenty vision can also be seen under weather condition at that time objective contour it is maximum away from From.Visibility and weather condition at that time are closely related, when there are the synoptic processes such as rainfall, mist, haze, cigarette, snow, sandstorm, Atmospheric transparency is relatively low, therefore visibility is poor.Visibility is as the measurement most direct standard of haze concentration, the big expression of visibility Haze concentration is small, it is on the contrary then represent haze concentration it is big.Haze weather is shown to be when visibility is less than 1000 meters, illustrates to deposit in the air In mist, haze, cigarette etc., the visual field is unintelligible.
Optionally, visibility can also be obtained by accessing on corresponding application server, such as be accessed local for meteorology The application servers such as platform, weather station, space flight and aviation, obtain visibility there and then etc..
Step 106:Haze concentration scale is determined according to the visibility, wherein, the haze concentration scale and the energy Degree of opinion is in inversely prroportional relationship.
On the contrary its visibility big (range of visibility is remote) represents that haze concentration is small, then expression haze concentration is big.Such as the institute of table 1 Show, according to haze concentration scale and the statistical law of visibility, can provide between haze concentration scale V and visibility L sizes Corresponding relation.According to the actual requirements, haze concentration scale can be divided into four grades, grade 0, grade 1, grade 2 and grade 3, wherein, grade 0 can be understood as range of visibility more than 1000 meters, fine, without haze.Grade 1, which corresponds to, to see Thin haze weather of the distance between 500~1000 meters is spent, it is dense between 50~500 meters that grade 2 corresponds to range of visibility Haze weather, grade 3 correspond to the super dense haze weather that range of visibility is less than less than 50 meters.
The haze concentration scale of table 1 and visibility corresponding table
Haze concentration scale L Visibility V (m)
0 > 1000
1 500~1000
2 50~500
3 < 50
Step 108:Defogging is carried out to the preview image using corresponding defogging method according to the haze concentration scale Processing.
Defogging processing is carried out to preview image using corresponding defogging method according to the haze concentration scale of acquisition, wherein, When haze concentration scale is grade 0, its visibility is very high, shows fine, and the haze concentration in air is very low, it is not necessary to Defogging processing is carried out to preview image.When haze concentration scale is grade 1, it corresponds to thin haze weather, can use pin Defogging processing is carried out to preview image to the defogging algorithm of thin haze weather.When haze concentration scale is grade 2, it corresponds to Dense haze weather, the defogging algorithm for dense haze weather can be used to carry out defogging processing to preview image.When haze concentration When grade is grade 3, in 50 meters, haze concentration is excessive for its low visibility, after causing defogging when handling this kind of image defogging Picture noise it is bigger than normal, therefore, it is necessary to carry out incomplete defogging, the defogging algorithm for dense haze weather can be used to preview Image carries out incomplete defogging processing.
Above-mentioned image defogging method, preview mode and preview image is shown into taking pictures;Obtain the preview image place The current visibility in area;Haze concentration scale is determined according to the visibility;According to the haze concentration scale using corresponding Defogging method to the preview image carry out defogging processing.Above-mentioned image defogging method can determine according to the visibility of acquisition Haze does concentration scale, is adaptively gone using corresponding defogging method for the preview image of different haze concentration scales Mist processing, enhances defog effect, there is provided user experience.
Fig. 2 is the flow chart of image defogging method in another embodiment.In the embodiment of the present invention, image defogging method, Including:
Step 202:Preview mode and preview image is shown into taking pictures;
Step 204:Obtain the current visibility in the preview image location;
Step 206:Haze concentration scale is determined according to the visibility;
Step 208:The accuracy of the haze concentration scale is determined according to the color histogram of preview image HSV components.
Step 210:Defogging is carried out to the preview image using corresponding defogging method according to the haze concentration scale Processing.
Wherein, step 202,204,206,210 steps 102 corresponded in Fig. 1 embodiments, 104,106,108, here, Repeat no more.
Wherein, in order to determine the accuracy of the haze concentration scale information according to visibility acquisition, in present example, The accuracy of the haze concentration scale can be determined according to the color histogram of preview image HSV components.
Specifically, the three elements for forming hsv color space are chrominance component (Hue), saturation degree component (Saturation) With lightness component (Value).The preview image obtained under the conditions of haze weather, its preview image chrominance component H, saturation degree point Be present larger difference in the information that amount S, lightness component V are included, therefore can be judged according to the color histogram of image H, S, V component Greasy weather grade.Determining type is as follows:
AveH < 100&&AveS < 0.07&&AveV < 0.5 (1-1)
AveH < 125&&AveS < 0.2&&AveV < 0.48 (1-2)
In formula, AveH, AveS, AveV are respectively tone H, S of image, V component feature, and calculation is:
AveH=SumH/M1 (1-3)
AveS=SumS/M2 (1-4)
AveV=SumV/M3 (1-5)
Wherein, SumH, SumS, SumV are respectively all pixels point chrominance component H, saturation degree component S, lightness minute in image Measure V summation;M1, M2, M3 are respectively the pixel quantity that chrominance component H, saturation degree component S, lightness component V values are not 0.
If the chrominance component H of preview image, saturation degree component S, lightness component V features meet formula (1-1), it is determined as thin Haze weather, its haze concentration scale are grade 1.
If the chrominance component H of preview image, saturation degree component S, lightness component V features meet formula (1-2), it is determined as dense Haze weather, its haze concentration scale are grade 2.
If the chrominance component H of preview image, saturation degree component S, lightness component V features be both unsatisfactory for formula (1-1) or be discontented with Sufficient formula (1-2), then it is believed that without haze in preview image, now it is not required to carry out defogging processing to preview image.
The haze in preview image can be confirmed according to the chrominance component H of preview image, saturation degree component S, lightness component V Whether concentration scale is consistent with the haze concentration scale determined according to visibility.If consistent, illustrate with being determined according to visibility Haze concentration scale is accurate, can carry out corresponding defogging processing.If inconsistent, the visibility for illustrating to obtain is forbidden Really, it is necessary to reacquire the current visibility in the preview image location to determine that haze concentration scale or direct basis are pre- The color histogram of image HSV components look at determines the haze concentration scale to carry out corresponding defogging processing.
Optionally, can also be by visual contrast (Visual Contrast Measure, VCM) to preview image Quality is assessed, and by the quality of the preview image of acquisition compared with preset value, and then determines haze concentration scale.
In one embodiment, the preview image is entered using corresponding defogging method according to the haze concentration scale The processing of row defogging.
Specifically, when the haze concentration scale is 1 grade of grade, using based on dark primary priori defogging method to described Preview image carries out defogging processing.When the haze concentration scale is 1 grade of grade, corresponding to thin haze weather, preview image Contrast decline it is not serious, in image dark primary information protrude, using the dark primary priori defogging algorithm based on image restoration The image after defogging can be made closer to real scene.
When the haze concentration scale is 2 grades of grade, using haze concentration factor and guiding filtering method defogging method Defogging processing is carried out to the preview image.When the haze concentration scale is 1 grade of grade, corresponding to dense haze weather, in advance The contrast of image of looking at declines serious, and the information such as image detail, color is largely lost, and dark primary information is covered by haze, because This dark primary priori defogging algorithm is undesirable to such image defog effect.At this point it is possible to using based on haze concentration factor and Guiding filtering method carries out defogging processing to preview image, can make the image after defogging closer to real scene, or can be with There is no globalization histogram equalization, the homomorphic filtering of the limitation of the conditions such as dark primary information using the algorithm based on image enhaucament Or multi-Scale Retinex Algorithm carries out defogging processing to preview image.
As shown in figure 3, further, described use is gone based on dark primary priori defogging method to the preview image Mist processing, comprises the following steps:
Step 302:Obtain the dark primary figure of preview image.
Its dark primary figure J is obtained according to preview imagedark(x), can be expressed with following formula:
In formula, c represents one of R, G of image, B color channel, and Ω (x) is represented at the x in image in addition to sky areas One local window, JcRepresent a Color Channel of coloured image.Carried out twice when seeking the dark primary figure of preview image Minimum Value Operations, minimum value solution is carried out to central pixel point R, G, B color channel first, then to the regional area Ω of image (x) mini-value filtering is made.
Step 304:Air light value A and coarse transmissivity t (x) are asked for according to the dark primary figure.
In the image defogging based on physical model, A value size directly affects the brightness of image after recovery:A values Crossing conference makes the image after recovery partially dark, the too small image color distortion that will cause to make image exposure excessive, and make recovery of A values.Root Rule according to statistics, A=0.98 can be taken, it is of course also possible to take other values, this embodiment of the present invention is not limited.
Meanwhile coarse transmissivity t (x) can be defined as:
In formula, IC(y) preview image I (x) pixel R, G, B triple channel is represented;ω is referred to as the defogging degree factor.ω's takes Value scope is:0 < ω < 1, specifically, ω=0.95.
Step 306:Bilateral filtering is carried out to the coarse transmissivity t (x) and obtains fine transmissivity.
Down-sampling is carried out to coarse transmissivity t (x) first to handle to obtain sampling transmissivity t ' (x), down-sampling ratio is 1/ 4.After carrying out down-sampling processing to coarse transmissivity t (x), the time loss of bilateral filtering optimization transmissivity can be reduced.Then By the way of bilateral filtering fine transmissivity is obtained to carrying out smooth optimization to estimation transmissivity t ' (x)Using bilateral Fine transmissivity after filtering optimizationFor:
In formula, C is normalized parameter;For spatial domain weight coefficient;For codomain weight coefficient;Ω is The window of (2N+1) × (2N+1) sizes centered on pixel (i, j);T (i, j) is coarse transmissivity t (x).Wherein, it is double The filter radius N=10 of side filtering parameter bilateral filtering, space similarity factor sigmas=5.
Step 308:To the fine transmissivityBilinear interpolation is carried out, makes the fine transmissivityRecover To original size, obtain estimating transmissivity
Wherein, bilinear interpolation be the pixel value of 4 sampled points in the region of center point 2 × 2 is weighted it is flat It is used as output result, the interpolation method is ideal to the result and processing speed of input picture.
Step 310:According to the air light value A, estimation transmissivityDefogging processing is carried out to the preview image.Its In, the default formula that recovers is expressed as:
In formula, I (x) represents preview image, and J (x) is the fog free images after recovering, and A is air light value,It is saturating to estimate Penetrate rate, in order to avoid be defogging processing after image it is excessive to white field, defogging processing with t0=0.1 is criterion calculation.
Transmissivity is optimized by using adaptive bilateral filtering and improves algorithm speed, while is entered to transmissivity Down-sampling operation is taken before row optimization to it, algorithm speed is further enhanced.
As shown in figure 5, further, the preview image is gone based on haze concentration factor and guiding filtering method Mist processing, comprises the following steps:
Step 402:Haze weather Imaging physics model is built, wherein, the physical model is expressed as:E=Gβ(I-Ig)+ Ig, in formula, GβFor haze concentration factor, I is preview image, IgFor the atmosphere light in environment.
Haze weather Imaging physics model be study haze weather image degradation important evidence, common haze weather into As physical model can represent as shown in Figure 5.From figure 5 it can be seen that the so that main bag of the factor of haze weather image blur Include:Absorption and scattering of the turbid media to imaging object reflected light and the atmospheric particles in air and ground is anti-in air Penetrate.Light causes multiple scattering to disturb the image of imaging in scattering process.Represent that this process is with mathematical modeling:
I=Igρ(x)e-βd(x)+Ig(1-e-βd(x))
In formula, IgFor the atmosphere light in environment, ρ (x) is standard light intensity, and I is preview image, and d (x) is that scene is deep Degree, β are that haze concentration influences coefficient.Compared with the long-distance transmissions of skylight, under the conditions of thick fog, acquired in imaging device The change of image scene depth be small.If E is the picture rich in detail before degenerating, with haze concentration factor GβInstead of eβd(x), It can be seen from radiation theory, and then above-mentioned formula is handled to obtain weather Imaging physics model:
E=Gβ(I-Ig)+Ig
Step 404:The haze concentration factor is obtained according to the visibility.
For visibility as the most direct standard of haze concentration is weighed, visibility is big to represent that haze concentration is small, on the contrary then represent Haze concentration is big.When with visibility to characterize haze concentration information, haze concentration is excessive in the case of very low observable, to this kind of It can make it that the picture noise after defogging is bigger than normal during the processing of image defogging, therefore, it is necessary to carry out incomplete defogging.When visibility is one It is individual it is larger apart from when, haze concentration is very low, it is not necessary to preview image carry out defogging processing.Visibility is made within 1000 meters To there is haze weather, when visibility L ∈ [50,1000], haze concentration factor GβThe pass in direct ratio between visibility 1/L System.Therefore, visibility L and haze concentration factor G can be setβBetween corresponding relation:
According to above-mentioned corresponding relation formula, its haze concentration factor G can be directly determined according to the visibility of acquisitionβ
Step 406:The atmosphere light is estimated using the method for guiding filtering.
Preview image is converted into gray-scale map first, atmosphere light A is tried to achieve using gray-scale map guiding filtering.Using guiding filtering Method estimation atmosphere light A when, it is p that can remember preview image, and navigational figure I, filtering output image is q, then centered on k Window WkMiddle filtering output image q is that I has linear relationship with navigational figure.In order to allow the effect of guiding filtering to reach most It is excellent, it is necessary to so that the difference between output image q and preview image p is minimum, at this time, it may be necessary to cost function E (ak, bk) meet:
In formula, ak、bkIt is in the window fixed value for the linear coefficient in window;WkThe radius assumed that is the square of r Window.Local linear coefficient a can be obtained using the thought of least square methodk、bk.Atmosphere light IgIt can be expressed as:
In formula, piFor the pixel in preview image, i is guided by pixel, WiRepresent with piCentered on cell window, | ω | it is cell window number of pixels number, R represents to do filtering process to each pixel.
Step 408:Bring the haze concentration factor of the acquisition, atmosphere light into the haze weather Imaging physics mould Type carries out defogging processing to the preview image.
By the haze concentration factor G of acquisitionβ, atmosphere light IgBring into haze weather Imaging physics model E=Gβ(I-Ig)+Ig In, it is possible to realize and preview image I defogging is handled.
In the embodiment of the present invention, this method complexity when calculating the value of haze concentration factor is low, and guiding filtering is performing Its execution speed is unrelated with filter window size during filtering operation, fast response time.It can be realized to thick fog haze by this method The defogging of preview image is handled, and the color of image after defogging processing is true, stereovision is strong, brightness of image definition is high.
In one embodiment, in addition to the preview image degree of the being exposed processing after defogging processing and automatic color The step of rank is handled.
Taken pictures in the defogging under preview mode, respective level is carried out to first preview image according to the visibility Defogging handle to obtain the second preview image after, the processing of the second preview image degree of being exposed after handling defogging and Auto Laves is handled to strengthen the display effect of the secondth preview image.Generally, the second preview graph obtained after defogging is handled The brightness of picture is dark, and the second preview image is post-processed, can be to the second excessively dark preview image in last handling process Increase exposure and Auto Laves, to obtain the display effect of more perfect presentation mist elimination image.
In one embodiment, image defogging method, in addition in response to photographing instruction, second preview image is given birth to The step of into image file.
Photographing instruction can be user input be used for control the instruction that imaging device records the image of object, use Family can trigger photographing instruction by physics or virtual start button, gesture motion, voice etc..Taken pictures when receiving Instruction is received, and the second preview image generation image file after defogging is handled is (such as:BMP forms, jpeg format etc.) preserve. While image file is generated, image corresponding with image file can also be included on the screen of the mobile terminal, So that user checks.
The embodiment of the present invention also provides a kind of image demister, and Fig. 6 is the knot of image demister in one embodiment Structure schematic diagram.
A kind of image demister, including:
Display module 610, preview image is shown when taking pictures preview mode for entering;
Acquisition module 620, the visibility current for obtaining the preview image location;
Determining module 630, for determining haze concentration scale according to the visibility;And
Defogging module 640, for using corresponding defogging method to the preview image according to the haze concentration scale Carry out defogging processing.
Above-mentioned image demister can determine that haze does concentration scale according to the visibility of acquisition, for different hazes The preview image of concentration scale carries out adaptive defogging processing using corresponding defogging method, enhances defog effect, there is provided User experience.
In one embodiment, image demister also includes:
Evaluation module 650, the haze concentration for preview image described in the color histogram graph evaluation of preview image HSV components The accuracy of grade.
The embodiment of the present invention additionally provides a kind of computer-readable recording medium.A kind of computer-readable recording medium, its On be stored with computer program, the program realizes following steps when being executed by processor:
Preview mode and preview image is shown into taking pictures;
Obtain the current visibility in the preview image location;
Haze concentration scale is determined according to the visibility;
Defogging processing is carried out to the preview image using corresponding defogging method according to the haze concentration scale.
Above computer readable storage medium storing program for executing Computer program (instruction) when executed, being capable of can be shown according to acquisition Spend and determine that haze does concentration scale, carried out certainly using corresponding defogging method for the preview image of different haze concentration scales Defogging processing is adapted to, enhances defog effect, there is provided user experience.
In one embodiment, image defogging method, in addition to:
The accuracy of the haze concentration scale is determined according to the color histogram of preview image HSV components.
In one embodiment, the haze concentration scale includes:The grade 2 of the grade 1 of corresponding mist and corresponding thick fog;
When the haze concentration scale is 1 grade of grade, the preview image is entered using based on dark primary elder generation checking method The processing of row defogging;
When the haze concentration scale is for grade 2 or higher than grade 2, using based on atmospheric extinction coefficient and guiding filtering Method carries out defogging processing to the preview image.
It is in one embodiment, described that defogging processing is carried out to the preview image using based on dark primary elder generation checking method, Including:
Obtain the dark primary figure of preview image;
Air light value and coarse transmissivity are asked for according to the dark primary figure;
Bilateral filtering is carried out to the coarse transmissivity and obtains fine transmissivity;
Bilinear interpolation is carried out to the fine transmissivity, the fine transmissivity is returned to original size, is estimated Count transmissivity;
Defogging processing is carried out to the preview image according to the air light value, estimation transmissivity.
In one embodiment, it is described that the preview image is gone based on haze concentration factor and guiding filtering method Mist processing, including:
Haze weather Imaging physics model is built, wherein, the physical model is expressed as:E=Gβ(I-Ig)+Ig, in formula, GβFor haze concentration factor, I is preview image, IgFor the atmosphere light in environment;
The haze concentration factor is obtained according to the visibility;
The atmosphere light is estimated using the method for guiding filtering;
The haze concentration factor of the acquisition, atmosphere light are brought into the haze weather Imaging physics model to described Preview image carries out defogging processing.
In one embodiment, image defogging method, in addition to:
To the preview image degree of the being exposed processing and Auto Laves processing after defogging processing.
The embodiment of the present invention also provides a kind of computer equipment.Above computer equipment includes image processing circuit, figure As process circuit can utilize hardware and/or component software to realize, it may include define ISP (Image Signal Processing, picture signal processing) pipeline various processing units.Fig. 7 is that image processing circuit shows in one embodiment It is intended to.As shown in fig. 7, for purposes of illustration only, the various aspects of the image processing techniques related to the embodiment of the present invention are only shown.
As shown in fig. 7, image processing circuit includes ISP processors 740 and control logic device 750.Imaging device 710 is caught View data handled first by ISP processors 740, ISP processors 740 view data is analyzed with catch can be used for it is true The image statistics of fixed and/or imaging device 710 one or more control parameters.Imaging device 710 may include there is one The camera of individual or multiple lens 712 and imaging sensor 714.Imaging sensor 714 may include colour filter array (such as Bayer filters), imaging sensor 714 can obtain the luminous intensity caught with each imaging pixel of imaging sensor 714 and wavelength Information, and the one group of raw image data that can be handled by ISP processors 740 is provided.Sensor 720 can be connect based on sensor 720 Raw image data is supplied to ISP processors 740 by mouth type.The interface of sensor 720 can utilize SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface, other serial or parallel camera interfaces or The combination of above-mentioned interface.
ISP processors 740 handle raw image data pixel by pixel in various formats.For example, each image pixel can Bit depth with 8,10,12 or 14 bits, ISP processors 740 can be carried out at one or more images to raw image data Reason operation, statistical information of the collection on view data.Wherein, image processing operations can be by identical or different bit depth precision Carry out.
ISP processors 740 can also receive pixel data from video memory 730.For example, from the interface of sensor 720 by original Beginning pixel data is sent to video memory 730, and the raw pixel data in video memory 730 is available to ISP processors 740 is for processing.Video memory 730 can be independent in a part, storage device or electronic equipment for storage arrangement Private memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving the raw image data from the interface of sensor 720 or from video memory 730, ISP processing Device 740 can carry out one or more image processing operations, such as time-domain filtering.View data after processing can be transmitted to or image deposit Reservoir 730, to carry out other processing before shown.ISP processors 740 can also be from the receiving area of video memory 730 Data are managed, the image real time transfer in original domain and in RGB and YCbCr color spaces is carried out to above-mentioned processing data.Processing View data afterwards may be output to display 780, so that user watches and/or by graphics engine or GPU (Graphics Processing Unit, graphics processor) further processing.In addition, the output of ISP processors 740 also can be transmitted and be deposited to image Reservoir 730, and display 780 can read view data from video memory 730.In one embodiment, video memory 730 It can be configured as realizing one or more frame buffers.In addition, the output of ISP processors 740 can be transmitted to encoder/decoder 770, so as to encoding/decoding image data.The view data of coding can be saved, and display with the equipment of display 780 on it Preceding decompression.
View data after ISP processing can be transmitted to defogging module 760, to carry out defogging to image before shown Processing.Wherein, defogging module 760 is entered according to the haze concentration scale of determination using corresponding defogging method to the preview image The processing of row defogging.Meanwhile, it is capable to the accuracy of haze concentration scale is determined according to the color histogram of preview image HSV components. Defogging module 760 can be CPU (Central Processing Unit, central processing unit) or GPU in mobile terminal (Graphics Processing Unit, graphics processor) etc..After view data is carried out defogging processing by defogging module 760, View data after can defogging be handled is sent to encoder/decoder 770, so as to encoding/decoding image data.The figure of coding As data can be saved, and show with the equipment of display 780 before decompress.It is understood that at defogging module 760 View data after reason can directly be issued display 780 and shown without encoder/decoder 770.ISP processors View data after 740 processing can also first pass through encoder/decoder 770 and handle, and then be carried out again by defogging module 760 Processing.
The statistics that ISP processors 740 determine, which can be transmitted, gives the unit of control logic device 750.For example, statistics can wrap Include the image sensings such as automatic exposure, AWB, automatic focusing, flicker detection, black level compensation, the shadow correction of lens 712 The statistical information of device 714.Control logic device 750 may include the processor and/or micro-control for performing one or more routines (such as firmware) Device processed, one or more routines according to the statistics of reception, can determine imaging device 710 control parameter and control ginseng Number.For example, control parameter may include that the control parameter of sensor 720 (such as gain, time of integration of spectrum assignment), camera are dodged The combination of photocontrol parameter, the control parameter of lens 712 (such as focusing or zoom focal length) or these parameters.ISP control parameters It may include the gain level and color correction matrix for being used for AWB and color adjustment (for example, during RGB processing), with And the shadow correction parameter of lens 712.
It is the step of realizing image defogging method based on image processing techniques in Fig. 7 below:
Preview mode and preview image is shown into taking pictures;
Obtain the current visibility in the preview image location;
Haze concentration scale is determined according to the visibility;
Defogging processing is carried out to the preview image using corresponding defogging method according to the haze concentration scale.
During the execution of the computer program run on a processor, it can determine that haze does concentration according to the visibility of acquisition Grade, adaptive defogging processing is carried out using corresponding defogging method for the preview image of different haze concentration scales, increased Strong defog effect, there is provided user experience.
In one embodiment, image defogging method, in addition to:
The accuracy of the haze concentration scale is determined according to the color histogram of preview image HSV components.
In one embodiment, the haze concentration scale includes:The grade 2 of the grade 1 of corresponding mist and corresponding thick fog;
When the haze concentration scale is 1 grade of grade, the preview image is entered using based on dark primary elder generation checking method The processing of row defogging;
When the haze concentration scale is for grade 2 or higher than grade 2, using based on atmospheric extinction coefficient and guiding filtering Method carries out defogging processing to the preview image.
It is in one embodiment, described that defogging processing is carried out to the preview image using based on dark primary elder generation checking method, Including:
Obtain the dark primary figure of preview image;
Air light value and coarse transmissivity are asked for according to the dark primary figure;
Bilateral filtering is carried out to the coarse transmissivity and obtains fine transmissivity;
Bilinear interpolation is carried out to the fine transmissivity, the fine transmissivity is returned to original size, is estimated Count transmissivity;
Defogging processing is carried out to the preview image according to the air light value, estimation transmissivity.
In one embodiment, it is described that the preview image is gone based on haze concentration factor and guiding filtering method Mist processing, including:
Haze weather Imaging physics model is built, wherein, the physical model is expressed as:E=Gβ(I-Ig)+Ig, in formula, GβFor haze concentration factor, I is preview image, IgFor the atmosphere light in environment;
The haze concentration factor is obtained according to the visibility;
The atmosphere light is estimated using the method for guiding filtering;
The haze concentration factor of the acquisition, atmosphere light are brought into the haze weather Imaging physics model to described Preview image carries out defogging processing.
In one embodiment, image defogging method, in addition to:
To the preview image degree of the being exposed processing and Auto Laves processing after defogging processing.
One of ordinary skill in the art will appreciate that realize all or part of flow in above-described embodiment method, being can be with The hardware of correlation is instructed to complete by computer program, described program can be stored in a non-volatile computer and can be read In storage medium, the program is upon execution, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, described storage is situated between Matter can be magnetic disc, CD, read-only memory (Read-Only Memory, ROM) etc..
Embodiment described above only expresses the several embodiments of the present invention, and its description is more specific and detailed, but simultaneously Therefore the limitation to the scope of the claims of the present invention can not be interpreted as.It should be pointed out that for one of ordinary skill in the art For, without departing from the inventive concept of the premise, various modifications and improvements can be made, these belong to the guarantor of the present invention Protect scope.Therefore, the protection domain of patent of the present invention should be determined by the appended claims.

Claims (10)

  1. A kind of 1. image defogging method, it is characterised in that including:
    Preview mode and preview image is shown into taking pictures;
    Obtain the current visibility in the preview image location;
    Haze concentration scale is determined according to the visibility;
    Defogging processing is carried out to the preview image using corresponding defogging method according to the haze concentration scale.
  2. 2. image defogging method according to claim 1, it is characterised in that also include:
    The accuracy of the haze concentration scale is determined according to the color histogram of preview image HSV components.
  3. 3. image defogging method according to claim 1, it is characterised in that the haze concentration scale includes:It is corresponding thin The grade 2 of the grade 1 of mist and corresponding thick fog;
    When the haze concentration scale is 1 grade of grade, the preview image is gone using based on dark primary elder generation checking method Mist processing;
    When the haze concentration scale is for grade 2 or higher than grade 2, using based on atmospheric extinction coefficient and guiding filtering method Defogging processing is carried out to the preview image.
  4. 4. image defogging method according to claim 3, it is characterised in that described use is based on dark primary elder generation checking method pair The preview image carries out defogging processing, including:
    Obtain the dark primary figure of preview image;
    Air light value and coarse transmissivity are asked for according to the dark primary figure;
    Bilateral filtering is carried out to the coarse transmissivity and obtains fine transmissivity;
    Bilinear interpolation is carried out to the fine transmissivity, the fine transmissivity is returned to original size, it is saturating to obtain estimation Penetrate rate;
    Defogging processing is carried out to the preview image according to the air light value, estimation transmissivity.
  5. 5. image defogging method according to claim 3, it is characterised in that described to be filtered based on haze concentration factor and guiding Wave method carries out defogging processing to the preview image, including:
    Haze weather Imaging physics model is built, wherein, the physical model is expressed as:E=Gβ(I-Ig)+Ig, in formula, GβFor mist Haze concentration factor, I are preview image, IgFor the atmosphere light in environment;
    The haze concentration factor is obtained according to the visibility;
    The atmosphere light is estimated using the method for guiding filtering;
    The haze concentration factor of the acquisition, atmosphere light are brought into the haze weather Imaging physics model to the preview Image carries out defogging processing.
  6. 6. image defogging method according to claim 1, it is characterised in that also include:
    To the preview image degree of the being exposed processing and Auto Laves processing after defogging processing.
  7. A kind of 7. image demister, it is characterised in that including:
    Display module, preview image is shown when taking pictures preview mode for entering;
    Acquisition module, the visibility current for obtaining the preview image location;
    Determining module, for determining haze concentration scale according to the visibility, wherein, the haze concentration scale and the energy Degree of opinion is in inversely prroportional relationship;And
    Defogging module, for carrying out defogging using corresponding defogging method to the preview image according to the haze concentration scale Processing.
  8. 8. image defogging method according to claim 7, it is characterised in that also include:
    Evaluation module, for the haze concentration scale of preview image described in the color histogram graph evaluation of preview image HSV components Accuracy.
  9. 9. a kind of computer-readable recording medium, is stored thereon with computer program, it is characterised in that the program is held by processor The image defogging method as any one of claim 1 to 6 is realized during row.
  10. 10. a kind of mobile terminal, including memory, processor and storage are on a memory and the calculating that can run on a processor Machine program, it is characterised in that the figure as any one of claim 1 to 6 is realized during the computing device described program As defogging method.
CN201710624518.6A 2017-07-27 2017-07-27 Image defogging method and device, computer storage medium and mobile terminal Active CN107424133B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710624518.6A CN107424133B (en) 2017-07-27 2017-07-27 Image defogging method and device, computer storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710624518.6A CN107424133B (en) 2017-07-27 2017-07-27 Image defogging method and device, computer storage medium and mobile terminal

Publications (2)

Publication Number Publication Date
CN107424133A true CN107424133A (en) 2017-12-01
CN107424133B CN107424133B (en) 2020-01-10

Family

ID=60430486

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710624518.6A Active CN107424133B (en) 2017-07-27 2017-07-27 Image defogging method and device, computer storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN107424133B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107767353A (en) * 2017-12-04 2018-03-06 河南工业大学 A kind of adapting to image defogging method based on definition evaluation
CN108038831A (en) * 2017-12-19 2018-05-15 北京理工大学 A kind of color video defogging method based on atmospherical scattering model
CN108460743A (en) * 2018-03-19 2018-08-28 西安因诺航空科技有限公司 A kind of unmanned plane image defogging algorithm based on dark
CN109584186A (en) * 2018-12-25 2019-04-05 西北工业大学 A kind of unmanned aerial vehicle onboard image defogging method and device
CN109658359A (en) * 2018-12-26 2019-04-19 联创汽车电子有限公司 Aerosol detection system and its detection method
CN110189259A (en) * 2018-02-23 2019-08-30 深圳富泰宏精密工业有限公司 Image removes haze method, electronic equipment and computer readable storage medium
CN110992293A (en) * 2019-12-13 2020-04-10 杭州电子科技大学 Self-adaptive video defogging method and device
CN111738959A (en) * 2020-06-30 2020-10-02 福州大学 FPGA-based real-time demisting method for video image
CN111899309A (en) * 2020-07-31 2020-11-06 上海眼控科技股份有限公司 Uphill fog detection method and device, computer equipment and readable storage medium
CN114648467A (en) * 2022-05-18 2022-06-21 中山大学深圳研究院 Image defogging method and device, terminal equipment and computer readable storage medium
CN115412669A (en) * 2022-08-26 2022-11-29 清华大学 Foggy day imaging method and device based on image signal-to-noise ratio analysis

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2213219A1 (en) * 2007-11-21 2010-08-04 Panasonic Corporation Endoscope device, camera device for endoscope, and defogging method
KR20100104262A (en) * 2009-03-17 2010-09-29 주식회사 현대오토넷 Apparatus for auto defogging and method using thereof
CN105631827A (en) * 2015-12-28 2016-06-01 四川大学 Vehicle video demisting method and system
CN105809647A (en) * 2016-03-31 2016-07-27 北京奇虎科技有限公司 Automatic defogging photographing method, device and equipment
CN105913390A (en) * 2016-04-07 2016-08-31 潍坊学院 Image defogging method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2213219A1 (en) * 2007-11-21 2010-08-04 Panasonic Corporation Endoscope device, camera device for endoscope, and defogging method
KR20100104262A (en) * 2009-03-17 2010-09-29 주식회사 현대오토넷 Apparatus for auto defogging and method using thereof
CN105631827A (en) * 2015-12-28 2016-06-01 四川大学 Vehicle video demisting method and system
CN105809647A (en) * 2016-03-31 2016-07-27 北京奇虎科技有限公司 Automatic defogging photographing method, device and equipment
CN105913390A (en) * 2016-04-07 2016-08-31 潍坊学院 Image defogging method and system

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107767353A (en) * 2017-12-04 2018-03-06 河南工业大学 A kind of adapting to image defogging method based on definition evaluation
CN108038831A (en) * 2017-12-19 2018-05-15 北京理工大学 A kind of color video defogging method based on atmospherical scattering model
CN110189259B (en) * 2018-02-23 2022-07-08 荷兰移动驱动器公司 Image haze removing method, electronic device and computer readable storage medium
CN110189259A (en) * 2018-02-23 2019-08-30 深圳富泰宏精密工业有限公司 Image removes haze method, electronic equipment and computer readable storage medium
CN108460743A (en) * 2018-03-19 2018-08-28 西安因诺航空科技有限公司 A kind of unmanned plane image defogging algorithm based on dark
CN109584186A (en) * 2018-12-25 2019-04-05 西北工业大学 A kind of unmanned aerial vehicle onboard image defogging method and device
CN109658359A (en) * 2018-12-26 2019-04-19 联创汽车电子有限公司 Aerosol detection system and its detection method
CN109658359B (en) * 2018-12-26 2023-06-13 联创汽车电子有限公司 Atmospheric suspended matter detection system and detection method thereof
CN110992293A (en) * 2019-12-13 2020-04-10 杭州电子科技大学 Self-adaptive video defogging method and device
CN111738959B (en) * 2020-06-30 2022-08-19 福州大学 Real-time defogging method for video image based on FPGA
CN111738959A (en) * 2020-06-30 2020-10-02 福州大学 FPGA-based real-time demisting method for video image
CN111899309A (en) * 2020-07-31 2020-11-06 上海眼控科技股份有限公司 Uphill fog detection method and device, computer equipment and readable storage medium
CN114648467A (en) * 2022-05-18 2022-06-21 中山大学深圳研究院 Image defogging method and device, terminal equipment and computer readable storage medium
CN115412669A (en) * 2022-08-26 2022-11-29 清华大学 Foggy day imaging method and device based on image signal-to-noise ratio analysis

Also Published As

Publication number Publication date
CN107424133B (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN107424133A (en) Image defogging method, device, computer can storage medium and mobile terminals
Wang et al. Single image dehazing based on the physical model and MSRCR algorithm
CN107424198B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
Tang et al. Investigating haze-relevant features in a learning framework for image dehazing
WO2021022983A1 (en) Image processing method and apparatus, electronic device and computer-readable storage medium
KR101470831B1 (en) Appatatus for image dehazing using the user controllable radical root operation
CN107493432A (en) Image processing method, device, mobile terminal and computer-readable recording medium
CN104091310A (en) Image defogging method and device
CN107704798B (en) Image blurring method and device, computer readable storage medium and computer device
CN107194900A (en) Image processing method, device, computer-readable recording medium and mobile terminal
CN107277299A (en) Image processing method, device, mobile terminal and computer-readable recording medium
CN108022225A (en) Based on the improved dark channel prior image defogging algorithm of quick Steerable filter
CN107317969A (en) Image defogging method, device, computer can storage medium and mobile terminals
CN107424134B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
CN107277369B (en) Image processing method, device, computer readable storage medium and computer equipment
CN107392870B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
CN107454319B (en) Image processing method, image processing device, mobile terminal and computer readable storage medium
Fuh et al. Mcpa: A fast single image haze removal method based on the minimum channel and patchless approach
CN107454328B (en) Image processing method, device, computer readable storage medium and computer equipment
CN107295261A (en) Image defogging processing method, device, storage medium and mobile terminal
CN107464225A (en) Image processing method, device, computer-readable recording medium and mobile terminal
CN107230373A (en) Information recommendation method, device, computer-readable recording medium and mobile terminal
CN107481199B (en) Image defogging method and device, storage medium and mobile terminal
CN107317970B (en) Image processing method, device, computer readable storage medium and computer equipment
CN107424135A (en) Image processing method, device, computer-readable recording medium and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: Changan town in Guangdong province Dongguan 523860 usha Beach Road No. 18

Applicant before: Guangdong Opel Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant