CN107194901A - Image processing method, device, computer equipment and computer-readable recording medium - Google Patents
Image processing method, device, computer equipment and computer-readable recording medium Download PDFInfo
- Publication number
- CN107194901A CN107194901A CN201710624507.8A CN201710624507A CN107194901A CN 107194901 A CN107194901 A CN 107194901A CN 201710624507 A CN201710624507 A CN 201710624507A CN 107194901 A CN107194901 A CN 107194901A
- Authority
- CN
- China
- Prior art keywords
- defogging
- image
- air light
- value
- transmissivity
- 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
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 30
- 238000012545 processing Methods 0.000 claims abstract description 106
- 238000000034 method Methods 0.000 claims abstract description 21
- 238000011946 reduction process Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 abstract description 9
- 238000003384 imaging method Methods 0.000 description 11
- 239000003595 mist Substances 0.000 description 11
- 238000012937 correction Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 230000009467 reduction Effects 0.000 description 3
- 241000208340 Araliaceae Species 0.000 description 1
- 244000283207 Indigofera tinctoria Species 0.000 description 1
- 235000005035 Panax pseudoginseng ssp. pseudoginseng Nutrition 0.000 description 1
- 235000003140 Panax quinquefolius Nutrition 0.000 description 1
- 230000008901 benefit Effects 0.000 description 1
- 230000033228 biological regulation Effects 0.000 description 1
- 239000000872 buffer Substances 0.000 description 1
- 239000003086 colorant Substances 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 230000006837 decompression Effects 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 235000008434 ginseng Nutrition 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 230000006641 stabilisation Effects 0.000 description 1
- 238000011105 stabilization Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 238000002834 transmittance Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/73—Deblurring; Sharpening
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The present invention relates to a kind of image processing method, device and computer equipment and computer-readable recording medium.Methods described includes:Same Scene is shot by black and white camera, multiple black white images are obtained, and the Same Scene is shot by colour imagery shot, coloured image is obtained;The corresponding maximum brightness value of each black white image is obtained, maximum brightness value corresponding to each black white image is weighted processing and obtains target brightness value, regard the target brightness value as air light value;Original transmissivity is obtained according to the air light value;Defogging processing is carried out to the coloured image according to the air light value and original transmissivity.The amount of calculation for obtaining air light value is small, improves defogging efficiency.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of image processing method, device, computer equipment and
Computer-readable recording medium.
Background technology
With developing rapidly for electronic technology, various electronic equipments carry camera, and by camera, user can be at any time
Landscape or picture of autodyning that record everywhere is seen.It is affected by environment, mist is commonly present in the image of shooting, image is reduced
Quality.Traditional defogging method obtains air light value, calculates complicated, defogging efficiency is low.
The content of the invention
The embodiment of the present invention provides a kind of image processing method, device, computer equipment and computer-readable recording medium,
Amount of calculation can be reduced, defogging efficiency is improved.
A kind of image processing method, including:
Same Scene is shot by black and white camera, multiple black white images are obtained, and institute is shot by colour imagery shot
Same Scene is stated, coloured image is obtained;
The corresponding maximum brightness value of each black white image is obtained, maximum brightness value corresponding to each black white image is entered
Row weighting processing obtains target brightness value, regard the target brightness value as air light value;
Original transmissivity is obtained according to the air light value;
Defogging processing is carried out to the coloured image according to the air light value and original transmissivity.
A kind of image processing apparatus, including:
Image capture module, for shooting Same Scene by black and white camera, obtains multiple black white images, and pass through
Colour imagery shot shoots the Same Scene, obtains coloured image;
First acquisition module, for obtaining the corresponding maximum brightness value of each black white image, to each black white image
Corresponding maximum brightness value is weighted processing and obtains target brightness value, regard the target brightness value as air light value;
Second acquisition module, for obtaining original transmissivity according to the air light value;
Defogging processing module, for being carried out according to the air light value and original transmissivity to the coloured image at defogging
Reason.
Computer-readable instruction is stored in a kind of computer equipment, including memory and processor, the memory, institute
When stating instruction by the computing device so that the computing device described image processing method.
One or more non-volatile computer readable storage medium storing program for executing comprising computer executable instructions, are calculated when described
When machine executable instruction is executed by one or more processors so that the computing device described image processing method.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is the accompanying drawing used required in technology description to be briefly described, it should be apparent that, drawings in the following description are only this
Some embodiments of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can be with
Other accompanying drawings are obtained according to these accompanying drawings.
Fig. 1 is the application environment schematic diagram of image processing method in one embodiment;
Fig. 2 is the flow chart of image processing method in one embodiment;
Fig. 3 is the flow chart of image processing method in another embodiment;
Fig. 4 is the flow chart of image processing method in another embodiment;
Fig. 5 is the flow chart of image processing method in another embodiment;
Fig. 6 is the structured flowchart of image processing apparatus in one embodiment;
Fig. 7 is the structured flowchart of image processing apparatus in another embodiment;
Fig. 8 is the structured flowchart of image processing apparatus in another embodiment;
Fig. 9 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.
It is appreciated that term " first " used in the present invention, " second " etc. can be used to describe various elements herein,
But these elements should not be limited by these terms.These terms are only used for distinguishing first element and another element.Citing comes
Say, without departing from the scope of the invention, the first acquisition module can be referred to as the second acquisition module, and similarly,
Second acquisition module can be referred to as the first acquisition module.First acquisition module and the second acquisition module both acquisition module,
But it is not same acquisition module.
Fig. 1 is the application environment schematic diagram of image processing method in one embodiment.As shown in figure 1, the application environment bag
Include mobile terminal 1 10 and scene 120 with black and white camera and colour imagery shot.Imaged by the black and white in mobile terminal 1 10
Head shoots a scene 120 and obtains multiple black white images, then obtains coloured image by colour imagery shot shooting Same Scene, obtains
The corresponding maximum brightness value of each black white image, maximum brightness value corresponding to each black white image, which is weighted, to be handled
To target brightness value, using the target brightness value as air light value, original transmissivity, atmosphere light are obtained further according to air light value
It is worth amount of calculation small, defogging processing is carried out to coloured image according to air light value and original transmissivity, defogging efficiency is improved.
Fig. 2 is the flow chart of image processing method in one embodiment.As shown in figure 1, a kind of image processing method, bag
Include:
Step 202, Same Scene is shot by black and white camera, obtains multiple black white images, and pass through colour shooting
Head shoots the Same Scene, obtains coloured image.
Specifically, black and white camera refers to the camera for shooting black white image.Colour imagery shot is to be used to shoot coloured silk
The camera of color image.For Same Scene, it can be shot by black and white camera and obtain black and white camera, then pass through colour shooting
Head, which is shot, obtains coloured image.Scene refers to the place to be shot, such as zoo, botanical garden, sky, coastline place,
Or the place where people etc..
One group of black white image is shot to Same Scene by black and white camera.One group of black white image has multiple artwork masters
Picture.
Step 204, the corresponding maximum brightness value of each black white image, maximum corresponding to each black white image are obtained
Brightness value is weighted processing and obtains target brightness value, regard the target brightness value as air light value.
Specifically, extract every black white image in each pixel brightness value, by brightness value from small to large or from greatly to
It is small to be ranked up, filter out the maximum brightness value in every black white image.Can also, directly compare the brightness of each pixel
Value, filters out the maximum brightness value of every black white image.
The maximum brightness value of multiple black white images is got, the weights of black white image can be set according to shooting order, all
Corresponding weights of black white image and for 1.For example have taken 5 black white images, corresponding weights set can for 0.3,0.2,0.2,
0.2nd, 0.1, or corresponding weights are set to 0.2,0.2,0.2,0.2,0.2 etc., not limited to this.According to maximum in black white image
Brightness value and corresponding weights weighted sum obtain target brightness value, regard target brightness value as air light value.
Step 206, original transmissivity is obtained according to the air light value.
Specifically, get after air light value, original transmissivity can be calculated by the first checking method of dark primary.
Step 208, defogging processing is carried out to the coloured image according to the air light value and original transmissivity.
Specifically, get after air light value and original transmissivity, can be by entering by primary colors priori color image
The processing of row defogging.
The step of carrying out defogging based on dark primary priori color image includes:
Obtain atmospherical scattering model:
I (x)=J (x) t (x)+A (1-t (x)) formula (1)
Wherein, I (x) represents the image containing mist for needing to carry out defogging processing, and J (x) represents to carry out at defogging image containing mist
The fog free images obtained after reason, x represents the locus of a certain pixel in image, and t (x) is original transmissivity, and A is atmosphere light
Value.Air light value can be calculated by black white image and obtained, and can also pass through the corresponding of air light value and weather condition and current time
Relation acquisition.Under normal conditions, the pixel that can select maximum brightness value in black white image is used as the estimation of air light value.This reality
Apply in example, air light value shoots black white image by black and white camera, maximum brightness value in black white image is obtained, by high-high brightness
Value is used as air light value.Assuming that A is given value, RGB (Red (red), Green (green), Blue (indigo plant)) three leads in coloured image
There is channel value very low passage in road, and the channel value can then be obtained close to zero:
In formula (2), Jdark(x) dark channel image, J are representedc(y) each Color Channel of coloured image, Ω (x) are represented
Represent a window centered on pixel x.Original transmissivity can be got by formula (2), be:
In formula (3),As dark primary value of the image containing mist in x fields.
Original transmissivity can be sought out by bringing air light value into formula (3), then regard coloured image as I (x), atmosphere light
Value A and original transmissivity t (x), which bring formula (1) into, can ask for the coloured image J (x) after defogging.
In the present embodiment, multiple black white images are shot by black and white camera, obtain most light in multiple black white images
Multiple maximum brightness value weighted sums will be obtained target brightness value by angle value, using target brightness value as air light value, obtain big
The amount of calculation of gas light value is small, and speed is fast, original transmissivity is obtained further according to air light value, according to air light value and original transmissivity
Defogging is carried out to the coloured image that Same Scene is shot, defogging efficiency is improved, and according to the high-high brightness of multiple black white images
Value asks for air light value, is accurately calculated, and defogging is more accurate.
In one embodiment, original transmissivity is adjusted the weights ω that can be introduced between one 0 to 1, then most
The i.e. transmissivity expression formula of defogging parameter asked for eventually is as follows:
In formula (4), Ic(y) preview image I (x) pixel R, G, B triple channel is represented;ω is referred to as the defogging degree factor,
ω is smaller to represent that defogging degree is smaller, and ω is bigger to represent that defogging degree is bigger.
Transmissivity is asked for using formula (4) according to air light value and the defogging degree factor, then using coloured image as I (x),
Air light value A and original transmissivity t (x), which bring formula (1) into, can ask for the coloured image J (x) after defogging.
In addition, in order to ensure defog effect, a threshold value t can be set to transmissivity0, then scenery is when fogless:
Fig. 3 is the flow chart of image processing method in another embodiment.As shown in figure 3, a kind of image processing method, with
The difference of method is to use different transmissivity defoggings for different passages in Fig. 2, including:
Step 302, Same Scene is shot by black and white camera, obtains multiple black white images, and pass through colour shooting
Head shoots the Same Scene, obtains coloured image.
Step 304, the corresponding maximum brightness value of each black white image, maximum corresponding to each black white image are obtained
Brightness value is weighted processing and obtains target brightness value, regard the target brightness value as air light value.
Specifically, the brightness value of each pixel in black white image is extracted, brightness value is entered from small to large or from big to small
Row sequence, filters out maximum brightness value, regard maximum brightness value as air light value.
Step 306, original transmissivity is obtained according to the air light value.
Specifically, get after air light value, original transmissivity can be calculated by the first checking method of dark primary.
Step 308, the transmissivity factor of each passage in default tri- passages of RGB is obtained.
For the mist of same concentrations, what the influence degree to the wave band of RGB three was incremented by, the transmissivity of tri- wave bands of RGB
It is ordered as:Red wavelength region rate highest, green wave band takes second place, and blue wave band is minimum;Therefore in the region for having mist, to tri- wave bands of RGB
Processing intensity should be incremented by.
The concentration of mist is denseer, and mist is bigger to the influence difference of tri- wave bands of RGB, to the processing intensity difference of tri- wave bands of RGB
It is different also should be bigger.Simultaneously in the region without mist, tri- wave bands of RGB are not processed.
Therefore, based on original transmissivity, it is transmissivity factor W to introduce two adjustment factorsGAnd WB.Using the two coefficients,
Implement different defogging intensity to the wave bands of RGB tri-.
T∈[0,1];TR=t
WG=(a+b*t)2;TG=WG*t
WB=(c+d*t)2;TB=WB*t
Wherein, t be according to the first checking method of dark primary seek out come original transmissivity, TR、TG、TBRepresent respectively and be directed to RGB
The wavelength region rate of three wave bands, different transmittance values represent different to the processing intensity of three wave bands.Parameter a, b, c, d can
According to actual conditions value, such as a can be that 0.9, b can be that 0.1, c can be that 0.7, d can be 0.3.
Step 310, each passage in tri- passages of RGB is obtained according to the transmissivity factor and the original transmissivity
Wavelength region rate.
The respective wavelength region rate of tri- passages of RGB can obtain according to the transmissivity factor and original transmissivity.
Step 312, according to RGB of the wavelength region rate of the air light value and RGB each passage to the coloured image
Each passage carries out defogging processing.
Image processing method in the present embodiment, shoots black white image by black and white camera, obtains in multiple black white images
Maximum brightness value, target brightness value will be obtained to multiple maximum brightness value weighted sums, and regard target brightness value as atmosphere light
Value, the amount of calculation for obtaining air light value is small, and speed is fast, and asks for air light value according to the maximum brightness value of multiple black white images,
It is accurately calculated, defogging is more accurate;Original transmissivity is obtained further according to air light value, the transmissivity of RGB triple channels is got
The factor, the wavelength region rate of each passage is obtained according to the regulation of the transmissivity factor and original transmissivity, using each passage correspondence
Wavelength region rate defogging processing is carried out to coloured image, prevent image partially blue, both improved defogging efficiency, realize again true
Natural color rendition.
Fig. 4 is the flow chart of image processing method in another embodiment.As shown in figure 4, a kind of image processing method, with
The difference of method is in Fig. 2, adds defogging grade, including:
Step 402, Same Scene is shot by black and white camera, obtains multiple black white images, and pass through colour shooting
Head shoots the Same Scene, obtains coloured image.
Step 404, the corresponding maximum brightness value of each black white image, maximum corresponding to each black white image are obtained
Brightness value is weighted processing and obtains target brightness value, regard the target brightness value as air light value.
Step 406, original transmissivity is obtained according to the air light value.
Step 408, defogging grade is obtained, the corresponding defogging degree factor is obtained according to the defogging grade.
In one embodiment, the corresponding pass between different defogging grades and the defogging degree factor can be pre-set
System.For example, can provide, 6 defogging grades are for selection, the different defogging degree factor of each defogging grade correspondence, for example
When defogging grade is zero level, its defogging rating factor ω 0=0.50;When defogging grade is one-level, its defogging rating factor ω 1=
0.60, the like.The preset defogging degree factor corresponding with defogging grade can be searched according to defogging grade.
Step 410, the coloured image is gone according to the defogging degree factor, air light value and original transmissivity
Mist processing.
New transmissivity is calculated using formula (4), coloured image carried out further according to new transmissivity and air light value
Defogging processing.
Image processing method in the present embodiment, shoots black white image by black and white camera, obtains in multiple black white images
Maximum brightness value, target brightness value will be obtained to multiple maximum brightness value weighted sums, and regard target brightness value as atmosphere light
Value, the amount of calculation for obtaining air light value is small, and speed is fast, and original transmissivity is obtained further according to air light value, obtains defogging grade, root
The corresponding defogging degree factor is obtained according to defogging grade, is adjusted and is generated newly according to the original transmissivity of defogging degree factor pair
Transmissivity, can carry out corresponding defogging according to the defogging demand of user, meet the demand of different user.
Fig. 5 is the flow chart of image processing method in another embodiment.As shown in figure 5, a kind of image processing method, bag
Include:
Step 502, Same Scene is shot by black and white camera, obtains multiple black white images, and pass through colour shooting
Head shoots the Same Scene, obtains coloured image.
Step 504, the corresponding maximum brightness value of each black white image, maximum corresponding to each black white image are obtained
Brightness value is weighted processing and obtains target brightness value, regard the target brightness value as air light value.
Step 506, original transmissivity is obtained according to the air light value.
Step 508, defogging grade is obtained, the corresponding defogging degree factor is obtained according to the defogging grade.
Step 510, the transmissivity factor of each passage in default tri- passages of RGB is obtained.
Step 512, RGB tri- is obtained according to the transmissivity factor, the defogging degree factor and the original transmissivity to lead to
The wavelength region rate of each passage in road.
Step 514, according to RGB of the wavelength region rate of the air light value and RGB each passage to the coloured image
Each passage carries out defogging processing.
Wherein, step 508 and 510 is without sequencing.
Image processing method in the present embodiment, shoots black white image by black and white camera, obtains in multiple black white images
Maximum brightness value, target brightness value will be obtained to multiple maximum brightness value weighted sums, and regard target brightness value as atmosphere light
Value, the amount of calculation for obtaining air light value is small, and speed is fast, obtains original transmissivity further according to air light value, gets RGB triple channels
The transmissivity factor, adjusted according to the transmissivity factor and original transmissivity obtain the broadcasting transmissivity of each passage, using each
The corresponding wavelength region rate of passage carries out defogging processing to coloured image, prevents image partially blue, has both improved defogging efficiency, and real
The color rendition of true nature is showed;Defogging demand also according to user carries out corresponding defogging, meets the demand of different user.
In one embodiment, above-mentioned image processing method also includes:Detect the noise of the coloured image after defogging processing
Quantity;If the noise quantity is more than predetermined threshold value, noise reduction process is carried out to the coloured image after defogging processing.
Specifically, predetermined threshold value can as needed set or is worth to according to historical statistics.By carrying out noise reduction to image,
Improve the quality of image.
In one embodiment, above-mentioned image processing method also includes:Obtain each picture in the coloured image after defogging processing
The brightness value of vegetarian refreshments;If the brightness value is less than predetermined luminance value, the brightness value is adjusted for predetermined luminance value.
Predetermined luminance value can be empirical value, or be arranged as required to.By adjusting brightness value, image after defogging can be improved
Quality.
Fig. 6 is the structured flowchart of image processing apparatus in one embodiment.As shown in fig. 6, a kind of image processing apparatus
600, including image capture module 602, the first acquisition module 604, the second acquisition module 606, defogging processing module 608.Wherein:
Image capture module 602 is used to shoot Same Scene by black and white camera, obtains multiple black white images, Yi Jitong
Cross colour imagery shot and shoot the Same Scene, obtain coloured image.
First acquisition module 604 is used to obtain the corresponding maximum brightness value of each black white image, to each artwork master
Target brightness value is obtained as corresponding maximum brightness value is weighted processing, the target brightness value is regard as air light value.
Second acquisition module 606 is used to obtain original transmissivity according to the air light value.
Defogging processing module 608 is used to carry out defogging to the coloured image according to the air light value and original transmissivity
Processing.
Image processing apparatus in the present embodiment, shoots black white image by black and white camera, obtains in multiple black white images
Maximum brightness value, target brightness value will be obtained to multiple maximum brightness value weighted sums, and regard target brightness value as atmosphere light
Value, the amount of calculation for obtaining air light value is small, and speed is fast, and original transmissivity is obtained further according to air light value, according to air light value and
The coloured image that original transmissivity is shot to Same Scene carries out defogging, improves defogging efficiency, and according to multiple black white images
Maximum brightness value ask for air light value, be accurately calculated, defogging is more accurate.
Fig. 7 is the structured flowchart of image processing apparatus in another embodiment.As shown in fig. 7, a kind of image processing apparatus
700, including image capture module 702, the first acquisition module 704, the second acquisition module 706, the 3rd acquisition module the 708, the 4th
Acquisition module 710, defogging processing module 712.Wherein:Image capture module 702, the first acquisition module 704, the second acquisition module
706 modules corresponding with Fig. 6 have identical effect.
3rd acquisition module 708 is used for after the original transmissivity according to air light value acquisition, obtains default
Tri- passages of RGB in each passage the transmissivity factor.
4th acquisition module 710 is used to obtain tri- passages of RGB according to the transmissivity factor and the original transmissivity
In each passage wavelength region rate.
Defogging processing module 712 is additionally operable to the wavelength region rate according to the air light value and RGB each passage to described
Each passage of the RGB of coloured image carries out defogging processing.
Image processing apparatus in the present embodiment, shoots black white image by black and white camera, obtains in multiple black white images
Maximum brightness value, target brightness value will be obtained to multiple maximum brightness value weighted sums, and regard target brightness value as atmosphere light
Value, the amount of calculation for obtaining air light value is small, and speed is fast, obtains original transmissivity further according to air light value, gets RGB triple channels
The transmissivity factor, adjusted according to the transmissivity factor and original transmissivity obtain the wavelength region rate of each passage, using each
The corresponding wavelength region rate of passage carries out defogging processing to coloured image, prevents image partially blue, has both improved defogging efficiency, and real
The color rendition of true nature is showed.
Fig. 8 is the structured flowchart of image processing apparatus in another embodiment.As shown in figure 8, a kind of image processing apparatus
800, including image capture module 802, the first acquisition module 804, the second acquisition module 806, defogging grade acquisition module 808,
Defogging processing module 810.Wherein:Image capture module 802, the first acquisition module 804, the second acquisition module 806 with it is right in Fig. 6
The module answered has identical effect.
Defogging grade acquisition module 808 is used for after the original transmissivity according to air light value acquisition, obtains
Defogging grade.
Defogging processing module 810 is used for according to the defogging grade, air light value and original transmissivity to the cromogram
As carrying out defogging processing.
In one embodiment, a kind of image processing apparatus includes image capture module, the first acquisition module, the second acquisition
Module, the 3rd acquisition module, defogging grade acquisition module, the 4th acquisition module, defogging processing module.Image capture module is used for
Same Scene is shot by black and white camera, multiple black white images are obtained, and the same field is shot by colour imagery shot
Scape, obtains coloured image;First acquisition module is used to obtain the corresponding maximum brightness value of each black white image, black to described each
The white corresponding maximum brightness value of image is weighted processing and obtains target brightness value, regard the target brightness value as atmosphere light
Value;Second acquisition module is used to obtain original transmissivity according to the air light value;Defogging grade acquisition module is gone for acquisition
Mist grade, the corresponding defogging degree factor is obtained according to the defogging grade;3rd acquisition module is used to obtain default RGB tri-
The transmissivity factor of each passage in individual passage;4th acquisition module is used for according to the transmissivity factor, the defogging degree factor
And the original transmissivity obtains the wavelength region rate of each passage in tri- passages of RGB;Defogging processing module is used for according to institute
Stating the wavelength region rate of air light value and RGB each passage, each passage carries out defogging processing to the RGB of the coloured image.
In one embodiment, above-mentioned image processing apparatus may also include detection module and noise reduction module.The detection mould
Block is used for the noise quantity for detecting the coloured image after defogging processing;It is more than in advance if the noise reduction module is used for the noise quantity
If threshold value, then noise reduction process is carried out to the coloured image after defogging processing.
In one embodiment, above-mentioned image processing apparatus may also include luminance acquisition module and brightness adjusting section.It is bright
Degree acquisition module is used for the brightness value for obtaining each pixel in the coloured image after defogging processing.If brightness adjusting section is used for institute
Brightness value is stated less than predetermined luminance value, then adjusts the brightness value for predetermined luminance value.
Predetermined luminance value can be empirical value, or be arranged as required to.By adjusting brightness value, image after defogging can be improved
Quality.
The division of modules is only used for for example, in other embodiments, will can push away in above-mentioned image processing apparatus
Recommend information generation device and be divided into different modules as required, to complete all or part of above-mentioned recommendation information generating means
Function.
The embodiment of the present invention additionally provides a kind of computer-readable recording medium.It is one or more executable comprising computer
The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors
When so that the image processing method described in the computing device embodiment of the present invention.
The embodiment of the present invention also provides a kind of computer equipment.A kind of computer equipment, including memory and processor, institute
State and computer-readable instruction is stored in memory, when the instruction is by the computing device so that this hair of processor
Image processing method described in bright embodiment.
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 be realized using hardware and/or component software, it may include define ISP (Image Signal
Processing, picture signal processing) pipeline various processing units.Fig. 9 is that image processing circuit shows in one embodiment
It is intended to.As shown in figure 9, for purposes of illustration only, only showing the various aspects of the image processing techniques related to the embodiment of the present invention.
As shown in figure 9, image processing circuit includes ISP processors 940 and control logic device 950.Imaging device 910 is caught
View data handled first by ISP processors 940, ISP processors 940 view data is analyzed with catch can be used for it is true
The image statistics of one or more control parameters of fixed and/or imaging device 910.Imaging device 910 may include there is one
The camera of individual or multiple lens 912 and imaging sensor 914.Imaging sensor 914 may include colour filter array (such as
Bayer filters), imaging sensor 914 can obtain the luminous intensity caught with each imaging pixel of imaging sensor 914 and wavelength
Information, and the one group of raw image data that can be handled by ISP processors 940 is provided.Sensor 920 can be connect based on sensor 920
Raw image data is supplied to ISP processors 940 by mouth type.The interface of sensor 920 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.Sensor 920 can be used for the parameter for providing image procossing, such as stabilization parameter, gain parameter.Imaging is set
Standby 910 may include black and white camera and colour imagery shot.Black and white camera gathers black white image, colour imagery shot collection and black and white
The coloured image of camera Same Scene.
ISP processors 940 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 940 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 940 can also receive pixel data from video memory 930.For example, from the interface of sensor 920 by original
The raw pixel data that beginning pixel data is sent in video memory 930, video memory 930 is available to ISP processors
940 is for processing.Video memory 930 can be independent in a part, storage device or the electronic equipment of 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 920 or from video memory 930, ISP processing
Device 940 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 930, to carry out other processing before shown.ISP processors 940 are from the reception processing number of video memory 930
According to, and the image real time transfer in original domain and in RGB and YCbCr color spaces is carried out to the processing data.After processing
View data may be output to display 980, for user watch and/or by graphics engine or GPU (Graphics
Processing Unit, graphics processor) further processing.In addition, the output of ISP processors 940 also can be transmitted and be deposited to image
Reservoir 930, and display 980 can read view data from video memory 930.In one embodiment, video memory 930
It can be configured as realizing one or more frame buffers.In addition, the output of ISP processors 940 can be transmitted to encoder/decoder
970, so as to encoding/decoding image data.The view data of coding can be saved, and in display and the equipment of display 980 it
Preceding decompression.
View data after ISP processing can be transmitted to defogging module 960, to carry out defogging to image before shown
Processing.960 pairs of defogging module obtains corresponding maximum brightness value in multiple black white images, corresponding to each black white image
Maximum brightness value is weighted processing and obtains target brightness value, using the target brightness value as air light value, according to atmosphere light
Value obtains original transmissivity, and defogging processing etc. is carried out to coloured image according to air light value and original transmissivity.Defogging module 960
View data is carried out after defogging processing, the view data after can defogging be handled is sent to encoder/decoder 970, so as to
Encoding/decoding image data.The view data of coding can be saved, and in display and the equipment of display 980 before decompress.
It is understood that the view data after defogging module 960 is handled can directly be issued aobvious without encoder/decoder 970
Show that device 980 is shown.View data after the processing of ISP processors 940 can also first pass through encoder/decoder 970 and handle,
Then handled again by defogging module 960.Wherein, defogging module 960 or encoder/decoder 970 can be mobile terminal
Middle CPU (Central Processing Unit, central processing unit) or GPU (Graphics Processing Unit, figure
Processor) etc..
The statistics that ISP processors 940 are determined, which can be transmitted, gives the unit of control logic device 950.For example, statistics can be wrapped
Include the image sensings such as automatic exposure, AWB, automatic focusing, flicker detection, black level compensation, the shadow correction of lens 912
The statistical information of device 914.Control logic device 950 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 910 control parameter and control ginseng
Number.For example, control parameter may include that the control parameter of sensor 920 (such as the time of integration of gain, spectrum assignment), camera dodge
The combination of photocontrol parameter, the control parameter of lens 912 (for example focusing on or zoom focal length) or these parameters.ISP control parameters
It may include to be used for AWB and the gain level and color correction matrix of color adjustment (for example, during RGB processing), with
And the shadow correction parameter of lens 912.
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 it describes 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 image processing method, it is characterised in that including:
Same Scene is shot by black and white camera, multiple black white images are obtained, and shoot described same by colour imagery shot
One scene, obtains coloured image;
The corresponding maximum brightness value of each black white image is obtained, maximum brightness value corresponding to each black white image is added
Power processing obtains target brightness value, regard the target brightness value as air light value;
Original transmissivity is obtained according to the air light value;
Defogging processing is carried out to the coloured image according to the air light value and original transmissivity.
2. according to the method described in claim 1, it is characterised in that described according to the original transmissivity of air light value acquisition
The step of after, methods described also includes:
Obtain the transmissivity factor of each passage in default tri- passages of RGB;
The wavelength region rate of each passage in tri- passages of RGB is obtained according to the transmissivity factor and the original transmissivity;
It is described to include the step of carry out defogging processing to the coloured image according to the air light value and original transmissivity:
According to the wavelength region rate of the air light value and RGB each passage, to the RGB of the coloured image, each passage is carried out
Defogging processing.
3. according to the method described in claim 1, it is characterised in that described according to the original transmissivity of air light value acquisition
The step of after, methods described also includes:
Defogging grade is obtained, the corresponding defogging degree factor is obtained according to the defogging grade;
It is described to include the step of carry out defogging processing to the coloured image according to the air light value and original transmissivity:
Defogging processing is carried out to the coloured image according to the defogging degree factor, air light value and original transmissivity.
4. according to the method described in claim 1, it is characterised in that methods described also includes:
Detect the noise quantity of the coloured image after defogging processing;
If the noise quantity is more than predetermined threshold value, noise reduction process is carried out to the coloured image after defogging processing.
5. according to the method described in claim 1, it is characterised in that methods described also includes:
Obtain the brightness value of each pixel in the coloured image after defogging processing;
If the brightness value is less than predetermined luminance value, the brightness value is adjusted for predetermined luminance value.
6. a kind of image processing apparatus, it is characterised in that including:
Image capture module, for shooting Same Scene by black and white camera, obtains multiple black white images, and pass through colour
Camera shoots the Same Scene, obtains coloured image;
First acquisition module, for obtaining the corresponding maximum brightness value of each black white image, to each black white image correspondence
Maximum brightness value be weighted processing and obtain target brightness value, regard the target brightness value as air light value;
Second acquisition module, for obtaining original transmissivity according to the air light value;
Defogging processing module, for carrying out defogging processing to the coloured image according to the air light value and original transmissivity.
7. device according to claim 6, it is characterised in that described device also includes:
3rd acquisition module, for after the original transmissivity according to air light value acquisition, obtaining default RGB tri-
The transmissivity factor of each passage in individual passage;
4th acquisition module, for obtaining each in tri- passages of RGB according to the transmissivity factor and the original transmissivity
The wavelength region rate of passage;
The defogging processing module is additionally operable to the wavelength region rate according to the air light value and RGB each passage to the colour
Each passage of the RGB of image carries out defogging processing.
8. device according to claim 6, it is characterised in that described device also includes:
Defogging grade acquisition module, for after the original transmissivity according to air light value acquisition, obtaining defogging etc.
Level, the corresponding defogging degree factor is obtained according to the defogging grade;
The defogging processing module is additionally operable to according to the defogging degree factor, air light value and original transmissivity to the colour
Image carries out defogging processing.
9. computer-readable instruction is stored in a kind of computer equipment, including memory and processor, the memory, it is described
When instruction is by the computing device so that computing device method as any one of claim 1 to 5.
10. one or more non-volatile computer readable storage medium storing program for executing comprising computer executable instructions, are calculated when described
When machine executable instruction is executed by one or more processors so that the computing device such as any one of claim 1 to 5
Methods described.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710624507.8A CN107194901B (en) | 2017-07-27 | 2017-07-27 | Image processing method, image processing device, computer equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710624507.8A CN107194901B (en) | 2017-07-27 | 2017-07-27 | Image processing method, image processing device, computer equipment and computer readable storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107194901A true CN107194901A (en) | 2017-09-22 |
CN107194901B CN107194901B (en) | 2020-01-10 |
Family
ID=59884915
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710624507.8A Active CN107194901B (en) | 2017-07-27 | 2017-07-27 | Image processing method, image processing device, computer equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107194901B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109741408A (en) * | 2018-11-23 | 2019-05-10 | 成都品果科技有限公司 | A kind of image and video caricature effect real-time rendering method |
CN110163804A (en) * | 2018-06-05 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Image defogging method, device, computer equipment and storage medium |
CN110458768A (en) * | 2019-07-16 | 2019-11-15 | 上海联影智能医疗科技有限公司 | Image processing method, computer equipment and readable storage medium storing program for executing |
CN111739041A (en) * | 2020-05-18 | 2020-10-02 | 北京完美知识科技有限公司 | Image frame clipping method, device and equipment |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102411774A (en) * | 2011-08-08 | 2012-04-11 | 安防科技(中国)有限公司 | Processing method, device and system based on single-image defogging |
CN103761720A (en) * | 2013-12-13 | 2014-04-30 | 中国科学院深圳先进技术研究院 | Image dehazing method and image dehazing device |
US20150287170A1 (en) * | 2013-05-28 | 2015-10-08 | Industry Foundation Of Chonnam National University | Apparatus for improving fogged image using user-controllable root operator |
-
2017
- 2017-07-27 CN CN201710624507.8A patent/CN107194901B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102411774A (en) * | 2011-08-08 | 2012-04-11 | 安防科技(中国)有限公司 | Processing method, device and system based on single-image defogging |
US20150287170A1 (en) * | 2013-05-28 | 2015-10-08 | Industry Foundation Of Chonnam National University | Apparatus for improving fogged image using user-controllable root operator |
CN103761720A (en) * | 2013-12-13 | 2014-04-30 | 中国科学院深圳先进技术研究院 | Image dehazing method and image dehazing device |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110163804A (en) * | 2018-06-05 | 2019-08-23 | 腾讯科技(深圳)有限公司 | Image defogging method, device, computer equipment and storage medium |
CN109741408A (en) * | 2018-11-23 | 2019-05-10 | 成都品果科技有限公司 | A kind of image and video caricature effect real-time rendering method |
CN110458768A (en) * | 2019-07-16 | 2019-11-15 | 上海联影智能医疗科技有限公司 | Image processing method, computer equipment and readable storage medium storing program for executing |
CN110458768B (en) * | 2019-07-16 | 2022-03-01 | 上海联影智能医疗科技有限公司 | Image processing method, computer device, and readable storage medium |
CN111739041A (en) * | 2020-05-18 | 2020-10-02 | 北京完美知识科技有限公司 | Image frame clipping method, device and equipment |
CN111739041B (en) * | 2020-05-18 | 2024-04-12 | 北京完美知识科技有限公司 | Image frame clipping method, device and equipment |
Also Published As
Publication number | Publication date |
---|---|
CN107194901B (en) | 2020-01-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108419028B (en) | Image processing method, image processing device, computer-readable storage medium and electronic equipment | |
CN107424198A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN108805103A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN107194900A (en) | Image processing method, device, computer-readable recording medium and mobile terminal | |
CN109191403A (en) | Image processing method and device, electronic equipment, computer readable storage medium | |
CN107194901A (en) | Image processing method, device, computer equipment and computer-readable recording medium | |
CN107341782A (en) | Image processing method, device, computer equipment and computer-readable recording medium | |
CN107509044A (en) | Image combining method, device, computer-readable recording medium and computer equipment | |
CN107396079B (en) | White balance adjustment method and device | |
CN107801011B (en) | White balancing treatment method, device and the equipment of pan-shot | |
CN107317967A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN107800971B (en) | Auto-exposure control processing method, device and the equipment of pan-shot | |
CN107465903A (en) | Image white balance method, device and computer-readable recording medium | |
CN108063926A (en) | Image processing method and device, computer readable storage medium and computer equipment | |
CN107277299A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN107580205B (en) | White balance adjustment method and device | |
CN107454317A (en) | Image processing method, device, computer-readable recording medium and computer equipment | |
CN107277369B (en) | Image processing method, device, computer readable storage medium and computer equipment | |
CN107959843B (en) | Image processing method and device, computer readable storage medium and computer equipment | |
CN107454318A (en) | Image processing method, device, mobile terminal and computer-readable recording medium | |
CN107392870B (en) | Image processing method, image processing device, mobile terminal and computer readable storage medium | |
CN107424134A (en) | Image processing method, device, computer-readable recording 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 | |
CN107317972B (en) | Image processing method, device, computer equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
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. |
|
CB02 | Change of applicant information | ||
GR01 | Patent grant | ||
GR01 | Patent grant |