CN108921194B - Terrain slope classification self-adaptive clustering method - Google Patents

Terrain slope classification self-adaptive clustering method Download PDF

Info

Publication number
CN108921194B
CN108921194B CN201810550983.4A CN201810550983A CN108921194B CN 108921194 B CN108921194 B CN 108921194B CN 201810550983 A CN201810550983 A CN 201810550983A CN 108921194 B CN108921194 B CN 108921194B
Authority
CN
China
Prior art keywords
slope
clustering
target area
dem data
clusters
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
CN201810550983.4A
Other languages
Chinese (zh)
Other versions
CN108921194A (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.)
Hohai University HHU
Original Assignee
Hohai University HHU
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 Hohai University HHU filed Critical Hohai University HHU
Priority to CN201810550983.4A priority Critical patent/CN108921194B/en
Publication of CN108921194A publication Critical patent/CN108921194A/en
Application granted granted Critical
Publication of CN108921194B publication Critical patent/CN108921194B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • 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

Landscapes

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

Abstract

The invention relates to a terrain and slope classification self-adaptive clustering method, which classifies the slope information on the terrain from grid DEM data by utilizing a K-means clustering method, determines the standard of a clustering algorithm through an algorithm for extracting a peak area, and can adaptively classify all levels around the peak area according to the elevation so as to ensure that the classified slope is matched with a contour line generated by an original image and improve the quality of slope classification to the maximum extent.

Description

Terrain slope classification self-adaptive clustering method
Technical Field
The invention relates to a terrain and slope classification self-adaptive clustering method, and belongs to the fields of terrain classification and data mining technology.
Background
On the slope surface of the nature, different parts have respective topographic features, so that a plurality of geographic processes such as soil, hydrology and the like on different slope surfaces also have different features. Therefore, researchers have divided different parts of a slope into slope positions (such as a slope shoulder, a slope toe and the like) to study, and the slope positions become an important factor in a plurality of geographic or ecological process models related to terrain.
The K-means clustering method is a common method in the field of data mining and is widely applied. The K-means clustering algorithm is independently proposed in different scientific research fields respectively in 1955 by Steinhaus, 1957 by Lloyd, 1965 by Ball & Hall and 1967 by McQueen. After the K-means clustering algorithm is proposed, the K-means clustering algorithm is widely researched and applied in different subject fields, and a large number of different improved algorithms are developed. Although the K-means clustering algorithm has been proposed for over 50 years, it is still one of the most widely used partitional clustering algorithms. Easy to implement, simple, efficient, successful application cases and experience are the main reasons for their still popularity.
At present, no mature slope position calculation method exists, most researchers consider that a 2km × 2km range in a low hilly area usually comprises 1-2 hills covering mountain tops and slope feet, therefore, a window moving method is adopted, the method uses a 2km × 2km window to slide on DEM data, elevation values in the window are divided at equal intervals and divided into 4 slope positions of a slope lower part, a slope middle part, a slope upper part and a ridge from bottom to top, and the slope position type of a central lattice point in the window is determined by comparing the elevations of the central lattice point of the window with the elevations of other lattice points.
However, the method has the problems that only specific terrain conditions and accuracy are not high, when the grid data are extremely huge, the window moving method is very complicated, meanwhile, the square window is not suitable to be too large, and the accuracy of the classified slope information is reduced due to the too large window.
Disclosure of Invention
The invention aims to solve the technical problem of providing a terrain and slope classification self-adaptive clustering method, which comprises the steps of obtaining a mountain top area in an original DEM data image of a target area, determining a clustering standard, self-adaptively selecting a proper K-means clustering mass center, and dividing the slopes.
The invention adopts the following technical scheme for solving the technical problems: the invention designs a terrain and slope classification self-adaptive clustering method, which comprises the following steps:
step A, adopting white top cap conversion operation to obtain a mountain top area in an original DEM data image of a target area, and entering step B;
b, initializing and presetting clustering centers respectively corresponding to slope classes according to the gray pixel values of the mountain top area and the continuous change of the gray pixel values aiming at the original DEM data image of the target area, and entering the step C;
c, based on preset clustering centers respectively corresponding to the slope classes, clustering operation is carried out on pixel points in the original DEM data image of the target area to obtain clusters respectively corresponding to the slope classes, and the step D is carried out;
step D, respectively obtaining new clustering centers of slope category clusters, judging whether the new clustering centers of the slope category clusters are all the clustering centers corresponding to the clustering operation, and if so, finishing the clustering operation of the terrain slopes in the target area; otherwise, updating the new clustering center of each slope class cluster to the clustering center of each slope class cluster, and returning to the step C.
As a preferred technical scheme of the invention, the method further comprises a step E, wherein after the clustering operation of the terrain and slope positions of the target area is completed in the step D, the step E is carried out;
and E, according to the terrain slope clusters corresponding to the target area and the number of pixel points in each cluster, realizing reclassification of each slope category of the target area.
As a preferred technical solution of the present invention, the step a includes the steps of:
a1, performing corrosion transformation operation and expansion transformation operation on an original DEM data image of a target area according to the following functions respectively;
Erosion:Eλf(X)=inf{f(u):u∈λ}
Dilation:Dλf(X)=sup{f(u):u∈λ}
respectively obtaining the corrosion change images E of the target areasλf (X), and a target region expansion change image Dλf (X), then step A2; the radius is preset based on the mountain top size in the original DEM data image of the target area; (x) is the whole image of the target area, f (u) represents the gray value of u pixel points in the image of the target area, inf () represents corrosion transformation operation, and sup () represents expansion transformation operation;
step A2, according to the corrosion change image E of the target areaλf (X), and a target region expansion change image Dλf (X), as a function:
Opening:Oλ(X)=Dλ(Eλf(X))
the structural element is adopted to slide the original DEM data image of the target area, the opening operation is realized, and other areas O except the mountain top in the original DEM data image of the target area are obtainedλ(x) Then proceed to step a 3;
step A3, according to the following formula:
WTH={x:f(x)-Oλ(x)}
using the original DEM data image of the target area and Oλ(x) And obtaining a mountain top area set WTH in the original DEM data image of the target area.
As a preferred embodiment of the present invention, in the step a3, for each mountain top in the mountain top area set WTH in the original DEM data image of the target area, a mountain top with a height greater than a preset mountain top height threshold t is obtained, and the mountain top area set WTH is updated.
As a preferred technical solution of the present invention, the step C includes the following steps:
based on preset clustering centers respectively corresponding to the slope classes, respectively aiming at each pixel point in the original DEM data image of the target area, Euclidean distances between the pixel point and the clustering centers of the slope classes are obtained, and then the pixel point is divided into clusters of the clustering centers corresponding to the shortest Euclidean distances, so that clustering of the pixel points in the original DEM data image of the target area is realized, namely, clusters respectively corresponding to the slope classes are obtained.
As a preferred technical solution of the present invention, said step C further comprises clustering according to each slope category, respectively, to obtain a sum j (C) of squares of euclidean distances between all pixel points in the clusters and a cluster center during the clustering operation, respectively;
after new clustering centers of the slope category clusters are obtained in the step D respectively, the square sum J' (C) of Euclidean distances between all pixel points in the clusters and the new clustering centers is obtained; then judging whether the new clustering centers of all slope category clusters are the clustering centers corresponding to the clustering operation or not, and judging whether J' (C) of all slope category clusters are equal to J (C) of the corresponding clusters or not; if the two judgments are both yes, finishing the clustering operation of the terrain slope of the target area; otherwise, updating the new clustering center of each slope class cluster to the clustering center of each slope class cluster, and returning to the step C.
Compared with the prior art, the terrain and slope classification self-adaptive clustering method has the following technical effects: the terrain and slope classification self-adaptive clustering method provided by the invention classifies the slope information on the terrain from the grid DEM data by utilizing a K-means clustering method, determines the standard of a clustering algorithm through an algorithm for extracting a peak area, and can adaptively classify all levels around the peak area according to the elevation so as to ensure that the classified slope is matched with a contour line generated by an original image and improve the quality of slope classification to the maximum extent.
Drawings
FIG. 1 is a schematic diagram of original DEM data in an embodiment of a terrain and slope classification adaptive clustering method applying the invention;
FIG. 2 is a flow chart of the mountaintop area set WTH in the terrain and slope classification adaptive clustering method of the present invention;
FIG. 3 is a flow chart of a K-means algorithm in a clustering method in the terrain slope classification adaptive clustering method of the present invention;
FIG. 4 is a diagram of the clustering results of the adaptive classification of the terrain and slope in the adaptive clustering method of the present invention.
Detailed Description
The following description will explain embodiments of the present invention in further detail with reference to the accompanying drawings.
The invention designs a terrain and slope classification self-adaptive clustering method, which is characterized in that the self-adaptive classification of the slopes is carried out on DEM data through a K-means clustering method, the selected original DEM data is a grid image of Yaoan county in Yunnan province, an applied platform is a Model Builer geographic processing tool in ArcGIS, and the clustering standard is determined by obtaining a mountain top area in an original DEM data image of a target area, and a proper K-means clustering mass center is selected in a self-adaptive manner to carry out the slope classification. In order to visually represent the classification result, different colors are used for representing different slope types in a GIS topographic map, and the method specifically comprises the following steps:
and step A, obtaining a mountain top area in the original DEM data image of the target area by adopting white top cap conversion operation, and entering step B.
In practical specific application, as shown in fig. 2, the step a specifically includes the following steps:
a1, performing corrosion transformation operation and expansion transformation operation on an original DEM data image of a target area according to the following functions respectively;
Erosion:Eλf(X)=inf{f(u):u∈λ}
Dilation:Dλf(X)=sup{f(u):u∈λ}
respectively obtaining the corrosion change images E of the target areasλf (X), and a target region expansion change image Dλf (X), then step A2; the radius is preset based on the mountain top size in the original DEM data image of the target area; (x) is the whole image of the target area, f (u) represents the gray value of u pixel points in the image of the target area, inf () represents corrosion transformation operation, and sup () represents dilation transformation operation.
Step A2, according to the corrosion change image E of the target areaλf (X), and a target region expansion change image Dλf (X), as a function:
Opening:Oλ(X)=Dλ(Eλf(X))
the structural element is adopted to slide the original DEM data image of the target area, the opening operation is realized, and other areas O except the mountain top in the original DEM data image of the target area are obtainedλ(x) Then proceed to step a3.
Step A3, according to the following formula:
WTH={x:f(x)-Oλ(x)}
using the original DEM data image of the target area and Oλ(x) The mountain top area set WTH in the original DEM data image of the target area is obtained by subtracting, and the mountain top area set WTH with the height larger than the preset mountain top height threshold value t is obtained according to each mountain top in the mountain top area set WTH in the original DEM data image of the target area, and the mountain top area set WTH is updated.
And B, initializing and presetting clustering centers respectively corresponding to the slope classes according to the gray pixel values of the mountain top area and the continuous change of the gray pixel values aiming at the original DEM data image of the target area, and entering the step C.
In practical application, the classification of the terrain and slope can be divided into 4 classes, specifically, a slope lower part, a slope middle part, a slope upper part and a ridge, so that the clustering centers corresponding to the slope lower part, the slope middle part, the slope upper part and the ridge respectively are initialized for the original DEM data image of the target area.
And step C, as shown in fig. 3, based on preset clustering centers respectively corresponding to the slope categories, clustering operation is carried out on the pixels in the original DEM data image of the target area, clusters respectively corresponding to the slope categories are obtained, the slope categories are respectively clustered, the square sum J (C) of Euclidean distances between all the pixels in the clusters and the clustering center during the clustering operation is obtained, and then the step D is carried out.
In the practical application of the step C, the method specifically comprises the following steps:
based on preset clustering centers respectively corresponding to the slope classes, respectively aiming at each pixel point in the original DEM data image of the target area, Euclidean distances between the pixel point and the clustering centers of the slope classes are obtained, and then the pixel point is divided into clusters of the clustering centers corresponding to the shortest Euclidean distances, so that clustering of the pixel points in the original DEM data image of the target area is realized, namely, clusters respectively corresponding to the slope classes are obtained.
Step D, respectively obtaining new clustering centers of slope category clusters, respectively obtaining the square sum J '(C) of Euclidean distances between all pixel points in the clusters and the new clustering centers aiming at the slope category clusters, then judging whether the new clustering centers of the slope category clusters are all the clustering centers corresponding to the clustering operation, and judging whether the J' (C) of the slope category clusters are equal to the J (C) of the corresponding clusters; if the two judgments are yes, finishing the clustering operation of the terrain and slope positions of the target area, and entering the step E; otherwise, updating the new clustering center of each slope class cluster to the clustering center of each slope class cluster, and returning to the step C.
And E, converting the grid data after clustering is finished, extracting according to a mask by utilizing an ArcGIS tool, cutting the generated grid data into the size of an original image, then clustering according to each terrain slope corresponding to the target area, realizing reclassification of each slope category of the target area according to the number of pixel points in each cluster, namely carrying out classification sequencing according to the sequence of the lower part of the slope, the middle part of the slope, the upper part of the slope and the ridge, loading the image layer, and manufacturing into a terrain slope classification thematic map.
The designed terrain and slope classification self-adaptive clustering method is applied to practice, and a clustering result graph of slope self-adaptive classification shown in fig. 4 can be obtained according to the original DEM data schematic diagram shown in fig. 1.
The terrain and slope classification self-adaptive clustering method can be used for adaptively classifying the slopes of DEM data by using a K-means clustering method under the condition of not considering geographic factors, and realizes simple, efficient and accurate division of the terrain and slope.
The embodiments of the present invention have been described in detail with reference to the drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (4)

1. A terrain slope classification self-adaptive clustering method is characterized by comprising the following steps:
step A, adopting white top cap conversion operation to obtain a mountain top area in an original DEM data image of a target area, and entering step B;
the step A comprises the following steps:
a1, performing corrosion transformation operation and expansion transformation operation on an original DEM data image of a target area according to the following functions respectively;
Erosion:Eλf(X)=inf(f(u):u∈λ)
Dilation:Dλf(X)=sup(f(u):u∈λ)
respectively obtaining the corrosion change images E of the target areasλf (X), and a target region expansion change image Dλf (X), then step A2; the radius is preset based on the mountain top size in the original DEM data image of the target area; (x) is the whole image of the target area, f (u) represents the gray value of u pixel points in the image of the target area, inf () represents corrosion transformation operation, and sup () represents expansion transformation operation;
step A2, according to the corrosion change image E of the target areaλf (X), and target area expansionChange image Dλf (X), as a function:
Opening:Oλ(X)=Dλ(Eλf(X))
the structural element is adopted to slide the original DEM data image of the target area, the opening operation is realized, and other areas O except the mountain top in the original DEM data image of the target area are obtainedλ(X), then proceed to step a 3;
step A3, according to the following formula:
WTH={X:f(X)-Oλ(X)}
using the original DEM data image of the target area and Oλ(X) subtracting to obtain a mountain top area set WTH in the original DEM data image of the target area;
b, initializing and presetting clustering centers respectively corresponding to slope classes according to the gray pixel values of the mountain top area and the continuous change of the gray pixel values aiming at the original DEM data image of the target area, and entering the step C;
c, based on preset clustering centers respectively corresponding to the slope classes, clustering operation is carried out on pixel points in the original DEM data image of the target area to obtain clusters respectively corresponding to the slope classes, and the step D is carried out;
d, respectively obtaining new clustering centers of slope category clusters, judging whether the new clustering centers of the slope category clusters are all the clustering centers corresponding to the clustering operation, if so, finishing the clustering operation of the terrain slope of the target area, and entering the step E; otherwise, updating the new clustering center of each slope class cluster into the clustering center of each slope class cluster, and returning to the step C; and E, according to the terrain slope clusters corresponding to the target area and the number of pixel points in each cluster, realizing reclassification of each slope category of the target area.
2. The method for adaptively clustering terrain and slope classification according to claim 1, wherein in the step A3, for each mountain top in a mountain top area set WTH in the original DEM data image of the target area, obtaining each mountain top with a height greater than a preset mountain top height threshold t, and updating the mountain top area set WTH.
3. The terrain slope classification adaptive clustering method according to claim 1, wherein the step C comprises the following steps:
based on preset clustering centers respectively corresponding to the slope classes, respectively aiming at each pixel point in the original DEM data image of the target area, Euclidean distances between the pixel point and the clustering centers of the slope classes are obtained, and then the pixel point is divided into clusters of the clustering centers corresponding to the shortest Euclidean distances, so that clustering of the pixel points in the original DEM data image of the target area is realized, namely, clusters respectively corresponding to the slope classes are obtained.
4. The terrain slope classification self-adaptive clustering method according to claim 1, wherein the step C further comprises clustering according to the slope classes respectively, and obtaining the square sum J (C) of Euclidean distances between all pixel points in the clusters and the clustering center during clustering operation respectively;
after new clustering centers of the slope category clusters are obtained in the step D respectively, the square sum J' (C) of Euclidean distances between all pixel points in the clusters and the new clustering centers is obtained; then judging whether the new clustering centers of all slope category clusters are the clustering centers corresponding to the clustering operation or not, and judging whether J' (C) of all slope category clusters are equal to J (C) of the corresponding clusters or not; if the two judgments are both yes, finishing the clustering operation of the terrain slope of the target area; otherwise, updating the new clustering center of each slope class cluster to the clustering center of each slope class cluster, and returning to the step C.
CN201810550983.4A 2018-05-31 2018-05-31 Terrain slope classification self-adaptive clustering method Active CN108921194B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810550983.4A CN108921194B (en) 2018-05-31 2018-05-31 Terrain slope classification self-adaptive clustering method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810550983.4A CN108921194B (en) 2018-05-31 2018-05-31 Terrain slope classification self-adaptive clustering method

Publications (2)

Publication Number Publication Date
CN108921194A CN108921194A (en) 2018-11-30
CN108921194B true CN108921194B (en) 2021-10-08

Family

ID=64418656

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810550983.4A Active CN108921194B (en) 2018-05-31 2018-05-31 Terrain slope classification self-adaptive clustering method

Country Status (1)

Country Link
CN (1) CN108921194B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109919201A (en) * 2019-02-14 2019-06-21 北京市环境保护监测中心 A kind of pollution type analysis method based on more concentration datas
CN117671168A (en) * 2023-10-20 2024-03-08 湖南防灾科技有限公司 Terrain aggregation method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365985A (en) * 2013-06-25 2013-10-23 西安电子科技大学 Class-adaptive polarimetric SAR (synthetic aperture radar) classification method
CN106570512A (en) * 2015-10-12 2017-04-19 北京林业大学 Forest subcompartment classification method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365985A (en) * 2013-06-25 2013-10-23 西安电子科技大学 Class-adaptive polarimetric SAR (synthetic aperture radar) classification method
CN106570512A (en) * 2015-10-12 2017-04-19 北京林业大学 Forest subcompartment classification method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
The Black Top Hat function applied to a DEM: A tool to estimate recent incision in a mountainous watershed (Estibe`re Watershed, Central Pyrenees);Felipe Rodriguez等;《Geophysical Research Letters》;20021231;1-4 *
简单易学的机器学习算法——K-Means算法;zhiyong_will;《https://blog.csdn.net/google19890102/article/details/26149927》;20140518;1-3 *

Also Published As

Publication number Publication date
CN108921194A (en) 2018-11-30

Similar Documents

Publication Publication Date Title
US10929649B2 (en) Multi-pose face feature point detection method based on cascade regression
CN111259936B (en) Image semantic segmentation method and system based on single pixel annotation
CN110796168A (en) Improved YOLOv 3-based vehicle detection method
CN110675392B (en) Rut fine three-dimensional feature extraction method based on pavement continuous laser point cloud
CN108629783B (en) Image segmentation method, system and medium based on image feature density peak search
CN109034233B (en) High-resolution remote sensing image multi-classifier joint classification method combined with OpenStreetMap
CN111508073B (en) Method for extracting roof contour line of three-dimensional building model
CN106096627A (en) The Polarimetric SAR Image semisupervised classification method that considering feature optimizes
CN113449594A (en) Multilayer network combined remote sensing image ground semantic segmentation and area calculation method
CN105260738A (en) Method and system for detecting change of high-resolution remote sensing image based on active learning
CN112036231B (en) Vehicle-mounted video-based lane line and pavement indication mark detection and identification method
CN104063711B (en) A kind of corridor end point fast algorithm of detecting based on K means methods
CN108921194B (en) Terrain slope classification self-adaptive clustering method
CN114694038A (en) High-resolution remote sensing image classification method and system based on deep learning
Gao et al. Fine-grained off-road semantic segmentation and mapping via contrastive learning
CN108154158B (en) Building image segmentation method for augmented reality application
CN105320917A (en) Pedestrian detection and tracking method based on head-shoulder contour and BP neural network
CN110427993A (en) Bullet train navigational gap localization method based on meteorologic parameter
CN113343858B (en) Road network geographic position identification method and device, electronic equipment and storage medium
EP3770799A1 (en) A method of identifying topographic features
CN115049925A (en) Method for extracting field ridge, electronic device and storage medium
CN104036294B (en) Spectral tag based adaptive multi-spectral remote sensing image classification method
CN112257496A (en) Deep learning-based power transmission channel surrounding environment classification method and system
CN112084988B (en) Lane line instance clustering method and device, electronic equipment and storage medium
CN113159044A (en) Deep learning-based road material identification method for convolutional neural network

Legal Events

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