CN106446957B - A kind of haze image classification method based on random forest - Google Patents

A kind of haze image classification method based on random forest Download PDF

Info

Publication number
CN106446957B
CN106446957B CN201610876682.1A CN201610876682A CN106446957B CN 106446957 B CN106446957 B CN 106446957B CN 201610876682 A CN201610876682 A CN 201610876682A CN 106446957 B CN106446957 B CN 106446957B
Authority
CN
China
Prior art keywords
image
pixel
feature
sample image
haze
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610876682.1A
Other languages
Chinese (zh)
Other versions
CN106446957A (en
Inventor
谢从华
乔伟伟
刘佳佳
姚佳俊
林春
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changshu Institute of Technology
Original Assignee
Changshu Institute of Technology
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 Changshu Institute of Technology filed Critical Changshu Institute of Technology
Priority to CN201610876682.1A priority Critical patent/CN106446957B/en
Publication of CN106446957A publication Critical patent/CN106446957A/en
Application granted granted Critical
Publication of CN106446957B publication Critical patent/CN106446957B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/50Extraction of image or video features by performing operations within image blocks; by using histograms, e.g. histogram of oriented gradients [HoG]; by summing image-intensity values; Projection analysis

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The haze image classification method based on random forest that the present invention relates to a kind of, comprising: step 1, acquire the training image collection under different haze weathers, class label is marked according to ambient air quality index;Step 2, the atmosphere illumination intensity based on Steerable filter ART network training image;Step 3, define and extract sample image in the concentration dependent dark Feature Mapping figure of haze, local maxima contrast metric mapping graph, colour difference Feature Mapping figure and saturation degree Feature Mapping figure;Step 4, the histogram feature of Feature Mapping figure is extracted;Step 5, two points of recurrence classification regression trees are established in the characteristic value section based on histogram;Step 6, there is the sample image in the selection training set put back to, establish the Random Forest model of two or more classification regression trees;Step 7, input test image extracts the histogram feature of test image Feature Mapping figure, input Random Forest model classification, according to the classification that the assembled classifier decision of majority voting method is final.

Description

A kind of haze image classification method based on random forest
Technology neighborhood
The present invention relates to Computer Image Processing and machine learning neighborhood more particularly to a kind of mists based on random forest Haze image classification method.
Background technique
In recent years, China's most area all receives the pollution of serious haze.Haze shrouds, and is blinded by sight, camera It is lower with imaging systems institute captured image color dimness, contrasts such as video monitorings, the serious degeneration of picture quality, direct shadow The visual effect for having rung image seriously affects their application range.Therefore, many applications need to pollute to by haze Image carry out defogging processing.
The research of image defogging can be traced earliest to L.Bissonnette in 1992 et al. and go for the image of mist and rainy day gas Mist.Image defogging technology experienced development in more than 20 years, from past multiple image defogging to current single image defogging, constantly There are new thought and new method to generate and be used in Practical Project, makes great progress.
Method based on non-physical model can be divided into 3 classes: colour enhancing, white balance method and contrast enhancing.Preceding two class It is the method based on color constancy.The third is contrast enhancing, it is therefore an objective to enhance the overall situation, the local contrast of image, no Consider shade mapping or color constancy problem.Typical method has algorithm of histogram equalization, warp wavelet, homomorphic filtering to calculate Method, based on atmospheriacally modulation transfer function, wavelet method and Retinex algorithm etc..
Defogging method based on physical model models atmospheric scattering, realizes image by analysis image causes for Degradation Restore, can be divided into three classes: the recovery based on partial differential equation, the recovery based on depth relationship and answering based on prior information It is former.Typical method has: Tan et al., relative to foggy image contrast with higher, is mentioned by statistics discovery fog free images The method based on the local contrast for maximizing restored image is gone out;Fattal et al. assumes transmissivity and surface projection in part Be it is uncorrelated, by estimating the reflectivity of scene to infer the method for the transmissivity of the aerial propagation of target object;He etc. People proposes method and dark and guiding based on dark and soft pick figure and filters according to the dark channel prior knowledge of image The methods of wave.
Although there is tens kinds of defogging methods at present, most methods can not judge whether piece image has haze. If image itself is without haze, using may result in color after defogging method or texture distorts, and a large amount of defoggings are wasted Time plays negative interaction.In addition, these methods are also without judging the severity of haze image, in fact some methods are only It is suitble to slight haze image, and some methods only adapt to moderate haze image, some methods can be suitble to severe haze but processing Time is long.Various defogging methods have the advantages that different and disadvantage, according to the severity of haze image, integrate a variety of defoggings Method, has great importance to image defogging at the advantages of giving full play to various methods.
Summary of the invention
To solve prior art problem, the present invention proposes a kind of haze image classification method based on random forest, figure As being divided into four class of fogless, slight, moderate and severe haze.The present invention includes the following steps:
Step 1, the image under different haze weathers is acquired, sample image training set is established, is referred to according to ambient air quality Number mark class label;
Step 2, the atmosphere illumination intensity based on Steerable filter ART network sample image;
Step 3, define and extract sample image in the concentration dependent dark Feature Mapping figure of haze, local maxima pair Than degree Feature Mapping figure, colour difference Feature Mapping figure and saturation degree Feature Mapping figure;
Step 4, the histogram feature of Feature Mapping figure is extracted;
Step 5, two points of recurrence classification regression trees are established in the characteristic value section based on histogram;
Step 6, there is the sample image in the selection training set put back to, establish the random of two or more classification regression trees Forest model;
Step 7, input test image extracts the histogram feature of test image Feature Mapping figure, inputs random forest mould Type classification, according to the classification that the assembled classifier decision of majority voting method is final.
In step 1 of the present invention, acquires the image under different haze weathers and establish sample image training set, according to surrounding air Performance figure is divided into 0-50,51-100,101-150,151-200,201-300 and is greater than 300 6 grades, preceding 2 grades of skies Imaging system institute's captured image is labeled as fog free images under makings amount weather, is imaged under the 3rd grade and the 4th grade of air quality weather System (in the present invention, image pixel is 1,000,000 or more, and exposure compensating is more than+0.5EV) institute's captured image is respectively labeled as Slight haze image and moderate haze image, imaging system institute's captured image is labeled as tight under last 2 grades of air quality weather Weight haze image, amounts to four class labels.
In step 2 of the present invention, all pixels in the dark of imaging system captured images I are arranged according to gray value descending Sequence chooses in sequence preceding 0.1% pixel, calculates their average value A as initial atmosphere illumination, using image I as leading Xiang Tu shines smothing filtering to atmosphere light using following formula:
WhereinIndicate that the atmosphere light after the filtering of ith pixel point is shone, function Gi,jIt (I) is the core letter of Steerable filter device Number, it is independent with atmosphere light distribution.Gi,j(I) it is defined as the space Gaussian kernel of the pixel j of ith pixel point and local adjacent position The product of function and illumination kernel function:
Wherein n is the number of neighbor pixel, τjIt is normaliztion constant (in the present invention), xi,xjRespectively indicate The spatial position of i and j pixel, Ii,IjThe illumination of i-th and j pixel is respectively indicated,WithRespectively indicate n phase The illumination variance of the spatial position variance of adjacent pixel and n neighbor pixel.
Step 3 of the present invention includes:
Definition and extract sample image in the concentration dependent dark Feature Mapping figure of haze:
Sample image dark is defined as red, green, blue three of all pixels in the regional area of sample image pixel The minimum value of Color Channel and the ratio between atmosphere light photograph:
Wherein, Dd(x;I) be sample image I dark, Ωd(x) a d × d centered on pixel x is indicated Neighborhood (present invention in d=5), c indicates red r, green g, a channel in indigo plant tri- Color Channels of b, Ic(y) pixel is indicated The channel c of pixel y in x neighborhood, AcIndicate that the channel the c atmosphere light of pixel x is shone.
Definition and extract sample image in the concentration dependent local maxima contrast metric mapping graph of haze:
Sample image local maxima contrast is defined as in the adjacent area of sample image pixel between all pixels The maximum average value of the quadratic sum of the difference of illumination:
Wherein Cd(x;I local maxima contrast of the pixel x in d × d neighborhood in sample image I) is indicated, y is the d of x Pixel in × d neighborhood, z indicate the pixel in d × d neighborhood of y, Ic(y),Ic(z) picture in sample image I is respectively indicated The channel the c illumination of vegetarian refreshments y and z;
Definition and extract sample image in the concentration dependent colour difference Feature Mapping figure of haze:
Colour difference is defined as the colour difference between sample image I and its half inverse image, half inverse image be original image and Maximum value between its reverse image, the half inverse image of pixel x in sample image I in the channel cDefinition such as Under:
Colour difference is the colour difference between original image and its half inverse image:
WhereinIndicate colour difference of the pixel x in sample image I in the channel coloration h, Ih(x) image I is indicated The illumination in the channel coloration h of middle pixel x;
Definition and extract sample image in the concentration dependent maximum saturation Feature Mapping figure of haze:
Maximum saturation is defined as in d × d neighborhood of sample image I pixel x minimum Color Channel and maximum color is logical The maximum inverse in the ratio between road, is calculated by following formula:
Wherein Sd(x;I the maximum saturation of the pixel x in sample image I) is indicated.
In step 4 of the present invention, by sample image with the concentration dependent dark Feature Mapping figure of haze, local maxima pair Than degree Feature Mapping figure, colour difference Feature Mapping figure and saturation degree Feature Mapping figure, it is mapped to the gray level image of [0,15], and count The histogram feature of 16 gray levels of every width characteristic image is calculated, amounts to 64 dimensional features, is denoted as f1,f2,f3,…,f64
Step 5 of the present invention includes the following steps:
Step 5-1, from M (M=1000 in the present invention) width sample image is randomly selected in training set, from every width sample image 64 dimensional features in randomly select 10 dimensional features, fiIndicate kth dimensional feature, 1≤k≤10, sample image where each feature In maximum value and minimum value value range be equally divided into m section, and be labeled as [Vk,0,Vk,1], [Vk,1,Vk,2],…, [Vk,m-1,Vk,m], it is assumed that these sections are according to ascending sort, Vk,m-1And Vk,mRespectively indicate m-th of section feature in sample image Maximum value and minimum value;
Step 5-2 establishes the decision tree of two points of recurrence post-class processings: 10 dimensional features of selection are minimum in all values section The node division decision tree of Geordie (GINI) gain, and assume feature fkIn value interval range [Vk,u-1,Vk,u] it is split vertexes, Then feature fkIt is left child, feature f less than the image subset of this interval rangekImage subset greater than this interval range is Right child recursively divides left and right child, i.e. generation post-class processing.
In step 6 of the present invention, being concentrated with from training extract size with putting back to is M2(M in the present invention2=100) training set It as root node sample, is trained since root node, establishes that a certain number of (present invention establishes 5 according to step 5 the method ) CART (Classification And Regression Tree, Taxonomy and distribution) decision tree composition random forest mould Type.
Step 7 of the present invention includes the following steps:
Step 7-1, input test image calculate dark, the local contrast of test image using the method described in step 3 The histogram feature of degree, colour difference and saturation degree image, is input in Random Forest model;
Step 7-2, Random Forest model compare the histogram feature of test image and work as since the root node of present tree The characteristic value interval range of front nodal point then enters left sibling if it is less than this value interval range, bears and otherwise enters right node, directly To one leaf node of arrival, and export the class label of prediction;
Step 7-3, select next decision tree, repeat step 7-2, until all CART decision trees all output it is pre- Class label is surveyed, the most one kind of output classification number is as a result.
The utility model has the advantages that leading to the advantage of the invention is that propose a kind of haze image classification method based on random forest It crosses and randomly selects strategy in the two link introducings of training sample and Feature Selection, so that random forest is not easy to fall into over-fitting; It is shone by the smooth atmosphere light of Steerable filter, avoids entire image and asked using identical atmosphere light according to caused local content is dimmed Topic;By the histogram feature section of defined feature mapping graph, solve the problems, such as that characteristic pattern cannot be used directly for random forest. Haze image is divided into four class of fogless, slight, moderate and severe haze through the invention, can integrate a variety of haze image processing Algorithm.
Detailed description of the invention
The present invention is done with reference to the accompanying drawings and detailed description and is further illustrated, of the invention is above-mentioned And/or otherwise advantage will become apparent.
Fig. 1 is flow chart of the present invention.
Specific embodiment
The present invention is divided into four class of fogless, slight, moderate and severe haze by establishing Random Forest model, by sample image Image, the specific process of the present invention are as shown in Figure 1.
Step 1, the image under different haze weathers is acquired, training set sample image is established, is referred to based on ambient air quality Number mark class label.
In order to establish a large amount of training sample image collection, acquire more under 4 kinds of weather of fogless, slight, moderate and severe haze Width has mist and fog free images collection, and is marked according to " ambient air quality index (AQI) technical stipulation (tentative) " (HJ633-2012) Infuse class label.
Provided according to HJ633-2012: air pollution index be divided into 0-50,51-100,101-150,151-200, 201-300 and be greater than 300 6 grades.Air pollution index is 0-50, and air quality rank is level-one, and Air Quality belongs to It is excellent;Air pollution index is 51-100, and air quality rank is second level, and Air Quality belongs to good.The present invention level-one and The image tagged shot under secondary air quality weather is fog free images.Air pollution index is 101-150, air quality grade Not Wei three-level, Air Quality belongs to slight pollution, and the present invention is light the image tagged of three-level air quality shooting all over the world Spend haze image.Air pollution index is 151-200, and air quality rank is level Four, and Air Quality belongs to moderate dirt Dye, the present invention are moderate haze image the image tagged of level Four air quality shooting all over the world.Air pollution index is 201- 300, air quality rank is Pyatyi, and Air Quality belongs to serious pollution;Air pollution index is greater than 300, air quality Rank is six grades, and Air Quality belongs to serious pollution.The present invention is the figure shot under Pyatyi and six grades of air quality weather As being labeled as serious haze image.
Step 2, the ART network of the sample image atmosphere illumination intensity based on Steerable filter.
Existing defogging method assume the atmosphere light of entire image according to be it is identical, it is in many haze images and invalid. It can become darker after darker region defogging in image, and the detailed information of image can lose.For this purpose, the present invention uses guiding filter Wave function automatically adjusts atmosphere light according to the haze image of input and shines A.
Firstly, to haze image dark channel all pixels according to gray value descending sort, preceding 0.1% most bright picture in selection Vegetarian refreshments calculates their average value A as initial atmosphere illumination.
Secondly, shining strong smothing filtering to atmosphere light using haze image I as guiding.
Wherein function Gi,jIt (I) is the kernel function of Steerable filter device, it is independent with atmosphere light distribution, it is defined as ith pixel The product of point and pixel j the space gaussian kernel function and illumination kernel function of local adjacent position:
Wherein n is the number of neighbor pixel, τjIt is normaliztion constant (in the present invention), xi,xjRespectively indicate The spatial position of i and j pixel, Ii,IjThe illumination of i-th and j pixel is respectively indicated,WithIndicate n adjacent pictures The spatial position variance and illumination variance of vegetarian refreshments.
Step 3, define and extract sample image in the concentration dependent dark of haze, local contrast, colour difference and The Feature Mappings figure such as saturation degree.
Various features can be defined on the image at present, between feature there may be many irrelevances or exist mutually according to Lai Xing.High-dimensional feature space is easy to cause the Generalization Ability of the overlong time of classification based training model, dimension disaster, model weak etc. and lacks Point.The present invention defines and is extracted each pixel of haze image and the concentration dependent dark of haze, local contrast, coloration The features such as difference and saturation degree.
(1) dark Feature Mapping figure
Dark is characterized in three Color Channels of RGB of all pixels in the regional area of image pixel x and big The minimum value of the ratio between gas illumination.It is defined as follows:
Wherein Ωd(x) d × d neighborhood (d=5 in the present invention) centered on x pixel, A are indicatedcIndicate pixel x The channel c atmosphere light.
(2) local maxima contrast metric mapping graph
It can be found by the comparison between a large amount of foggy images and fog free images, under thick fog weather condition, the comparison of image It spends low.Local maxima contrast is also one and the concentration dependent important feature of haze, is defined as haze image pixel x's The maximum average value of the quadratic sum of the difference of illumination in adjacent area between all pixels.
Wherein Cd(x;I local maxima contrast of the pixel x in d × d neighborhood in sample image I) is indicated, y is the d of x Pixel in × d neighborhood, z indicate the pixel in d × d neighborhood of y, Ic(y),Ic(z) picture of sample image I is respectively indicated The channel the c illumination of vegetarian refreshments y and z.
(3) colour difference Feature Mapping figure
For the pixel of fog free images, three and half reciprocal values not can all be overturn from original image, this will will lead to original graph Very big colour difference is generated between picture and its half inverse image.Haze is more serious in image, and colour difference is smaller.Half inverse image is original Maximum value between beginning image and its reverse image, half inverse image are defined as follows:
Colour difference is the colour difference between sample image I and its half inverse image, can be used to the concentration for detecting haze, indicates It is as follows:
WhereinIndicate the pixel x in sample image I in the colour difference in the channel coloration h.
(4) maximum saturation Feature Mapping figure
The saturation degree of image also will receive the influence of haze, local maxima saturation degree feature relevant to haze.It is defined The maximum inverse of all minimum Color Channels and the ratio between maximum color channel in d × d neighborhood for the pixel x of sample image I. The pixel x in sample image I can be calculated according to the following formula in the maximum saturation in the channel c:
The histogram feature of step 4 extraction Feature Mapping figure.
In order to reduce Characteristic Number, model accuracy is improved, the purpose of runing time is reduced.The present invention extracts step 3 The characteristic patterns such as dark, local contrast, colour difference and the saturation degree of image, be mapped to the gray level image of [0,15], and count The histogram feature of 16 gray levels of every width characteristic image is calculated, amounts to 64 dimensional features, and be denoted as f1,f2,f3,…,f64
Step 5, the characteristic value section based on image histogram is grown using the decision tree of two points of recurrence post-class processings.
Two points of recurrence post-class processing algorithms can simplify decision tree scale, improve the efficiency for generating decision tree, use CART algorithm creates two points of categorised decision trees.
If randomly selecting M width image from training image concentration, 64 features in each image extraction step 4 are random to take out Take 10 dimensional feature f in 64 dimensional featuresk(1≤k≤10) establish decision tree.Feature fkMaximum value be Vk,maxWith minimum value For Vk,minFeature value range be equally divided into m section, it is assumed that these sections according to ascending sort, and be labeled as [Vk,0, Vk,1], [Vk,1,Vk,2],…,[Vk,m-1,Vk,m], that is, each feature has m attribute value.Decision attribute is with 1,2,3,4 point Not Biao Shi image be divided into four class of fogless, slight, moderate and severe haze, example is as shown in table 1.
1 haze image categorised decision example of table
Image pattern f1 f2 f10 Decision attribute
1 [V1,0,V1,1] [V2,1,V2,2] [V10,1,V10,2] 1
2 [V1,2,V1,3] [V2,0,V2,1] [V10,3,V10,4] 2
M [V1,0,V1,1] [V2,m-1,V2,m] [V10,3,V10,4] 4
CART selects current data to concentrate the feature for having information gain the smallest as node division decision tree every time. According to the decision-tree model of generation, extend the leaf node of matching characteristic to the last to get the classification for arriving prediction.The present invention adopts Decision tree is divided with Gini index.
Assuming that M width image pattern collection is according to feature fkWhether (1≤k≤10) are in value interval range [Vk,j-1,Vk,j](1≤j ≤ m) it is divided into 2 subset M1,1And M1,2.Feature fkIn value interval range [Vk,j-1,Vk,j] in Geordie (Gini) index definition It is as follows:
Wherein Pk,j,lIndicate feature fkCharacteristic value be located at value section [Vk,j-1,Vk,j] when, decision classification belongs to l class Probability.
Feature fkIt is not interval range [Vk,j-1,Vk,j] in Gini index definition it is as follows:
WhereinIndicate feature fkCharacteristic value not value section [Vk,j-1,Vk,j] when, decision classification belongs to l class Probability.
Feature fkWhether in value interval range [Vk,j-1,Vk,j] GINI gain be defined as
Select the gain of 10 features the smallest GINI in all possible value section as node division decision tree, and Assuming that feature fkIn value interval range [Vk,j-1,Vk,j] it is the node divided, feature fkLess than the image subset of this interval range For left child, feature fkIt is right child greater than the image subset of this interval range.Recursively left and right child is divided i.e. It can produce post-class processing.
Step 6, there is the selection training sample image put back to, establish the random forest of more decision trees.
Although CART algorithm greatlies simplify model, decision tree can generate some the shortcomings that not can avoid, Such as over-fitting.Although beta pruning can reduce the generation of this phenomenon, but still cannot get ideal effect.What the present invention used Random forest is made of more CART.For each tree, the training set that they are used is to be concentrated with to put back to from total training What sampling came out.Some samples in total training set may repeatedly appear in the training set of one tree, it is also possible to never go out In the training set of present one tree.
It is M that the extraction size put back to is concentrated with from training2Sample of the training set as root node, instructed since root node Practice, a certain number of (present invention establishes 5) CART decision trees are established according to step 5 and form random forest.
The training sample that the randomness of random forest is embodied in each tree is random, the Split Attribute of each node in tree It is also randomly selected.There are the two enchancement factors, even if every decision tree does not carry out beta pruning, random forest will not be produced The phenomenon that raw over-fitting.
Step 7, to input test image, classify with the Random Forest model being established above to it;
The histogram feature of the images such as dark, local contrast, colour difference and the saturation degree of input test image is calculated, It is as follows using the prediction process of random forest:
(1) since the root node of present tree, according to the value interval range of present node, if it is less than this value section model It encloses and then enters left sibling, otherwise enter right node, until reaching some leaf node, and export the class label of prediction.
(2) next decision tree is selected, (1) is repeated, until all CART decision trees all output prediction class label, Export the most one kind of classification number as a result.
Innovative point of the invention includes:
1 theory innovation
Firstly, for the atmospherical scattering model of haze image, the present invention puts forward the atmosphere light based on Steerable filter according to strong The ART network for spending A is avoided traditional defogging method and is shone using identical atmosphere light piece image and cause to restore image The partially dark problem of regional area.Secondly, proposing the dark for haze image, local contrast, colour difference and saturation degree Etc. Feature Mappings figure random forest modeling method, utilize the histogram feature interval structure random forest of Feature Mapping figure, solution Feature Mapping of having determined figure is inconvenient to the problem of constructing Decision Classfication table.
2 application innovation
Firstly, existing haze image defogging method can only adapt to distinctive image, it is difficult to adapt to all images.The present invention Haze image is categorized into four class of fogless, slight, moderate and severe haze image, can integrate the defogging side for being suitble to all kinds of images Method, with good application prospect.The classification method specifically for haze image is also seldom seen now.Secondly, random forest It is widely used in the classification such as medical image, remote sensing images, there are no haze image classification is applied to, the present invention has been widened at random Forest applies neighborhood.
Embodiment 1
Haze image classification method process based on random forest as shown in Figure 1, the present embodiment describe base in detail In the haze image classification method of random forest, the present embodiment specific implementation process following steps 1 regard DS- using Haikang prestige The image set that ZAF7264-A imaging system acquires under different weather randomly selects 1000 width images, when according to acquisition image PM2.5 value is 4 class of fogless, slight, moderate and severe haze image labeling.
Step 2, the atmosphere illumination intensity based on each pixel of all sample images of Steerable filter ART network, wherein Number n=5 × 5 of neighborhood territory pixel.
Step 3, the Feature Mappings figures such as dark, local contrast, colour difference and the saturation degree of all sample images are calculated, Wherein the size of neighborhood is 5 × 5.
Step 4, the histogram feature of Feature Mapping figure is extracted, and calculates the histogram of 16 gray levels of every width characteristic image Figure feature amounts to 64 dimensional features, and is denoted as f1,f2,f3,…,f64
Step 5,10 dimensional feature f in 64 dimensional features are randomly selectedk(1≤k≤10) establish decision tree, wherein feature value Range is equally divided into m=5 section.Two points of recurrence classification regression trees are established in characteristic value section based on histogram;
Step 6, it is concentrated with sample of the 100 width training set of extraction put back to as root node from training, since root node Training establishes 5 CART decision tree composition random forests according to step 5.
Step 7, to input test image, with the Random Forest model being established above, according to the combination of majority voting method The final classification of classifier decision classifies to it.
In order to compare according to the performance for using different defogging methods and the single defogging method of use after classification results, the present invention Defogging analysis has been carried out to 100 width test images.Firstly, the haze image result classified according to random forest: fogless, slight, 4 classification of moderate and severe haze, the present embodiment be respectively adopted do not handle, Fattal propose independent component method, The method of the dark channel prior knowledge and Steerable filter of the method and He proposition based on polarization light model that Narasimhan is proposed. Secondly, individually using Fattal, Narasimhan and He method is to all test chart defoggings.Hautiere is used to defogging result 2 metrics evaluations proposed, value is higher, and the effect for showing that image restores is better.
First index restores visible edge ratio new in image:
What e was evaluated is the ability that the edge that can't see in haze image restores in mist elimination image.
Second index is the geometric mean for the visual rank ratio for reflecting that contrast quality is restored
WhereinWithRespectively indicate p in haze imageiP in the gradient and defogging result of pointiThe gradient of point,It is Visible edge aggregation in defogging result, nrIndicate the number of pixel on edge.
The average behavior of 100 width test images is more as shown in table 2, and the performance that the classification method of invention integrates fogging method is bright Aobvious to be better than that various defogging methods are used alone, being primarily due to sorted result can choose the defogging method being more suitable for.
The average behavior of the various defogging methods of table 2 compares
The haze image classification method based on random forest that the present invention provides a kind of, implements the side of the technical solution There are many method and approach, the above is only a preferred embodiment of the present invention, it is noted that for the common skill of this technology neighborhood For art personnel, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications Also it should be regarded as protection scope of the present invention.All undefined components in this embodiment can be implemented in the prior art.

Claims (6)

1. a kind of haze image classification method based on random forest, which comprises the steps of:
Step 1, the image under various haze weathers is acquired, the training set of sample image is established, according to ambient air quality index Mark class label;
Step 2, the atmosphere illumination intensity based on Steerable filter ART network training sample image;
Step 3, define and extract sample image in the concentration dependent dark Feature Mapping figure of haze, local maxima contrast Feature Mapping figure, colour difference Feature Mapping figure and saturation degree Feature Mapping figure;
Step 4, the histogram feature of Feature Mapping figure is extracted;
Step 5, two points of recurrence classification regression trees are established in the characteristic value section based on histogram;
Step 6, there is the sample image in the selection training set put back to, establish the random forest of two or more classification regression trees Model;
Step 7, input test image extracts the histogram feature of test image Feature Mapping figure, input Random Forest model point Class, according to the classification that the assembled classifier decision of majority voting method is final;
It in step 1, acquires the image under different haze weathers and establishes sample image training set, drawn according to ambient air quality index Be divided into 6 class, respectively be: 0~50,51~100,101~150,151~200,201~300 and be greater than 300;Before Imaging system institute's captured image is labeled as fog free images, the 3rd grade and the 4th grade of air quality weather under 2 grades of air quality weather Lower imaging system institute captured image is respectively labeled as slight haze image and moderate haze image, last 2 grades of air quality days Imaging system institute's captured image is labeled as serious haze image under gas, amounts to four class labels;
In step 2, to all pixels in the dark of imaging system institute captured image I according to gray value descending sort, choose Preceding 0.1% pixel in sequence is calculated their average value A as initial atmosphere illumination, is schemed using image I as guiding, adopted Smothing filtering is shone to atmosphere light with following formula:
WhereinIndicate the air light value after the filtering of ith pixel point, function Gi,jIt (I) is the kernel function of Steerable filter device, with Atmosphere light distribution is independent, Gi,j(I) be defined as the pixel j of ith pixel point and local adjacent position space gaussian kernel function and The product of illumination kernel function:
Wherein n is the number of neighbor pixel, τjFor normaliztion constant,xi,xjRespectively indicate i-th and j pixel Spatial position, Ii,IjThe illumination of i-th and j pixel is respectively indicated,WithRespectively indicate the sky of n neighbor pixel Between position variance and n neighbor pixel illumination variance.
2. the method according to claim 1, wherein step 3 includes:
Definition and extract sample image I in the concentration dependent dark Feature Mapping figure of haze:
Sample image dark is defined as three colors of red, green, blue of all pixels in the regional area of sample image pixel The minimum value in channel and the ratio between atmosphere light photograph:
Wherein, Dd(x;I) be sample image I dark, Ωd(x) neighbour of a d × d centered on pixel x is indicated Domain, c indicate red r, green g, a channel in indigo plant tri- Color Channels of b, Ic(y) indicate the pixel y's in pixel x neighborhood The illumination in the channel c, Ac(x) indicate that the channel the c atmosphere light of pixel x is shone;
Definition and extract sample image in the concentration dependent local maxima contrast metric mapping graph of haze:
Sample image local maxima contrast is defined as the difference of the illumination in sample image pixel neighborhood of a point between all pixels The maximum average value of quadratic sum:
Wherein, Cd(x;I local maxima contrast of the pixel x in d × d neighborhood in sample image I, Ω) are indicatedd(y) it indicates The neighborhood of a d × d centered on pixel y, y are the pixels in d × d neighborhood of pixel x, and z indicates pixel y's Pixel in d × d neighborhood, Ic(y),Ic(z) channel the c illumination and pixel z of pixel y in sample image I are respectively indicated The channel c illumination;
Definition and extract sample image in the concentration dependent colour difference Feature Mapping figure of haze:
Colour difference is defined as the colour difference between sample image I and its half inverse image, and half inverse image is original image and it Maximum value between reverse image, the half inverse image of pixel x in sample image I in the channel cIt is defined as follows:
Colour difference is the colour difference between original image and its half inverse image:
WhereinIndicate colour difference of the pixel x in sample image I in the channel coloration h, Ih(x) picture in image I is indicated The illumination in the channel coloration h of vegetarian refreshments x;
Definition and extract sample image in the concentration dependent maximum saturation Feature Mapping figure of haze:
Maximum saturation is defined as in d × d neighborhood of the pixel x of sample image I minimum Color Channel and maximum color channel The ratio between maximum inverse, calculated by following formula:
Wherein Sd(x;I the maximum saturation of the pixel x in sample image I) is indicated.
3., will be concentration dependent with haze in sample image according to the method described in claim 2, it is characterized in that, in step 4 Dark Feature Mapping figure, local maxima contrast metric mapping graph, colour difference Feature Mapping figure and saturation degree Feature Mapping figure, It is mapped to the gray level image of [0,15], and calculates the histogram feature of 16 gray levels of every width characteristic image, amounts to 64 Wei Te Sign, is denoted as f1,f2,f3,…,f64
4. according to the method described in claim 3, it is characterized in that, step 5 includes the following steps:
Step 5-1 randomly selects M width sample image from training set, randomly selects from 64 dimensional features of every width sample image 10 dimensional features, fkIndicate kth dimensional feature, 1≤k≤10, in sample image where each feature maximum value and minimum value take Value range is equally divided into m section, and is labeled as [Vk,0,Vk,1], [Vk,1,Vk,2],…,[Vk,m-1,Vk,m], it is assumed that these sections According to ascending sort, Vk,m-1And Vk,mRespectively indicate the maximum value and minimum value of m-th of section feature in sample image;
Step 5-2 establishes the decision tree of two points of recurrence post-class processings: 10 dimensional features of selection minimum Geordie in all values section The node division decision tree of gain, and assume feature fkIn value interval range [Vk,u-1,Vk,u] it is split vertexes, then feature fkIt is small In this interval range image subset be left child, feature fkIt is right child greater than the image subset of this interval range, passs Left and right child is divided with returning, i.e. generation post-class processing.
5. according to the method described in claim 4, it is characterized in that, in step 6, it is concentrated with from training and extracts size with putting back to and be M2Training set as root node sample, trained since root node, a certain number of CART decision tree groups established according to step 5 At Random Forest model.
6. according to the method described in claim 5, it is characterized in that, step 7 includes the following steps:
Step 7-1, input test image calculate the dark of test image, local contrast, colour difference and saturation degree image Histogram feature is input in Random Forest model;
Step 7-2, Random Forest model compare the histogram feature of test image and work as prosthomere since the root node of present tree The characteristic value interval range of point, then enters left sibling if it is less than this value interval range, otherwise enters right node, until reaching One leaf node, and export the class label of prediction;
Step 7-3 selects next decision tree, step 7-2 is repeated, until all CART decision trees all output prediction class It is not worth, the most one kind of output classification number is as a result.
CN201610876682.1A 2016-10-08 2016-10-08 A kind of haze image classification method based on random forest Active CN106446957B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610876682.1A CN106446957B (en) 2016-10-08 2016-10-08 A kind of haze image classification method based on random forest

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610876682.1A CN106446957B (en) 2016-10-08 2016-10-08 A kind of haze image classification method based on random forest

Publications (2)

Publication Number Publication Date
CN106446957A CN106446957A (en) 2017-02-22
CN106446957B true CN106446957B (en) 2019-02-22

Family

ID=58172367

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610876682.1A Active CN106446957B (en) 2016-10-08 2016-10-08 A kind of haze image classification method based on random forest

Country Status (1)

Country Link
CN (1) CN106446957B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107093173A (en) * 2017-03-27 2017-08-25 湖南大学 A kind of method of estimation of image haze concentration
CN108875762B (en) * 2017-05-16 2022-03-15 富士通株式会社 Classifier training method, image recognition method and image recognition device
CN107341456B (en) * 2017-06-21 2020-08-14 燕山大学 Weather sunny and cloudy classification method based on single outdoor color image
CN108416368A (en) * 2018-02-08 2018-08-17 北京三快在线科技有限公司 The determination method and device of sample characteristics importance, electronic equipment
CN109409402A (en) * 2018-09-06 2019-03-01 中国气象局气象探测中心 A kind of image contamination detection method and system based on dark channel prior histogram
CN109711441B (en) * 2018-12-13 2021-02-12 泰康保险集团股份有限公司 Image classification method and device, storage medium and electronic equipment
CN110085324B (en) * 2019-04-25 2023-09-08 深圳市华嘉生物智能科技有限公司 Multiple survival terminal result joint analysis method
CN110288199A (en) * 2019-05-29 2019-09-27 北京航空航天大学 The method of product quality forecast
CN110334767B (en) * 2019-07-08 2023-02-21 重庆大学 Improved random forest method for air quality classification
CN111738064B (en) * 2020-05-11 2022-08-05 南京邮电大学 Haze concentration identification method for haze image
JP2022057784A (en) * 2020-09-30 2022-04-11 キヤノン株式会社 Imaging apparatus, imaging system, and imaging method
CN115481835B (en) * 2021-05-31 2024-02-02 四川大学 Atmospheric pollutant hazard assessment method based on continuous exposure generalized exact match

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908141A (en) * 2010-08-04 2010-12-08 丁天 Video smoke detection method based on mixed Gaussian model and morphological characteristics
CN101950416A (en) * 2010-09-15 2011-01-19 北京理工大学 Bidirectional filtration-based real-time image de-hazing and enhancing method
CN102708651A (en) * 2012-05-23 2012-10-03 无锡蓝天电子有限公司 Image type smoke fire disaster detection method and system
CN103903273A (en) * 2014-04-17 2014-07-02 北京邮电大学 PM2.5 grade fast-evaluating system based on mobile phone terminal
CN104517126A (en) * 2014-12-26 2015-04-15 北京邮电大学 Air quality assessment method based on image analysis
CN104834944A (en) * 2015-05-26 2015-08-12 杭州尚青科技有限公司 Cooperative training-based city region air quality estimation method
CN104881879A (en) * 2015-06-15 2015-09-02 北京航空航天大学 Remote sensing image haze simulation method based on dark-channel priori knowledge
CN105005773A (en) * 2015-07-24 2015-10-28 成都市高博汇科信息科技有限公司 Pedestrian detection method with integration of time domain information and spatial domain information
CN105844295A (en) * 2016-03-21 2016-08-10 北京航空航天大学 Video smog fine classification method based on color model and motion characteristics

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101237089B1 (en) * 2011-10-12 2013-02-26 계명대학교 산학협력단 Forest smoke detection method using random forest classifier method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101908141A (en) * 2010-08-04 2010-12-08 丁天 Video smoke detection method based on mixed Gaussian model and morphological characteristics
CN101950416A (en) * 2010-09-15 2011-01-19 北京理工大学 Bidirectional filtration-based real-time image de-hazing and enhancing method
CN102708651A (en) * 2012-05-23 2012-10-03 无锡蓝天电子有限公司 Image type smoke fire disaster detection method and system
CN103903273A (en) * 2014-04-17 2014-07-02 北京邮电大学 PM2.5 grade fast-evaluating system based on mobile phone terminal
CN104517126A (en) * 2014-12-26 2015-04-15 北京邮电大学 Air quality assessment method based on image analysis
CN104834944A (en) * 2015-05-26 2015-08-12 杭州尚青科技有限公司 Cooperative training-based city region air quality estimation method
CN104881879A (en) * 2015-06-15 2015-09-02 北京航空航天大学 Remote sensing image haze simulation method based on dark-channel priori knowledge
CN105005773A (en) * 2015-07-24 2015-10-28 成都市高博汇科信息科技有限公司 Pedestrian detection method with integration of time domain information and spatial domain information
CN105844295A (en) * 2016-03-21 2016-08-10 北京航空航天大学 Video smog fine classification method based on color model and motion characteristics

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《引导滤波在雾天图像清晰化中的应用》;王伟鹏等;《华侨大学学报(自然科学版)》;20150624;第36卷(第3期);正文部分第2节

Also Published As

Publication number Publication date
CN106446957A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
CN106446957B (en) A kind of haze image classification method based on random forest
CN110135269B (en) Fire image detection method based on mixed color model and neural network
CN110555465B (en) Weather image identification method based on CNN and multi-feature fusion
CN104050471B (en) Natural scene character detection method and system
CN103578119B (en) Target detection method in Codebook dynamic scene based on superpixels
CN109165577A (en) A kind of early stage forest fire detection method based on video image
CN109035149A (en) A kind of license plate image based on deep learning goes motion blur method
CN102902956B (en) A kind of ground visible cloud image identifying processing method
CN108520516A (en) A kind of bridge pavement Crack Detection and dividing method based on semantic segmentation
CN106934386B (en) A kind of natural scene character detecting method and system based on from heuristic strategies
CN108388905B (en) A kind of Illuminant estimation method based on convolutional neural networks and neighbourhood context
CN111832443B (en) Construction method and application of construction violation detection model
CN105046653B (en) A kind of video raindrop minimizing technology and system
CN109558806A (en) The detection method and system of high score Remote Sensing Imagery Change
CN104598924A (en) Target matching detection method
CN107066972B (en) Natural scene Method for text detection based on multichannel extremal region
CN107564022A (en) Saliency detection method based on Bayesian Fusion
CN107403418A (en) Defogging and the underwater picture Enhancement Method of color correction are carried out based on passage transmissivity
CN108320274A (en) It is a kind of to recycle the infrared video colorization method for generating confrontation network based on binary channels
CN105069816B (en) A kind of method and system of inlet and outlet people flow rate statistical
CN105844213B (en) Green fruit recognition method
CN106991686A (en) A kind of level set contour tracing method based on super-pixel optical flow field
CN110363727A (en) Image defogging method based on multiple dimensioned dark channel prior cascade deep neural network
CN110210577A (en) A kind of deep learning and recognition methods for intensive flock of birds
CN105335949A (en) Video image rain removal method and system

Legal Events

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