Summary of the invention
The purpose of the present invention is aiming at the deficiencies in the prior art, it is provided that the hyperspectral classification of a kind of combining space information
Result optimizing method.The method compensate for traditional mode sorting technique and ignores the information of space dimension in hyperspectral classification problem
Deficiency.In order to the result of spectrum dimension classification is optimized, present invention introduces space dimension information, available adaptive threshold edge
Extract and internal expansion method realizes.
The inventive method comprises the following steps:
1) EO-1 hyperion spectral domain classification.
First data are done normalized, and according to priori, in each atural object category regions, random chooses
A certain proportion of training sample composing training sample set;Then carrying out the training of grader, the grader of employing is for supporting vector
Machine;Finally carry out the test of data with the grader trained, the result of spectral domain classification can be obtained.
2) adaptive threshold edge extracting
Adaptive threshold edge extracting is divided into extraction multiband gradient map and by an adaptive threshold binary conversion treatment two
Part.
2.1) multiband gradient map is extracted
Concretely comprising the following steps of extraction multiband gradient map:
The first step: select the data that n object edge wave band clearly (assuming n=m) composition extracts for object edge
Collection.
And calculate each wave band each pixel partial derivative under abscissa and vertical coordinate:
Wherein f (n) represents every wave band data.
Second step: calculate the sum of each wave band partial derivative dot product:
I.e. can get 3 matrixes.
3rd step: the rate of change F (θ) on the maximum rate of change direction θ of calculating and the direction:
I.e. can get multi-wavelength data features of edge gradient maps F (θ).
2.2) adaptive threshold binary conversion treatment
After obtaining gradient map, if using single threshold value T that view picture gradient map is carried out binary conversion treatment, it is difficult to accomplish
While extracting more object edge, suppress more background edge.The present invention proposes a kind of to image elder generation piecemeal, then selects
Take an adaptive threshold value to each piece of method carrying out binary conversion treatment.The size of the optimal threshold of each piece and its gradient
Average is directly proportional.
First, this characteristic of area distribution should be into according to the pixel of same target, can be spectral domain classification knot
Fruit dot is divided into polylith region automatically, and (distance is classified as one piece less than the result points of 3 pixels) also thinks every piece of area pixel
Point is little for noise, leaves out, finally obtains N block region.And calculate the central point in each piece of region;
Then, with each central point as the center of circle, drawing a circle, radius can be asked according to the number of every piece of regional aim point cluster
, the area that can select circle is 3 times of segmented areas pixel, thus can substantially cover each target, extracts in circle
Gradient map, it is thus possible to obtain N width goal gradient figure.
Calculate average K of pixel gradient in each circle simultaneouslyN, according to formula
TN=aKN+ b (8)
It is calculated threshold value T of each round inside gradient figureN, wherein a, b are two variablees, need to be according to the big ditty of real data
Joint.
Finally, by each threshold value TNEach round inside gradient figure is carried out binary conversion treatment and edge thinning processes, can obtain
Edge to N number of target.Seek union, be i.e. the edge of all targets.
3) internal expansion method
The invention allows for a kind of internal expansion method for spatial domain result optimizing.Obtaining impact point segmented areas
After edge contour information, the pixel at contoured interior is expanded, until being full of this edge contour.
The first step: extract the existing pixel of target (after the noise spot that delete step 4 obtains), and judge each pixel
(i, whether j) in each contour area, the step of judgement is point: (1) chooses the profile point coordinate gone together with this pixel
(X1n,Y1n), n=1,2 ... and with the profile point coordinate (X of this pixel same column2m,Y2m),m=1,2,...;(2) if there is andThen can determine whether that this pixel is inside target area.
Second step: if this pixel is in target internal, then once expand this point, and newly obtained point is classified as target
Point.Wherein, the template that expansive working uses is:
Compared with the template that conventional 3x3 is all 1, because the four of template p angles are all 0, it is oblique running into object edge
When limit or more irregular situation, impact point would not expand into target external.
3rd step: repeat step 1 and 2, until terminating when not putting increase.
4th step: result is done union and just can obtain the stacking chart of target and profile.Cut all profile point can obtain
Pure impact point, but this outermost one also having deducted target encloses profile and some internal pixels, in order to solve this problem,
Can be tried again expansion to image.I.e. can get final result figure.
The method have the benefit that the present invention more fully make use of the information that high-spectral data comprises, improve Gao Guang
Spectrum image classification accuracy.
Detailed description of the invention
The present invention, according to spatial-domain information, first proposed one adaptive threshold and asks for high spectrum image edge contour
Method: traditional method less effective carrying out edge extracting with single band data, single threshold, so the present invention is first with multiple
The data of wave band extract gradient map, then carry out edge extracting by one group of adaptive threshold value.
Then also been proposed a kind of internal expansion method.After obtaining edge contour, traditional region-growing method is used to carry out
Optimize and need completely enclosed edge contour, but this hardly results in when reality is applied, and the internal expansion method that the present invention proposes
Even if in the face of the edge contour not exclusively closed, preferable result also can be obtained.
Hyperspectral classification result based on SVM support vector machine can be optimized in conjunction with two kinds of methods.
Below in conjunction with embodiment, the invention will be further described.
1) data general introduction
Experimental data is provided by Changchun Institute of Optics, Fine Mechanics and Physics, CAS.Size of data is 226 ×
500 × 155 pixels, upper right side semitrailer include military green iron plate target 5 from left to right (for target 1, each target size
About 16 × 29 pixels), upper left side comprises military green plank target 5 from left to right (for target 2, each target size about 17 × 30
Pixel), other are background, comprise unrelated non-targeted target 4, van 1, semitrailer 2, the woods, brushwood etc..The
145 wave band datas are as shown in Figure 1.
The inventive method flow chart is as shown in Figure 2.
2) spectral domain classification
Support vector machine is selected as grader, data to be classified.
First, the pixel composition training sample set in background pixel point, 30% target 1 and 30% target 2 region of 2% is selected;
The followed by training of grader, selecting gaussian radial basis function is the kernel function of support vector machine, takes grid data service to ginseng
Number c and γ optimizing (c be penalty factor, γ be kernel functional parameter);Finally with the grader trained, data are classified.Mesh
Mark 1 and target 2 spectrum dimension classification results are as shown in Figure 3.
Spectrum dimension classification results shows, the classification accuracy rate for military green iron plate only has 23.44%, for military green plank
Classification accuracy rate only has 30.17%, and general classification accuracy is 26.80%, and classification results is the most undesirable.
3) object edge is extracted
The first step: the high-spectral data composition of 127 to 148 wave bands that first selection object edge is more visible is for target limit
The data set that edge extracts.
Second step: calculate each pixel partial derivative under abscissa and vertical coordinate according to formula (1) and formula (2),
Gradient operator is Sobel operator;The gradient map of multi-wavelength data, 127 to 148 wave bands it are calculated further according to formula (3)-(7)
Data gradient figure is as shown in Figure 4.
3rd step: be loaded into spectral domain classification results, distance is classified as one piece of region less than the result points of 3 pixels, with
Time delete pixel number less than 5 region, target 1 and target 2 can be divided into 5 pieces of regions.
4th step: ask for gradient mean value K in every piece of regionN, the adaptive thresholding in every piece of region can be tried to achieve according to formula (8)
Value TN, wherein, a, b value has taken 2 and-0.39.The edge contour of target 1 is as shown in Figure 5.
4) internal expansion
After obtaining impact point piecemeal result and objective contour region, it is possible to process by internal expansion method, target 1
With the classification results optimization figure of target 2 as shown in Figure 6.
5) result and analysis
After spectrum dimension classification results and optimization, classification accuracy statistical table is as shown in table 1.
Table 1. classification results statistical table (%)
|
Spectral domain classification results |
After spatial information optimizes |
Target 1(military green iron plate target) |
23.44 |
93.52 |
Target 2(military green plank target) |
30.17 |
95.37 |
Target population |
26.81 |
94.48 |
Classification results shows, traditional spectral domain classifying quality based on SVM support vector machine is poor;Introducing space letter
After breath, target 1(military green iron plate target) classification accuracy rise to 93.52% from 23.44%, target 2(military green plank target)
Classification accuracy rise to 95.48% from 30.17%, be respectively increased 70.08% and 65.37%.
It is demonstrated experimentally that when high-spectral data being carried out target classification by traditional sorting technique, introducing spatial information has
It is beneficial to the lifting of nicety of grading.