A kind of SAR image segmentation method based on watershed algorithm and dictionary learning
Technical field
The invention belongs to synthetic aperture radar (SAR) image application fields, are related to a kind of SAR image segmentation method, especially
It is a kind of SAR image segmentation method based on watershed algorithm and dictionary learning.
Background technique
Since SAR imaging technique has the advantage round-the-clock, the factors such as climate do not influence so that it in national product and
Very big effect has been played in construction.And also just become the hot spot and emphasis of people's research to the processing of SAR image, wherein
SAR image segmentation is as to the fundamental operation during image procossing, the also concern by more and more people.Spectral clustering
Algorithm is common a kind of algorithm in processing image segmentation problem, but since the algorithm is difficult to handle the data of magnanimity, so its
Using being restricted.
Dividing method based on mathematical morphology is method important always in the field of image segmentation.Based on Mathematical Morphology
A kind of mathematical tool of the method based on image aspects, wherein more classical algorithm, such as watershed algorithm
(watershed algorithm).Watershed algorithm has many good qualities, his scale is intuitive, and the width of cut-off rule is single pixel
And closure is continuous, so being paid attention in recent years by many people, the method for dictionary learning is successfully applied to many fields, such as:
Classification, segmentation, identification, super-resolution, denoising etc..
It is that everybody is common using the pixel in image as the method that a sample is handled in image segmentation problem
Method, and traditional clustering method has spectral clustering etc., but the algorithm is difficult to that a large amount of data are effectively treated.To understand
The problem of certainly above-mentioned SAR image is divided, the invention proposes the SAR image segmentation sides based on watershed algorithm and dictionary learning
Method.Initial segmentation is carried out to image first, obtains the training sample of some tape labels, and the data of every a kind of tape label, benefit
It obtains a statistic histogram under such obtained dictionary with arest neighbors, counts in dictionary atomic distance training data most
Close number.Then in order to divide an image into some pockets, make over-segmentation of watershed, then by inside with picture
Vegetarian refreshments is that unit is handled, and by using the method for statistic histogram, is sorted out, obtains final segmentation result.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, the technical problem to be solved by the present invention is to how be directed to high resolution SAR
Image carries out the segmentation identification of efficiently and accurately using the principle of watershed algorithm and dictionary learning.
To achieve the above object, the present invention provides the SAR image segmentation methods of a kind of watershed algorithm and dictionary learning.
Its feature includes:
(1) SAR image pre-processes: since there are a large amount of speckle noises for SAR image itself, therefore first with Denoising Algorithm pair
Original image is pre-processed, and so that image is become more smooth, while extracting three layers of wavelet character;
(2) initial partitioning is carried out to original image using K-means algorithm: selects some lean on from the segmentation result of every one kind
The data of such nearly cluster centre;Every one kind data obtain such dictionary, the instruction of every one kind using K-means algorithm
The arest neighbors for practicing data calculating and the category dictionary atom, obtains a statistic histogram, and every one kind data all obtain a histogram
Figure;
(3) initial partitioning is carried out using watershed algorithm: to treated in (2) training image, finding out its morphocline
Image calculates floating point activities image, then is split with watershed algorithm;
(4) region division: to the image after segmentation in (3), the data in each pocket regard a kind of data as
Data acquisition system corresponds to every a kind of word by all data in the set respectively with the atom computing arest neighbors in each category dictionary
We can obtain a statistic histogram to allusion quotation, calculate and be somebody's turn to do corresponding to what the histogram and original training data of every one kind obtained
Error between the histogram of class;Judge that the error on which kind of is minimum, which kind of the data in set are just divided into, according to
It is secondary to divide all pockets, obtain final segmentation result.
Further, in described (1) using open form state reconstruction filter remove in image some inessential details and
Small noise.When calculating wavelet character, three layers of Stationary Wavelet Transform are carried out to original image, obtain coefficient matrix coefm1(i1,
j1), m1=1,10, as m1=1, coefm1(i1,j1) represent low frequency coefficient;As m1 > 1, coefm1(i1,j1) represent height
Frequency coefficient.10 dimension sub-belt energy feature e (i, j)=[e are extracted to each pixel1(i,j),...,e10(i,j)]T, as this
The wavelet character of pixel:
Wherein, w × w is the size of sliding window, coefm1(i1,j1) it is i-th in stationary wavelet subband1Row jth1Column correspond to
Coefficient value.
The classification number for needing to cluster in (2) is K, is selected in the segmentation result of every one kind some in such cluster
The data of the heart;Every one kind data obtain such dictionary using K-means algorithm, the training data of every one kind calculate and
The arest neighbors of the category dictionary atom, obtains a statistic histogram, and every one kind data all obtain a histogram;
Morphometric characters subtract corrosion transformation by dilation transformation and obtain in (3):
Wherein, b is structural element, and Θ indicates erosion operation,Dilation operation is indicated, if having grey scale change in image very
Big pocket, then the value of structural element will suitably reduce, and otherwise may be filtered.Floating point activities image definition are as follows:
Fimg (f)=grad (f) * grad (f)/255.0
The pocket for generating watershed algorithm over-segmentation in (4) acquires statistics with the training sample of tape label
Histogram seeks residual error by the statistic histogram as dictionary, to determine which kind of the region belongs to.Scheme with traditional SAR
As dividing method is compared, validity and accuracy of the present invention in identification process are higher, and algorithm complexity is lower.
The technical effect of design of the invention, concrete scheme and generation will be described further below, with fully
Solve the purpose of the present invention, feature and effect.
Specific embodiment
A specific embodiment of the invention addressed below
(1) remove some inessential details and small noise in image using open form state reconstruction filter.It is counting
When calculating wavelet character, three layers of Stationary Wavelet Transform are carried out to original image, obtain coefficient matrix coefm1(i1,j1), m1=1,10, when
When m1=1, coefm1(i1,j1) represent low frequency coefficient;As m1 > 1, coefm1(i1,j1) represent high frequency coefficient.To each pixel
Point extracts 10 dimension sub-belt energy feature e (i, j)=[e1(i,j),...,e10(i,j)]T, wavelet character as the pixel:
Wherein, w × w is the size of sliding window, coefm1(i1,j1) it is i-th in stationary wavelet subband1Row jth1Column correspond to
Coefficient value.
(2) initial partitioning is carried out to original image using K-means algorithm: selects some lean on from the segmentation result of every one kind
The data of such nearly cluster centre;Every one kind data obtain such dictionary, the instruction of every one kind using K-means algorithm
The arest neighbors for practicing data calculating and the category dictionary atom, obtains a statistic histogram, and every one kind data all obtain a histogram
Figure;
(3) corrosion transformation is subtracted by dilation transformation and obtains morphometric characters:
Wherein, b is structural element, and Θ indicates erosion operation,Dilation operation is indicated, if having grey scale change in image very
Big pocket, then the value of structural element will suitably reduce, and otherwise may be filtered.Floating point activities image definition are as follows:
Fimg (f)=grad (f) * grad (f)/255.0
(4) data in each pocket regard the data acquisition system of a kind of data as, by all data in the set
Respectively with the atom computing arest neighbors in each category dictionary, corresponding to each category dictionary, we can obtain a statistics histogram
Figure calculates the error between such histogram that the histogram for corresponding to every one kind and original training data obtain;Judge
Error on which kind of is minimum, which kind of the data in set are just divided into, successively divides all pockets,
Obtain final segmentation result.
The preferred embodiment of the present invention has been described in detail above.It should be appreciated that the ordinary skill of this field is without wound
The property made labour, which according to the present invention can conceive, makes many modifications and variations.Therefore, all technician in the art
Pass through the available technology of logical analysis, reasoning, or a limited experiment on the basis of existing technology under this invention's idea
Scheme, all should be within the scope of protection determined by the claims.