CN104077750A - Image processing method - Google Patents

Image processing method Download PDF

Info

Publication number
CN104077750A
CN104077750A CN201410272364.5A CN201410272364A CN104077750A CN 104077750 A CN104077750 A CN 104077750A CN 201410272364 A CN201410272364 A CN 201410272364A CN 104077750 A CN104077750 A CN 104077750A
Authority
CN
China
Prior art keywords
initial pictures
grey level
dark
level histogram
pixel
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.)
Pending
Application number
CN201410272364.5A
Other languages
Chinese (zh)
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.)
Shenzhen Jinli Communication Equipment Co Ltd
Original Assignee
Shenzhen Jinli Communication Equipment Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jinli Communication Equipment Co Ltd filed Critical Shenzhen Jinli Communication Equipment Co Ltd
Priority to CN201410272364.5A priority Critical patent/CN104077750A/en
Publication of CN104077750A publication Critical patent/CN104077750A/en
Priority to PCT/CN2015/080836 priority patent/WO2015192718A1/en
Pending legal-status Critical Current

Links

Abstract

The embodiment of the invention discloses an image processing method. The image processing method comprises the steps that a grey level histogram of non-sky-area pixels in a dark channel image of an initial image is determined; whether the initial image needs to be defogged or not is judged according to the grey level histogram; when the initial image needs to be defogged, the initial image is defogged; or, when the initial image does not need to be defogged, the initial image is not defogged. By means of the image processing method, whether the image needs to be defogged or not can be accurately judged, the number of occupied resources of a processor is small, the image processing time can be shortened, and the electricity quantity of an electronic device is saved.

Description

A kind of disposal route of image
Technical field
The present invention relates to technical field of image processing, relate in particular to a kind of disposal route of image.
Background technology
When the image of shooting is when the mist, can make in image the feature such as target contrast and color indefinite, interfering picture information to be expressed.Prior art proposes a kind of method of image mist elimination, select interior each pixel value of the corresponding yardstick neighborhood Ω of a pixel (x) to analyze and help prior imformation secretly, then by helping concentration and the transmissivity of prior imformation estimation mist secretly, finally according to the concentration of mist and transmissivity, image is carried out to mist elimination.
In the corresponding yardstick neighborhood Ω (x) that requires during the dark channel information of prior art analysis to select arbitrarily, comprise dark-coloured pixel, while comprising the light tone pixel region that surpasses corresponding yardstick neighborhood Ω (x) area in image, this image can be judged as containing mist image, and in actual application, the light tone pixel region that surpasses corresponding yardstick neighborhood Ω (x) area can be often this class scenery of sky, when this image comprises large-area sky one class scenery, it is without mist image that prior art not only can not identify this image, and the parameter based on wrong also can reduce image effect to this image mist elimination, even can because of in image without the excessive mist elimination in territory, fog-zone failure pattern picture, in addition, prior art is huge according to helping the prior imformation estimation concentration of mist and the calculated amount of transmissivity secretly, take the processor resources such as central processor CPU, internal memory, bus many, during the great amount of images data such as processing video data, there will be Caton phenomenon, and seriously expend terminal power.
Summary of the invention
The embodiment of the present invention provides a kind of disposal route of image, and whether need mist elimination, take processor resource few if can judge exactly image, can shorten the processing time of image, saves electric quantity for electronic equipment.
The embodiment of the present invention provides a kind of disposal route of image, comprising:
Determine the grey level histogram of non-sky area pixel in the dark channel image of initial pictures;
According to described grey level histogram, judge whether described initial pictures needs mist elimination;
When judging described initial pictures and needing mist elimination, described initial pictures is carried out to defogging; Or, when judging described initial pictures and not needing mist elimination, described initial pictures is not carried out to defogging.
The embodiment of the present invention is by improving the detection scheme of image mist sense, and whether need mist elimination, take processor resource few if can judge exactly image, can shorten the processing time of image, saves electric quantity for electronic equipment.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, to the accompanying drawing of required use in embodiment be briefly described below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skills, do not paying under the prerequisite of creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the process flow schematic diagram of a kind of image of providing of the embodiment of the present invention;
Fig. 2 a is the first structural representation of a kind of electronic equipment of providing of the embodiment of the present invention;
Fig. 2 b is the second structural representation of a kind of electronic equipment of providing of the embodiment of the present invention;
Fig. 2 c is the 3rd structural representation of a kind of electronic equipment of providing of the embodiment of the present invention;
Fig. 2 d is the 4th structural representation of a kind of electronic equipment of providing of the embodiment of the present invention;
Fig. 2 e is the 5th structural representation of a kind of electronic equipment of providing of the embodiment of the present invention;
Fig. 3 is the first embodiment schematic flow sheet of the electronic equipment that provides of the embodiment of the present invention;
Fig. 4 is the second embodiment schematic flow sheet of the electronic equipment that provides of the embodiment of the present invention;
Fig. 5 is the 3rd embodiment schematic flow sheet of the electronic equipment that provides of the embodiment of the present invention;
Fig. 6 is the 4th embodiment schematic flow sheet of the electronic equipment that provides of the embodiment of the present invention;
Fig. 7 is the 5th embodiment schematic flow sheet of the electronic equipment that provides of the embodiment of the present invention;
Fig. 8 is the 6th embodiment schematic flow sheet of the electronic equipment that provides of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making the every other embodiment obtaining under creative work prerequisite, belong to the scope of protection of the invention.
The embodiment of the present invention provides a kind of disposal route of image, and it can comprise: the grey level histogram of determining non-sky area pixel in the dark channel image of initial pictures; According to described grey level histogram, judge whether described initial pictures needs mist elimination; When judging described initial pictures and needing mist elimination, described initial pictures is carried out to defogging; Or, when judging described initial pictures and not needing mist elimination, described initial pictures is not carried out to defogging.Whether the method for the embodiment of the present invention can be judged image exactly needs mist elimination, reduces and calculates and resource occupation, and shorten the processing time of image.
Below in conjunction with the drawings and the specific embodiments, the technical scheme of the embodiment of the present invention is elaborated.
As shown in Figure 1, the disposal route of embodiment of the present invention image can comprise the following steps:
Step S110, determines the grey level histogram of non-sky area pixel in the dark channel image of initial pictures.In prior art, conventionally adopt the distribution proportion of gray-scale value in grey level histogram to judge whether image needs mist elimination, the precision of this type of way judgement image mist sense is not high, in image, exist the sky of larger proportion during dummy section, may be judged as mist, thereby cause the excessive mist elimination of image, make the unintelligible or picture quality variation of image expression content.The embodiment of the present invention has been introduced dark channel image data the basis for estimation of initial pictures mist sense, can strengthen accuracy of judgement degree, avoids the excessive mist elimination of image.
The initial pictures that need to carry out mist sense judgement can be RGB image, bitmap for example, jpeg, the forms such as png.First according to initial pictures, determine the dark channel image J of initial pictures dark, computing formula can adopt:
J dark ( x ) = min y ∈ Ω ( x ) ( min c ∈ { r , g , b } ( J c ( y ) ) )
Wherein x represents pixel coordinate, and C represents Color Channel, and { B} represents that C belongs to a kind of in three kinds of Color Channels, J to c ∈ for R, G c(y) be the pixel value of initial pictures, Ω (x) represents the neighborhood of pixels of selected pixel x, and Ω (x) can get the square neighborhood of 15 * 15 pixels, { r, g, the haematochrome value that b} is pixel, marennin value, cyanine value.
In addition, when carrying out the initial pictures of mist sense judgement while being bayer types of image, according to bayer types of image, determine that the formula of the dark channel image of initial pictures can adopt:
J dark = min y ∈ Ω { x } ( I bayer ( y ) )
Wherein x represents pixel coordinate, and Ω (x) represents the neighborhood of pixels of selected pixel x, and Ω (x) can get the square neighborhood of 15 * 15 pixels.
Then according to J darkdetermine the grey level histogram H of dark channel image, and grey level histogram H is revised, finally draw the grey level histogram H ' of non-day dummy section.
The modification method of revising grey level histogram H can be: gray-scale value in H is approached or higher than the minimum Color Channel value of atmosphere light color the zero clearing of histogram element, draw the grey level histogram H ' of non-day dummy section.Also can be by directly determining that the histogram of non-day dummy section in image obtains, and can avoid day dummy section to the interference of judging by the grey level histogram of non-day dummy section.
In specific implementation, formula that can be optionally above-mentioned calculates:
Strategy one, determine the first dark channel image J of initial pictures 1 dark(x) the first grey level histogram of non-sky area pixel in, wherein, according to the first grey level histogram, judge whether initial pictures needs mist elimination.
Strategy two, determine the second dark channel image J of initial pictures 2 dark(x) the second grey level histogram of non-sky area pixel in, wherein, J 2 dark(x) be according to the second grey level histogram, judge whether initial pictures needs mist elimination.
Strategy three, (being applicable to initial pictures is monochromatic bayer types of image) are determined the 3rd dark channel image J of initial pictures 3 dark(x) the 3rd grey level histogram of non-sky area pixel in, wherein, according to the 3rd grey level histogram, judge whether initial pictures needs mist elimination.
In concrete computation process, the 3rd dark channel image J 3 dark(x) Ω (x) scope is Ω p * q(x) time, J 3 dark(x) be equivalent to J 3 dark = min y ∈ Ω p × 1 { x } ( min z ∈ Ω 1 × q { x } ( I bayer ( y ) ) ) , Z is the subdomain of Ω (x).
In concrete computation process, the 3rd dark channel image J 3 dark(x) can also be equivalent to J 3 dark = min ( I bayer ( x ) , I bayer ( x ) ‾ ) , Wherein, smoothing processing data for described initial pictures.
Strategy four, (being applicable to initial pictures is monochromatic bayer types of image) are determined the 4th dark channel image J of initial pictures 4 dark(x) the 4th grey level histogram of non-sky area pixel in, wherein, according to the 4th grey level histogram, judge whether initial pictures needs mist elimination.
In concrete computation process, the 4th dark channel image J 4 dark(x) Ω (x) scope is Ω p * q(x) time, J 4 dark(x) be equivalent to J 4 dark = min y ∈ Ω p × 1 { x } ( min z ∈ Ω 1 × q { x } ( I bayer ( y ) A c ) ) , Z is the subdomain of Ω (x).
In concrete computation process, the 4th dark channel image J 4 dark(x) in, J 4 dark(x) can also be equivalent to J 4 dark = min ( I bayer ( x ) , I bayer ( x ) ‾ ) , Wherein, smoothing processing data for described initial pictures.
In addition, can also adopt two kinds of computed paths simultaneously:
The first grey level histogram of non-sky area pixel in the first dark channel image of strategy five, the initial pictures determined; According to the first grey level histogram, judge whether initial pictures needs mist elimination; When judging initial pictures and needing mist elimination, initial pictures is carried out to defogging; When judging initial pictures and not needing mist elimination, determine the second dark channel image J of initial pictures 2 dark(x) the second grey level histogram of non-sky area pixel in; According to the second grey level histogram, judge whether initial pictures needs mist elimination; When judging initial pictures and needing mist elimination, initial pictures is carried out to defogging; When judging initial pictures and not needing mist elimination, initial pictures is not carried out to defogging.
In concrete enforcement, atmosphere light color value A ccan calculate in the following manner:
Strategy 1: according to default number or the ratio chosen, and choose one or more pixels according to gray-scale value order from low to high from initial pictures; Determine the color average of one or more pixels of choosing as A c.For example, search J darkthe small part that middle gray-scale value is the highest (for example 0.1%) pixel coordinate.Then, at these coordinates, read J c(y) pixel value, and the color average of calculating this partial pixel is A c, wherein, Color Channel c ∈ { R, G, B}.
Strategy 2: on average divide initial pictures and become at least one region, the region of division comprises n rank, and each grade all comprises m region; According to rank from low to high, progressively determine the highest region of mean flow rate in m region; Determine the color average of all pixels in the region that mean flow rate is the highest as A c.
For example, when m=4, can use the method for 4 fork trees to estimate atmosphere light color value.By J darkimage is divided into 4 nindividual region.Carrying out 4 fork trees analyzes.As, when adopting n=3, please refer to 4 shown in form 1 3individual region, estimate that the process of atmosphere light color value can be:
z11 z12 Z13 Z14 Z15 Z16 Z17 Z18
z21 z22 z23 z24 z25 z26 z27 z28
z31 z32 Z33 Z34 Z35 Z36 Z37 Z38
z41 z42 Z43 Z44 Z45 Z46 Z47 Z48
z51 z52 Z53 Z54 Z55 Z56 Z57 Z58
z61 z62 Z63 Z64 Z65 Z66 Z67 Z68
z71 z72 Z73 Z74 Z75 Z76 Z77 Z78
z81 z82 Z83 Z84 Z85 Z86 Z87 Z88
Form 1
Calculate the mean flow rate in each region.Then calculate 16 regions, upper left, 16 regions, upper right, 16 regions, lower-left, 16 regions, bottom right mean flow rate separately, selects the highest being further processed of brightness.When the highest region of the mean flow rate of selecting is 16 region, upper right, further this 16 region is divided into 4 groups, be respectively upper left { Z15, Z16, Z25, Z26}, upper right { z17, z18, z27, z28}, lower-left { z35, z36, z45, z46}, bottom right { z37, z38, z47, tetra-groups of z48}, and calculate respectively the mean flow rate of every group, and last, select the brightest one group to be further processed.When the mean flow rate of selecting the highest a group for Z15, Z16, Z25, during Z26} group, further Z15 relatively, Z16, Z25, the mean flow rate of Z26.Finally, selecting the highest region of mean flow rate in these four regions is further processed.When the highest region of the mean flow rate of selecting is region Z15, in region, Z15 coordinate reads J c(y) pixel value, and calculate the color average of this partial pixel, this color average is exactly atmosphere light color value A c, Color Channel c ∈ { R, G, B} wherein.
Step S111, judges according to the grey level histogram of determining whether initial pictures needs mist elimination.Because the grey level histogram of determining has been introduced dark channel image data, whether this step can be judged initial pictures exactly according to the above-mentioned grey level histogram of determining needs mist elimination.
In concrete enforcement, judge whether initial pictures needs the determination methods of mist elimination to be:
Strategy one, count in grey level histogram gray-scale value lower than the number of the pixel of the first gray threshold; The first ratio of pixel total amount in non-sky area image in the number of the pixel of definite statistics and dark channel image; When the first ratio is during lower than described the first proportion threshold value, confirm that initial pictures needs mist elimination; When the first ratio is during higher than the first proportion threshold value, confirm that initial pictures does not need mist elimination.
In specific implementation, the first gray threshold can be according to there being the gray-scale value situation of atomised part in mist image to choose, for example, can choose pixel in initial pictures maximum gradation value 2% as the first gray threshold; When calculating the number of pixels of gray scale lower than the first gray threshold and account in dark channel image in non-sky area image the first ratio of pixel total amount, judge that whether the first ratio is higher than the first proportion threshold value, wherein, the first proportion threshold value is the proportion threshold value of setting according to atomization image defining standard, can be also the proportion threshold value that developer sets according to ambient conditions; When the first ratio is during higher than the first proportion threshold value, confirm that initial pictures does not need mist elimination.In the embodiment of the present invention, the parameter identification standard of the first proportion threshold value can change according to actual conditions, as lower the first proportion threshold value, while having the atomization situation of fraction very in initial pictures, the embodiment of the present invention can not carried out defogging to initial pictures, to avoid initial pictures, because of the excessive mist elimination of quilt, causes the unsharp problem of expression effect.
Strategy two, according to default number or the ratio chosen, and from grey level histogram, choose one or more pixels according to brightness value order from low to high; From the gray-scale value of one or more pixels of choosing, obtain the highest gray-scale value; When the highest gray-scale value is during higher than the second gray threshold, confirm that initial pictures needs mist elimination; When the highest gray-scale value is during lower than the second gray threshold, confirm that initial pictures does not need mist elimination.
In specific implementation, the number of selected pixels is at least one, can choose according to number, also can proportionally choose, as chosen 50% pixel the pixel as shown in grey level histogram according to brightness value order from low to high, and obtain out maximum gradation value from these pixels; Whether the maximum gradation value that judgement gets is again higher than the second gray threshold, and wherein, the second gray threshold is according to there being the gray-scale value situation of atomised part in mist image to choose; When the maximum gradation value getting is during lower than the second gray threshold, can confirm that initial pictures does not need mist elimination.In the embodiment of the present invention, the defining standard of the second gray threshold can change according to actual conditions, as raise the second gray threshold, while having the atomization situation of fraction very in initial pictures, the embodiment of the present invention can not carried out defogging to initial pictures, to avoid initial pictures, because of the excessive mist elimination of quilt, causes the unsharp problem of expression effect.
Step S112, when judging initial pictures and needing mist elimination, carries out defogging to initial pictures; When judging initial pictures and not needing mist elimination, initial pictures is not carried out to defogging.
In the embodiment of the present invention, the formula that calculates dark channel image can adopt multiple, as the aforementioned formula adopting in for example, referred to herein as first, helps image calculation formula secretly wherein, J c(y) be the pixel value of initial pictures, y is pixel, and Ω (x) is the specified pixel neighborhood of selected pixel, { r, g, the haematochrome value that b} is pixel, marennin value, cyanine value; Can also adopt second to help image calculation formula secretly wherein, J c(y) be pixel value, marennin value, the cyanine value of initial pictures, A cfor atmosphere light color mean value, and, when carrying out the initial pictures of mist sense judgement while being bayer types of image, according to bayer types of image, calculate second of initial pictures and help image calculation formula secretly and can be wherein, A cfor atmosphere light color mean value, x represents pixel coordinate, and Ω (x) represents the neighborhood of pixels of selected pixel x, and Ω (x) can get the square neighborhood of 15 * 15 pixels.
It can also be other the computing formula of helping secretly.In actual calculating, can select as required wherein a kind of as judging whether initial pictures needs the judgement parameter of mist elimination, can also combine calculating, choose at least two formula and repeatedly calculate and judge, to improve, judge whether initial pictures needs the accuracy of mist elimination.Concrete enforcement can comprise: the first dark channel image J that determines initial pictures 1 dark(x) the first grey level histogram of non-sky area pixel in, according to the first grey level histogram, judge whether initial pictures needs mist elimination; When judging initial pictures and not needing mist elimination, after initial pictures not being carried out to defogging, determine the second dark channel image J of initial pictures 2 dark(x) the second grey level histogram of non-sky area pixel in, J 2 dark(x) be according to the second grey level histogram, judge whether initial pictures needs mist elimination; When judging initial pictures and not needing mist elimination, initial pictures is not carried out to defogging.
In addition, before step S110, can also carry out the judgement based on grey level histogram to initial pictures, concrete enforcement can comprise: the 5th grey level histogram of determining initial pictures pixel; Calculate gray-scale value in the 5th grey level histogram and higher than the number of the pixel of the 3rd gray threshold, account for the second ratio of pixel total amount in initial pictures; When the second ratio is during lower than the second proportion threshold value, prompting electronic equipment is carried out the operation of the grey level histogram of non-sky area pixel in the dark channel image of determining initial pictures.Wherein, grey level histogram is for tentatively judging whether image at the beginning needs the first step of mist elimination, when the number of pixels ratio that surpasses the 3rd gray threshold in initial pictures pixel surpasses the second proportion threshold value, represent that the most of grey scale pixel value of initial pictures is higher, initial pictures fogging degree is higher, and initial pictures needs mist elimination; When the number of pixels ratio that is no more than the 3rd gray threshold in initial image pixel surpasses the second proportion threshold value, the most of grey scale pixel value of the preliminary judgement of representative initial pictures is on the low side, initial pictures fogging degree is not high, initial pictures may not need mist elimination, now needs implementation step S110 to carry out further accurate judgement.In the deterministic process based on grey level histogram of carrying out before step S110, the value of the 3rd gray threshold can be with reference to existing image atomization criterion, also can be according to actual conditions adjustment, while having the atomization situation of fraction very in initial pictures, the embodiment of the present invention can temporarily not carried out defogging to initial pictures, and further judgement of execution, to avoid initial pictures, because of the excessive mist elimination of quilt, cause the unsharp problem of expression effect.
The embodiment of the present invention has been improved the detection scheme of image mist sense, using dark channel image data also as judging whether initial pictures needs the judgement parameter of mist elimination, judge exactly image and whether need mist elimination, than prior art, the embodiment of the present invention has reduced the calculated amount of image mist elimination judgement in defogging process, has reduced taking of the processor resources such as central processor CPU, internal memory, bus, has shortened the processing time of image, and, played the effect of saving electric quantity for electronic equipment.
Accordingly, the embodiment of the present invention provides a kind of electronic equipment, this equipment can be server, personal computer, mobile phone, panel computer etc., can be used for implementing aforesaid method, it can comprise: determining unit, for determining the grey level histogram of the non-sky area pixel of dark channel image of initial pictures; Judging unit, for judging according to described grey level histogram whether described initial pictures needs mist elimination; Also when judging described initial pictures and need mist elimination, send mist elimination message to mist elimination unit; Also when judging described initial pictures and do not need mist elimination, do not send described mist elimination message to described mist elimination unit; Mist elimination unit, for receiving after the described mist elimination message of described judging unit transmission, carries out defogging to described initial pictures.Whether the embodiment of the present invention can be judged image exactly needs mist elimination, and whether judge exactly image needs mist elimination, reduces and calculates and resource occupation, and shorten the processing time of image.
Below in conjunction with the drawings and the specific embodiments, the technical scheme of installing in the embodiment of the present invention is elaborated.
Fig. 2 a is that the structure of the electronic equipment of the embodiment of the present invention forms schematic diagram.The device of this embodiment can be used for the way shown in execution graph 1, concrete, the device of this embodiment comprises: determining unit 21, judging unit 22 and mist elimination unit 23, can with reference to the structure shown in Fig. 2 b, Fig. 2 c, Fig. 2 d, Fig. 2 e, form schematic diagram in the lump, the electronic equipment of the embodiment of the present invention also comprises that second chooses unit 24, division unit 25 and Tip element 26, judging unit 22 can further include statistic unit 221, ratio determining unit 222, first is chosen unit 223 and the highest gray-scale value determining unit 224, wherein:
Determining unit 21, for determining the grey level histogram of the non-sky area pixel of dark channel image of initial pictures;
Judging unit 22, for judging according to grey level histogram whether initial pictures needs mist elimination; Also when judging initial pictures and need mist elimination, send mist elimination message to mist elimination unit 23; Also when judging initial pictures and do not need mist elimination, do not send mist elimination message to mist elimination unit 23;
Mist elimination unit 23, for receiving after the mist elimination message of judging unit 22 transmissions, carries out defogging to initial pictures.
The embodiment of the present invention has been introduced dark channel image data the basis for estimation of initial pictures mist sense, can strengthen accuracy of judgement degree, avoids the excessive mist elimination of image.Wherein, the method for calculating the dark channel image of initial pictures can comprise by helping image calculation formula secretly to be calculated, and computing formula can be not limited only to the given scope of previous embodiment; Determine after the dark channel image of initial pictures, can be according to the grey level histogram that image calculation goes out non-sky area pixel in dark channel image of helping secretly of initial pictures, the method that concrete computing method can provide with reference to previous embodiment, therefore not to repeat here.
Further alternative, can be in the lump with reference to Fig. 2 b, judging unit 22 can further realize judging according to grey level histogram whether initial pictures needs the operation of mist elimination by statistic unit 221 and ratio determining unit 222:
Statistic unit 221, for adding up grey level histogram gray-scale value lower than the number of the pixel of the first gray threshold;
Ratio determining unit 222, for determining the first ratio of pixel total amount in number and the dark non-sky area image of channel image of pixel of statistics; Also for the first ratio, during lower than the first proportion threshold value, confirm that initial pictures needs mist elimination; Also for the first ratio, during higher than the first proportion threshold value, confirm that initial pictures does not need mist elimination.
In specific implementation, the first gray threshold that statistic unit 221 adopts can be according to there being the gray-scale value situation of atomised part in mist image to choose, for example, can choose pixel in initial pictures maximum gradation value 2% as the first gray threshold; When calculating the number of pixels of gray scale lower than the first gray threshold and account in dark channel image in non-sky area image the first ratio of pixel total amount, judge that whether the first ratio is higher than the first proportion threshold value, wherein, the first proportion threshold value that ratio determining unit 222 adopts is the proportion threshold value of setting according to atomization image defining standard, can be also the proportion threshold value that developer sets according to ambient conditions; When the first ratio is during higher than the first proportion threshold value, ratio determining unit 222 confirms that initial pictures do not need mist elimination.In the embodiment of the present invention, the parameter identification standard of the first proportion threshold value can change according to actual conditions, as lower the first proportion threshold value, while having the atomization situation of fraction very in initial pictures, the embodiment of the present invention can not carried out defogging to initial pictures, to avoid initial pictures, because of the excessive mist elimination of quilt, causes the unsharp problem of expression effect.
Further alternative, can be in the lump with reference to Fig. 2 c, judging unit 22 can further by first, choose unit 223 and the highest gray-scale value determining unit 224 realizes judging according to grey level histogram whether initial pictures needs the operation of mist elimination:
First chooses unit 223, for according to default number or the ratio chosen, and from described grey level histogram, chooses one or more pixels according to brightness value order from low to high; Also the gray-scale value for the one or more pixels from choosing obtains the highest gray-scale value;
The highest gray-scale value determining unit 224, when the highest gray-scale value is during higher than the second gray threshold, for confirming that initial pictures needs mist elimination; When the highest gray-scale value is during lower than the second gray threshold, also for confirming that initial pictures does not need mist elimination.
In specific implementation, the first number of choosing unit 223 selected pixels is at least one, can choose according to number, also can proportionally choose, choose unit 223 and can the pixel as shown in grey level histogram, choose 50% pixel according to brightness value order from low to high as first, the highest gray-scale value determining unit 224 is determined maximum gradation value from these pixels; Whether the maximum gradation value that judgement is determined is again higher than the second gray threshold, and wherein, the second gray threshold is according to there being the gray-scale value situation of atomised part in mist image to choose; The maximum gradation value getting when the highest gray-scale value determining unit 224 during lower than the second gray threshold, can confirm that initial pictures does not need mist elimination.In the embodiment of the present invention, the defining standard of the second gray threshold can change according to actual conditions, as raise the second gray threshold, while having the atomization situation of fraction very in initial pictures, the embodiment of the present invention can not carried out defogging to initial pictures, to avoid initial pictures, because of the excessive mist elimination of quilt, causes the unsharp problem of expression effect.
Further alternative, determining unit 21 can be selected the multiple dark channel image that image calculation formula is determined initial pictures of helping secretly, as selected first to help image calculation formula secretly wherein, J c(y) be the pixel value of initial pictures, y is pixel, and Ω (x) is the specified pixel neighborhood of selected pixel, { r, g, the haematochrome value that b} is pixel, marennin value, cyanine value; Can also adopt second to help image calculation formula secretly wherein, J c(y) be the pixel value of initial pictures, y is pixel, and Ω (x) is the specified pixel neighborhood of selected pixel, { r, g, the haematochrome value that b} is pixel, marennin value, cyanine value, A cfor atmosphere light color mean value, can also be for other help image calculation formula secretly.Electronic equipment can select any to help image calculation formula secretly, also can select a plurality of image calculation formula of helping secretly, to improve the accuracy of judgement.For example,, when electronic equipment choice for use first is helped image calculation formula secretly judge when whether initial pictures needs mist elimination to realize judging whether initial pictures needs the operation of mist elimination by determining unit 21, judging unit 22:
Determining unit 21, also for determining the first dark channel image J of initial pictures 1 dark(x) the first grey level histogram of non-sky area pixel in, wherein,
Judging unit 22, also for judging according to the first grey level histogram whether initial pictures needs mist elimination.
Further alternative, when electronic equipment choice for use second is helped image calculation formula secretly judge when whether initial pictures needs mist elimination to realize judging whether initial pictures needs the operation of mist elimination by determining unit 21, judging unit 22:
Determining unit 21, also for determining the second dark channel image J of initial pictures 2 dark(x) the second grey level histogram of non-sky area pixel in, wherein, J 2 dark(x) be
Judging unit 22, also for judging according to the second grey level histogram whether initial pictures needs mist elimination.
When the initial pictures of needs judgement is monochromatic bayer types of image, electronic equipment can be helped image calculation formula secretly by choice for use the 3rd judge whether initial pictures needs mist elimination:
Determining unit 21, also for determining the 3rd dark channel image J of initial pictures 3 dark(x) the 3rd grey level histogram of non-sky area pixel in, wherein,
Judging unit 22, also for judging according to the 3rd grey level histogram whether initial pictures needs mist elimination.
In concrete computation process, the 3rd dark channel image J 3 dark(x) Ω (x) scope is Ω p * q(x) time, J 3 dark(x) be equivalent to J 3 dark = min y ∈ Ω p × 1 { x } ( min z ∈ Ω 1 × q { x } ( I bayer ( y ) ) ) , Z is the subdomain of Ω (x).
In concrete computation process, the 3rd dark channel image J 3 dark(x) can also be equivalent to J 3 dark = min ( I bayer ( x ) , I bayer ( x ) ‾ ) , Wherein, smoothing processing data for described initial pictures.
When the initial pictures of needs judgement is monochromatic bayer types of image, electronic equipment can be helped image calculation formula secretly by choice for use the 4th judge whether initial pictures needs mist elimination:
Determining unit 21, also for determining the 4th dark channel image J of initial pictures 4 dark(x) the 4th grey level histogram of non-sky area pixel in, wherein,
Judging unit 22, also for judging according to the 4th grey level histogram whether initial pictures needs mist elimination.
In concrete computation process, the 4th dark channel image J 4 dark(x) Ω (x) scope is Ω p * q(x) time, J 4 dark(x) be equivalent to J 4 dark = min y ∈ Ω p × 1 { x } ( min z ∈ Ω 1 × q { x } ( I bayer ( y ) A c ) ) , Z is the subdomain of Ω (x).
In concrete computation process, the 4th dark channel image J 4 dark(x) in, J 4 dark(x) can also be equivalent to J 4 dark = min ( I bayer ( x ) , I bayer ( x ) ‾ ) , Wherein, smoothing processing data for described initial pictures.
Electronic equipment also can adopt two to help image calculation formula secretly and judge whether initial pictures needs mist elimination:
Determining unit 21, for determining the first dark channel image J of initial pictures 1 dark(x) the first grey level histogram of non-sky area pixel in;
Judging unit 22, also for judging according to the first grey level histogram whether initial pictures needs mist elimination; Also when judging initial pictures and need mist elimination, send mist elimination message to mist elimination unit 23; Also when judging initial pictures and do not need mist elimination, send and continue judgement message to determining unit 21;
Determining unit 21, also, for receiving after the continuation judgement message of described judging unit 22 transmissions, determines the second dark channel image J of initial pictures 2 dark(x) the second grey level histogram of non-sky area pixel in;
Judging unit 22, also for judging according to the second grey level histogram whether initial pictures needs mist elimination; Also when judging initial pictures and need mist elimination, send mist elimination message to mist elimination unit 23; Also when judging initial pictures and do not need mist elimination, do not send mist elimination message to mist elimination unit 23;
Mist elimination unit 23, also, for receiving after the mist elimination message of judging unit 22 transmissions, carries out defogging to initial pictures.
Known, determining unit 21 is helped image calculation formula secretly according to first and is calculated the first dark channel image, and further calculate after the grey level histogram of non-day dummy section of the first dark channel image, when judging unit 22 is judged initial pictures and is not needed mist elimination, electronic equipment is helped continuation secretly image calculation formula according to second and is calculated the second dark channel image, and further calculate after the grey level histogram of non-day dummy section of the second dark channel image, carry out whether initial pictures being carried out the further judgement of defogging, to improve the accuracy of judgement.Wherein, judging unit 22 judges whether to carry out the method for defogging to initial pictures can be with reference to the mentioned judgement scheme of previous embodiment, and therefore not to repeat here.
Further alternative, can be in the lump with reference to Fig. 2 d, the embodiment of the present invention is chosen unit 24, determining unit and division unit 25 for atmosphere light color value A by second cselect and also provided the scheme of selecting:
Second chooses unit 24, for according to default number or the ratio chosen, and from initial pictures, chooses one or more pixels according to gray-scale value order from low to high;
Determining unit 21, also for the color average of determining one or more pixels of choosing as A c.For example, search J darkthe small part that middle gray-scale value is the highest (for example 0.1%) pixel coordinate.Then, at these coordinates, read J c(y) pixel value, and the color average of calculating this partial pixel is A c, wherein, Color Channel c ∈ { R, G, B}.
Or,
Division unit 25, becomes at least one region for the described initial pictures of average division, and wherein, the region of division comprises n rank, and each grade all comprises m region;
Determining unit 21, also progressively determines the highest region of mean flow rate, m region for the rank according to from low to high;
Determining unit 21, also for the color average of determining all pixels in region that mean flow rate is the highest as A c.For example, when m=4, can use the method for 4 fork trees to estimate atmosphere light color value.
Further alternative, can be in the lump with reference to Fig. 2 e, before the first computing unit 21 calculates the grey level histogram of non-day dummy section in the dark channel image of initial pictures, electronic equipment can also carry out whether initial pictures being carried out by determining unit 21 and Tip element 26 the preliminary judgement of defogging:
Determining unit 21, also for determining the 5th grey level histogram of initial pictures pixel; Also for calculating the 5th grey level histogram gray-scale value, higher than the number of the pixel of the 3rd gray threshold, account for the second ratio of pixel total amount in initial pictures;
Tip element 26, the second ratios are during lower than the second proportion threshold value, for pointing out electronic equipment to carry out the operation of the grey level histogram of the non-sky area pixel of dark channel image of determining initial pictures.
Wherein, grey level histogram is for tentatively judging whether image at the beginning needs the first step of mist elimination, when the number of pixels ratio that surpasses the 3rd gray threshold in initial pictures pixel surpasses the second proportion threshold value, represent that the most of grey scale pixel value of initial pictures is higher, initial pictures fogging degree is higher, and initial pictures needs mist elimination; When the number of pixels ratio that is no more than the 3rd gray threshold in initial image pixel surpasses the second proportion threshold value, the most of grey scale pixel value of the preliminary judgement of representative initial pictures is on the low side, initial pictures fogging degree is not high, initial pictures may not need mist elimination, now needs to implement to carry out further accurate judgement.In the deterministic process based on grey level histogram of carrying out before step S110, the value of the 3rd gray threshold can be with reference to existing image atomization criterion, also can be according to actual conditions adjustment, while having the atomization situation of fraction very in initial pictures, the embodiment of the present invention can temporarily not carried out defogging to initial pictures, and further judgement of execution, to avoid initial pictures, because of the excessive mist elimination of quilt, cause the unsharp problem of expression effect.
The electronic equipment of the embodiment of the present invention has improved the detection scheme of image mist sense, using dark channel image data also as judging whether initial pictures needs the judgement parameter of mist elimination, judge exactly image and whether need mist elimination, than prior art, the electronic equipment of the embodiment of the present invention has reduced the calculated amount of image mist elimination judgement in defogging process, reduced taking of the processor resources such as central processor CPU, internal memory, bus, shortened the processing time of image, and, played the effect of saving electric quantity for electronic equipment.
Please with reference to Fig. 3, Fig. 3 is an embodiment process flow diagram of arbitrary described electronic equipment in Fig. 2 a-Fig. 2 e, and the electronic equipment that this embodiment process flow diagram is the embodiment of the present invention is processed the concrete steps of initial pictures, and it can comprise:
Step S310, gathers initial pictures J.
Step S311, the dark channel image Jdark of calculating initial pictures J.The method that computing method are as mentioned in abovementioned steps S111, that calculates that the computing method of dark channel image Jdark are not limited only to enumerate first helps image calculation formula or second secretly and helps image calculation formula secretly.
Step S312, calculates non-sky area grayscale histogram H ' in Jdark.The method that computing method are as mentioned in abovementioned steps S111.
Step S313, calculates gray-scale value in Jdark according to H ' and lower than the pixel of threshold value T1, accounts for the number percent a of whole image pixel number.In specific implementation, the desirable empirical value of T1, for example, can choose 2% of maximum gradation value.User can adjust empirical value according to visual experience, thereby realizes the adjustment to result of calculation.
Step S314, whether number percent a is less than percentage threshold T2.If this step is judged number percent a and is less than percentage threshold T2, perform step S315; If this step is judged number percent a and is not less than percentage threshold T2, continue execution step S316.Wherein, the desirable empirical value of percentage threshold T2, for example, can choose 50% as percentage threshold.User can adjust empirical value according to visual experience, thereby realizes the adjustment to result of calculation.
Step S315, has mist.When this step is judged the result of mist, electronic equipment can start to carry out the operation to initial pictures mist elimination.
Step S316, without mist.When this step is judged the result without mist, electronic equipment is without the operation of carrying out initial pictures mist elimination.
Flow process shown in Fig. 3 has shown that electronic equipment judges whether to carry out to initial pictures the deterministic process of defogging and the impact of judged result.This embodiment flow scheme improvements the detection scheme of image mist sense, and judge exactly image and whether need mist elimination.
Please with reference to Fig. 4, Fig. 4 is an embodiment process flow diagram of arbitrary described electronic equipment in Fig. 2 a-Fig. 2 e, and the electronic equipment that this embodiment process flow diagram is the embodiment of the present invention is processed the concrete steps of initial pictures, and it can comprise:
Step S410, gathers initial pictures J.
Step S411, the dark channel image J of calculating initial pictures J dark.The method that computing method are as mentioned in abovementioned steps S111, calculates dark channel image J darkcomputing method be not limited only to enumerate first help image calculation formula or second secretly and help image calculation formula secretly.
Step S412, calculates J darkin non-sky area grayscale histogram H '.The method that computing method are as mentioned in abovementioned steps S111.
Step S413, selects J according to H ' darkthe pixel of the C% that middle brightness is minimum, and from these pixels, obtain the highest gray-scale value L1.In specific implementation, the desirable empirical value of C%, for example, can choose 50%.User can adjust empirical value according to visual experience, thereby realizes the adjustment to result of calculation.
Step S414, whether the highest gray-scale value L1 is greater than gray threshold T2.If this step is judged the highest gray-scale value L1 and is greater than gray threshold T2, perform step S415; If this step is judged the highest gray-scale value L1 and is not more than gray threshold T2, continue execution step S416.Wherein, the desirable empirical value of gray threshold T2, for example, can choose the highest gray-scale value 50% as gray threshold T2.User can adjust empirical value according to visual experience, thereby realizes the adjustment to result of calculation.
Step S415, has mist.When this step is judged the result of mist, electronic equipment can start to carry out the operation to initial pictures mist elimination.
Step S416, without mist.When this step is judged the result without mist, electronic equipment is without the operation of carrying out initial pictures mist elimination.
Flow process shown in Fig. 4 has shown that electronic equipment judges whether to carry out to initial pictures the deterministic process of defogging and the impact of judged result.This embodiment flow scheme improvements the detection scheme of image mist sense, and judge exactly image and whether need mist elimination.
Please with reference to Fig. 5, Fig. 5 is an embodiment process flow diagram of arbitrary described electronic equipment in Fig. 2 a-Fig. 2 e, and the electronic equipment that this embodiment process flow diagram is the embodiment of the present invention is processed the concrete steps of initial pictures, and it can comprise:
Step S510, gathers initial pictures J.
Step S511, the dark channel image J of calculating initial pictures J 2 dark.The method that computing method are as mentioned in abovementioned steps S111, calculates dark channel image J 2 darkcomputing method can select aforementioned mention in for example second help image calculation formula secretly.
Step S512, calculates J 2 darkin non-sky area grayscale histogram H '.The method that computing method are as mentioned in abovementioned steps S111.
Step S513, calculates J according to H ' 2 darkmiddle gray-scale value accounts for the number percent a of whole image pixel number lower than the pixel of threshold value T1.In specific implementation, the desirable empirical value of T1, for example, can choose 2% of maximum gradation value.User can adjust empirical value according to visual experience, thereby realizes the adjustment to result of calculation.
Step S514, whether number percent a is less than percentage threshold T2.If this step is judged number percent a and is less than percentage threshold T2, perform step S515; If this step is judged number percent a and is not less than percentage threshold T2, continue execution step S516.Wherein, the desirable empirical value of percentage threshold T2, for example, can choose 50% as percentage threshold.User can adjust empirical value according to visual experience, thereby realizes the adjustment to result of calculation.
Step S515, has mist.When this step is judged the result of mist, electronic equipment can start to carry out the operation to initial pictures mist elimination.
Step S516, without mist.When this step is judged the result without mist, electronic equipment is without the operation of carrying out initial pictures mist elimination.
Flow process shown in Fig. 5 has shown that electronic equipment judges whether to carry out to initial pictures the deterministic process of defogging and the impact of judged result.This embodiment flow scheme improvements the detection scheme of image mist sense, and judge exactly image and whether need mist elimination.
Please with reference to Fig. 6, Fig. 6 is an embodiment process flow diagram of arbitrary described electronic equipment in Fig. 2 a-Fig. 2 e, and the electronic equipment that this embodiment process flow diagram is the embodiment of the present invention is processed the concrete steps of initial pictures, and it can comprise:
Step S610, gathers initial pictures J.
Step S611, the dark channel image J of calculating initial pictures J 1 dark.
Step S612, whether judging initial pictures has mist.When judging initial pictures and have mist, continue execution step S616; When not judging initial pictures and have mist, continue execution step S613.Wherein, judge whether initial pictures has the method for mist can be with reference to the electronic equipment flow process shown in abovementioned steps S111 and Fig. 3 or Fig. 4.
Step S613, the dark channel image J of calculating initial pictures J 2 dark.
Step S614, whether judging initial pictures has mist.When judging initial pictures and have mist, continue execution step S616; When not judging initial pictures and have mist, continue execution step S615.Wherein, judge whether initial pictures has the method for mist can be with reference to the electronic equipment flow process shown in abovementioned steps S111 and Fig. 3 or Fig. 4.
Step S615, without mist.When this step is judged the result without mist, electronic equipment is without the operation of carrying out initial pictures mist elimination.
Step S616, has mist.When this step is judged the result of mist, electronic equipment can start to carry out the operation to initial pictures mist elimination.
Whether flow process shown in Fig. 6, than Fig. 3, Fig. 4, Fig. 5, based on judging for the first time the judged result of initial pictures without mist, has increased further judgement, make initial pictures need the judged result of mist elimination more accurate.This embodiment flow scheme improvements the detection scheme of image mist sense, and judge exactly image and whether need mist elimination.
Please with reference to Fig. 7, Fig. 7 is an embodiment process flow diagram of arbitrary described electronic equipment in Fig. 2 a-Fig. 2 e, and the electronic equipment that this embodiment process flow diagram is the embodiment of the present invention is processed the concrete steps of initial pictures, and it can comprise:
Step S710, gathers initial pictures J.
Step S711, the grey level histogram of calculating initial pictures J.
Step S712, whether judging initial pictures has mist.This step judges whether to carry out defogging to initial pictures according to grey value profile situation in the grey level histogram of initial pictures J, when judging initial pictures according to the grey level histogram of initial pictures J and have mist, continues execution step S716; When failing to judge initial pictures and have mist according to the grey level histogram of initial pictures J, continue execution step S713.Wherein, judge whether initial pictures has the method for mist can be with reference to the aforementioned method of mentioning.
Step S713, the dark channel image J of calculating initial pictures J dark.
Step S714, whether judging initial pictures has mist.When judging initial pictures and have mist, continue execution step S716; When not judging initial pictures and have mist, continue execution step S715.Wherein, judge whether initial pictures has the method for mist can be with reference to the electronic equipment flow process shown in abovementioned steps S111 and Fig. 3 or Fig. 4.
Step S715, without mist.When this step is judged the result without mist, electronic equipment is without the operation of carrying out initial pictures mist elimination.
Step S716, has mist.When this step is judged the result of mist, electronic equipment can start to carry out the operation to initial pictures mist elimination.
Flow process shown in Fig. 7 is than Fig. 3, Fig. 4, Fig. 5, Fig. 6, increased the step of carrying out preliminary judgement according to the grey level histogram of initial pictures, this embodiment flow scheme improvements the detection scheme of image mist sense, and judge exactly image and whether need mist elimination.
Please with reference to Fig. 8, Fig. 8 is an embodiment process flow diagram of arbitrary described electronic equipment in Fig. 2 a-Fig. 2 e, and the electronic equipment that this embodiment process flow diagram is the embodiment of the present invention is processed the concrete steps of initial pictures, and it can comprise:
Step S810, gathers initial pictures J.
Step S811, the grey level histogram of calculating initial pictures J.
Step S812, whether judging initial pictures has mist.This step judges whether to carry out defogging to initial pictures according to grey value profile situation in the grey level histogram of initial pictures J, when judging initial pictures according to the grey level histogram of initial pictures J and have mist, continues execution step S818; When failing to judge initial pictures and have mist according to the grey level histogram of initial pictures J, continue execution step S813.Wherein, judge whether initial pictures has the method for mist can be with reference to the aforementioned method of mentioning.
Step S813, the dark channel image J of calculating initial pictures J 1 dark.
Step S814, whether judging initial pictures has mist.When judging initial pictures and have mist, continue execution step S818; When not judging initial pictures and have mist, continue execution step S815.Wherein, judge whether initial pictures has the method for mist can be with reference to the electronic equipment flow process shown in abovementioned steps S111 and Fig. 3 or Fig. 4.
Step S815, the dark channel image J of calculating initial pictures J 2 dark.
Step S816, whether judging initial pictures has mist.When judging initial pictures and have mist, continue execution step S818; When not judging initial pictures and have mist, continue execution step S817.Wherein, judge whether initial pictures has the method for mist can be with reference to the electronic equipment flow process shown in abovementioned steps S111 and Fig. 3 or Fig. 4.
Step S817, without mist.When this step is judged the result without mist, electronic equipment is without the operation of carrying out initial pictures mist elimination.
Step S818, has mist.When this step is judged the result of mist, electronic equipment can start to carry out the operation to initial pictures mist elimination.
Flow process shown in Fig. 8 is than Fig. 3, Fig. 4, Fig. 5, Fig. 6 and Fig. 7, perfect electronic equipment judges whether to carry out to initial pictures the step of defogging, this embodiment flow scheme improvements the detection scheme of image mist sense, and judge exactly image and whether need mist elimination.
It should be noted that, in the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields in certain embodiment, there is no the part of detailed description, can be referring to the associated description of other embodiment.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and related action and unit might not be that the embodiment of the present invention is necessary.
Step in embodiment of the present invention method can be carried out according to actual needs order and adjusted, merges and delete.
Unit in embodiment of the present invention device can merge according to actual needs, divides and delete.
Unit in the embodiment of the present invention, can pass through universal integrated circuit, for example CPU (Central Processing Unit, central processing unit), or realize by ASIC (Application Specific Integrated Circuit, special IC).
One of ordinary skill in the art will appreciate that all or part of flow process realizing in above-described embodiment method, to come the hardware that instruction is relevant to complete by computer program, program can be stored in a computer read/write memory medium, this program, when carrying out, can comprise as the flow process of the embodiment of above-mentioned each side method.Wherein, storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
Above disclosed is only preferred embodiment of the present invention, certainly can not limit with this interest field of the present invention, and the equivalent variations of therefore doing according to the claims in the present invention, still belongs to the scope that the present invention is contained.

Claims (10)

1. a disposal route for image, is characterized in that, comprising:
Determine the grey level histogram of non-sky area pixel in the dark channel image of initial pictures;
According to described grey level histogram, judge whether described initial pictures needs mist elimination;
When judging described initial pictures and needing mist elimination, described initial pictures is carried out to defogging; Or, when judging described initial pictures and not needing mist elimination, described initial pictures is not carried out to defogging.
2. the method for claim 1, is characterized in that, according to described grey level histogram, judges whether described initial pictures needs mist elimination to comprise:
Add up in described grey level histogram gray-scale value lower than the number of the pixel of the first gray threshold;
Determine in the number of pixel of described statistics and described dark channel image the first ratio of pixel total amount in non-sky area image;
When described the first ratio is during lower than described the first proportion threshold value, confirm that described initial pictures needs mist elimination; Or,
When described the first ratio is during higher than described the first proportion threshold value, confirm that described initial pictures does not need mist elimination.
3. the method for claim 1, is characterized in that, according to described grey level histogram, judges whether described initial pictures needs mist elimination to comprise:
According to default number or the ratio chosen, and from described grey level histogram, choose one or more pixels according to brightness value order from low to high;
From the gray-scale value of described one or more pixels of choosing, obtain the highest gray-scale value;
When the highest described gray-scale value is during higher than the second gray threshold, confirm that described initial pictures needs mist elimination; Or,
When the highest described gray-scale value is during lower than the second gray threshold, confirm that described initial pictures does not need mist elimination.
4. the method for claim 1, is characterized in that,
The grey level histogram of determining non-sky area pixel in the dark channel image of initial pictures comprises:
Determine the first dark channel image J of described initial pictures 1 dark(x) the first grey level histogram of non-sky area pixel in, described in wherein, described J c(y) be the pixel value of described initial pictures, described y is pixel, and described Ω (x) is the specified pixel neighborhood of selected pixel, described { r, g, the haematochrome value that b} is pixel, marennin value, cyanine value;
According to described grey level histogram, judge whether described initial pictures needs mist elimination to comprise:
According to described the first grey level histogram, judge whether described initial pictures needs mist elimination; Or,
The grey level histogram of determining non-sky area pixel in the dark channel image of initial pictures comprises:
Determine the second dark channel image J of described initial pictures 2 dark(x) the second grey level histogram of non-sky area pixel in, described J 2 dark(x) be wherein, described J c(y) be the pixel value of described initial pictures, described y is pixel, and described Ω (x) is the specified pixel neighborhood of selected pixel, described { r, g, the haematochrome value that b} is pixel, marennin value, cyanine value, described A cfor atmosphere light color mean value;
According to described grey level histogram, judge whether described initial pictures needs mist elimination to comprise:
According to described the second grey level histogram, judge whether described initial pictures needs mist elimination.
5. method as claimed in claim 4, before determining the grey level histogram of non-sky area pixel in the dark channel image of initial pictures, also comprises:
According to default number or the ratio chosen, and from described initial pictures, choose one or more pixels according to gray-scale value order from low to high;
The color average of one or more pixels of choosing described in determining is as described A c; Or,
The described initial pictures of average division becomes at least one region, and described region comprises n rank, and each grade all comprises m region;
According to rank from low to high, progressively determine the highest region of mean flow rate in a described m region;
Determine the color average of all pixels in the region that described mean flow rate is the highest as described A c.
6. the method for claim 1, is characterized in that, when described initial pictures is monochromatic bayer types of image,
The grey level histogram of determining non-sky area pixel in the dark channel image of initial pictures comprises:
Determine the 3rd dark channel image J of described initial pictures 3 dark(x) the 3rd grey level histogram of non-sky area pixel in, described in wherein, described Ω (x) is the specified pixel neighborhood of selected pixel;
According to described grey level histogram, judge whether described initial pictures needs mist elimination to comprise:
According to described the 3rd grey level histogram, judge whether described initial pictures needs mist elimination; Or,
The grey level histogram of determining non-sky area pixel in the dark channel image of initial pictures comprises:
Determine the 4th dark channel image J of described initial pictures 4 dark(x) the 4th grey level histogram of non-sky area pixel in, described in wherein, described Ω (x) is the specified pixel neighborhood of selected pixel, described A cfor atmosphere light color mean value;
According to described grey level histogram, judge whether described initial pictures needs mist elimination to comprise:
According to described the 4th grey level histogram, judge whether described initial pictures needs mist elimination.
7. method as claimed in claim 6, is characterized in that,
The described the 3rd dark channel image J 3 dark(x), in, described Ω (x) scope is Ω p * q(x) time, J 3 dark(x) be equivalent to described Z is the subdomain of described Ω (x); Or
The described the 4th dark channel image J 4 dark(x), in, described Ω (x) scope is Ω p * q(x) time, J 4 dark(x) be equivalent to J 4 dark = min y ∈ Ω p × 1 { x } ( min z ∈ Ω 1 × q { x } ( I bayer ( y ) A c ) ) , Described Z is the subdomain of described Ω (x).
8. method as claimed in claim 6, is characterized in that,
The described the 3rd dark channel image J 3 dark(x) in, J 3 dark(x) be equivalent to J 3 dark = min ( I bayer ( x ) , I bayer ( x ) ‾ ) , Described smoothing processing data for described initial pictures;
The described the 4th dark channel image J 4 dark(x) in, J 4 dark(x) be equivalent to J 4 dark = min ( I bayer ( x ) , I bayer ( x ) ‾ ) , Described smoothing processing data for described initial pictures.
9. method as claimed in claim 4, is characterized in that,
When in the dark channel image of the initial pictures of determining, the grey level histogram of non-sky area pixel is described the first grey level histogram,
When judging described initial pictures and not needing mist elimination, after described initial pictures not being carried out to defogging, also comprise:
Determine the second dark channel image J of described initial pictures 2 dark(x) the second grey level histogram of non-sky area pixel in;
According to described the second grey level histogram, judge whether described initial pictures needs mist elimination;
When judging described initial pictures and needing mist elimination, described initial pictures is carried out to defogging; Or, when judging described initial pictures and not needing mist elimination, described initial pictures is not carried out to defogging.
10. the method for claim 1, is characterized in that, before determining the grey level histogram of non-sky area pixel in the dark channel image of initial pictures, also comprises:
Determine the 5th grey level histogram of described initial pictures pixel;
Determine gray-scale value in described the 5th grey level histogram and higher than the number of the pixel of the 3rd gray threshold, account for the second ratio of pixel total amount in described initial pictures;
When described the second ratio is during lower than the second proportion threshold value, prompting electronic equipment is determined the operation of the grey level histogram of non-sky area pixel in the dark channel image of initial pictures described in carrying out.
CN201410272364.5A 2014-06-18 2014-06-18 Image processing method Pending CN104077750A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201410272364.5A CN104077750A (en) 2014-06-18 2014-06-18 Image processing method
PCT/CN2015/080836 WO2015192718A1 (en) 2014-06-18 2015-06-05 Image processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410272364.5A CN104077750A (en) 2014-06-18 2014-06-18 Image processing method

Publications (1)

Publication Number Publication Date
CN104077750A true CN104077750A (en) 2014-10-01

Family

ID=51598992

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410272364.5A Pending CN104077750A (en) 2014-06-18 2014-06-18 Image processing method

Country Status (1)

Country Link
CN (1) CN104077750A (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104318535A (en) * 2014-11-20 2015-01-28 广东欧珀移动通信有限公司 Image defogging method and device and mobile terminal
CN104331867A (en) * 2014-11-06 2015-02-04 广东欧珀移动通信有限公司 Image defogging method and device and mobile terminal
WO2015192718A1 (en) * 2014-06-18 2015-12-23 深圳市金立通信设备有限公司 Image processing method and apparatus
CN106447639A (en) * 2016-10-18 2017-02-22 乐视控股(北京)有限公司 Mobile terminal photograph processing method and device
CN106485682A (en) * 2016-10-18 2017-03-08 乐视控股(北京)有限公司 A kind of real time image processing and device
CN106548461A (en) * 2016-10-25 2017-03-29 湘潭大学 Image defogging method
CN107566740A (en) * 2017-10-18 2018-01-09 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN108230288A (en) * 2016-12-21 2018-06-29 杭州海康威视数字技术股份有限公司 A kind of method and apparatus of determining mist character condition
CN108259708A (en) * 2018-01-17 2018-07-06 国家安全生产监督管理总局通信信息中心 There are mist method for processing video frequency and computer readable storage medium
CN108765311A (en) * 2018-04-26 2018-11-06 长安大学 More air light value image defogging methods based on random walk cluster
CN109409402A (en) * 2018-09-06 2019-03-01 中国气象局气象探测中心 A kind of image contamination detection method and system based on dark channel prior histogram
CN109658405A (en) * 2018-12-20 2019-04-19 中国气象局气象探测中心 Image data quality control method and system in a kind of observation of crops outdoor scene
WO2021036559A1 (en) * 2019-08-23 2021-03-04 华为技术有限公司 Automatic vehicle window cleaning method and apparatus
CN113076997A (en) * 2021-03-31 2021-07-06 南昌欧菲光电技术有限公司 Lens band fog identification method, camera module and terminal equipment
CN113554596A (en) * 2021-06-23 2021-10-26 浙江大华技术股份有限公司 Image fogging determination method, image fogging determination device, electronic device, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101819286A (en) * 2010-04-09 2010-09-01 东南大学 Image grey level histogram-based foggy day detection method
CN102162788A (en) * 2010-10-19 2011-08-24 北方工业大学 Visibility detection method based on high-definition video
US8340461B2 (en) * 2010-02-01 2012-12-25 Microsoft Corporation Single image haze removal using dark channel priors
CN103065285A (en) * 2012-12-30 2013-04-24 信帧电子技术(北京)有限公司 Defogging method and device for image data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8340461B2 (en) * 2010-02-01 2012-12-25 Microsoft Corporation Single image haze removal using dark channel priors
CN101819286A (en) * 2010-04-09 2010-09-01 东南大学 Image grey level histogram-based foggy day detection method
CN102162788A (en) * 2010-10-19 2011-08-24 北方工业大学 Visibility detection method based on high-definition video
CN103065285A (en) * 2012-12-30 2013-04-24 信帧电子技术(北京)有限公司 Defogging method and device for image data

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
KAIMING HE等: "Single Image Haze Removal Using Dark Channel Prior", 《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 *
娄静涛等: "单幅Bayer格式图像的快速去雾方法", 《国防科技大学学报》 *

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015192718A1 (en) * 2014-06-18 2015-12-23 深圳市金立通信设备有限公司 Image processing method and apparatus
CN104331867A (en) * 2014-11-06 2015-02-04 广东欧珀移动通信有限公司 Image defogging method and device and mobile terminal
CN104318535A (en) * 2014-11-20 2015-01-28 广东欧珀移动通信有限公司 Image defogging method and device and mobile terminal
CN104318535B (en) * 2014-11-20 2018-02-16 广东欧珀移动通信有限公司 The method, device and mobile terminal of image defogging
CN106447639A (en) * 2016-10-18 2017-02-22 乐视控股(北京)有限公司 Mobile terminal photograph processing method and device
CN106485682A (en) * 2016-10-18 2017-03-08 乐视控股(北京)有限公司 A kind of real time image processing and device
CN106548461B (en) * 2016-10-25 2020-02-07 湘潭大学 Image defogging method
CN106548461A (en) * 2016-10-25 2017-03-29 湘潭大学 Image defogging method
CN108230288B (en) * 2016-12-21 2020-06-16 杭州海康威视数字技术股份有限公司 Method and device for determining fog state
CN108230288A (en) * 2016-12-21 2018-06-29 杭州海康威视数字技术股份有限公司 A kind of method and apparatus of determining mist character condition
CN107566740A (en) * 2017-10-18 2018-01-09 维沃移动通信有限公司 A kind of image processing method and mobile terminal
CN108259708A (en) * 2018-01-17 2018-07-06 国家安全生产监督管理总局通信信息中心 There are mist method for processing video frequency and computer readable storage medium
CN108259708B (en) * 2018-01-17 2020-05-12 国家安全生产监督管理总局通信信息中心 Method for processing foggy video and computer readable storage medium
CN108765311A (en) * 2018-04-26 2018-11-06 长安大学 More air light value image defogging methods based on random walk cluster
CN109409402A (en) * 2018-09-06 2019-03-01 中国气象局气象探测中心 A kind of image contamination detection method and system based on dark channel prior histogram
CN109658405A (en) * 2018-12-20 2019-04-19 中国气象局气象探测中心 Image data quality control method and system in a kind of observation of crops outdoor scene
CN109658405B (en) * 2018-12-20 2020-11-24 中国气象局气象探测中心 Image data quality control method and system in crop live-action observation
WO2021036559A1 (en) * 2019-08-23 2021-03-04 华为技术有限公司 Automatic vehicle window cleaning method and apparatus
CN113076997A (en) * 2021-03-31 2021-07-06 南昌欧菲光电技术有限公司 Lens band fog identification method, camera module and terminal equipment
CN113554596A (en) * 2021-06-23 2021-10-26 浙江大华技术股份有限公司 Image fogging determination method, image fogging determination device, electronic device, and storage medium

Similar Documents

Publication Publication Date Title
CN104077750A (en) Image processing method
CN102682446B (en) Adaptive combined two-sided filter is used to generate equipment and the method for dense depth map
US9105082B2 (en) Filtering apparatus and method for high precision restoration of depth image
CN104820991B (en) A kind of multiple soft-constraint solid matching method based on cost matrix
CN104123700A (en) Electronic equipment
KR20150146045A (en) Apparatus and method for image defogging
GB2367966B (en) Method and apparatus for determining regions of interest in images and for image transmission
CN103077500B (en) The defogging method capable of view data and device
US8805020B2 (en) Apparatus and method for generating depth signal
US8055092B2 (en) Image processing apparatus and image processing method
US9361668B2 (en) Method and apparatus for generating disparity map
CN109064549B (en) Method for generating mark point detection model and method for detecting mark point
US20120141014A1 (en) Color balancing for partially overlapping images
US20140152658A1 (en) Image processing apparatus and method for generating 3d image thereof
CN104346774A (en) Method and device for enhancing image
JP2016205887A (en) Road surface gradient detection device
CN103136748B (en) The objective evaluation method for quality of stereo images of a kind of feature based figure
CN104751407A (en) Method and device used for blurring image
CN103065285A (en) Defogging method and device for image data
CN102480626A (en) Image processing apparatus, display apparatus and image processing program
CN111127337B (en) Image local area highlight adjusting method, medium, equipment and device
CN109801242A (en) A kind of grating image vectorization method based on the unrestrained water filling algorithm of improvement
CN104700455A (en) Method for visualizing three-dimensional data
CN110475115B (en) Screen body picture crosstalk testing method and device and storage medium
CN109726728B (en) Training data generation method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20141001

RJ01 Rejection of invention patent application after publication