A method for detecting and predicting the corner points of an elevator shaft
The proposed method improves elevator shaft corner point detection by using DBSCAN clustering and DP polygon fitting to filter noise and predict obscured points, enhancing precision and reducing computational load.
Patent Information
- Application Number
- CN202210848110.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-07-19
AI Technical Summary
The existing Douglas-Peukcer algorithm is prone to corner loss in the corner point detection of elevator shafts, and defects such as protrusions and pits inside the elevator shaft affect the measurement accuracy.
Density clustering (DBSCAN clustering) is used to remove noise clusters, polygon fitting is performed using DP algorithm, and straight lines are fitted in combination with DBSCAN clustering and least squares method to predict the corner locations affected by obstacles or defects.
It improves the accuracy of corner point detection of elevator shafts, reduces redundant data, and accurately predicts corner point positions affected by obstacles or defects, improving detection accuracy.
Smart Images

Figure CN115114998B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of measurement, and particularly relates to a method for detecting and predicting the corner points of an elevator shaft. Background Art
[0002] During the measurement of an elevator shaft, finding the corner points of the elevator shaft and obtaining the corresponding dimension data based on their corresponding relationships is the fastest and most accurate solution method. The Douglas-Peukcer algorithm (abbreviated as DP algorithm) is a classic algorithm for thinning linear features and is mostly used for polygon fitting. By processing a large amount of redundant geometric data points with it, the purpose of data reduction can be achieved, and the skeleton of the geometric shape can be retained to a large extent, and then the corner points can be obtained. This algorithm can effectively find the corner points of a planar graph, but due to the internal parameter settings and actual scene factors, the problem of corner point loss is likely to occur. And because the inside of the elevator shaft is mostly rough cement walls, it is inevitable to have defects such as protrusions or pits, and these points are likely to be included as corner points when detecting corner points. Removing these interference factors is an urgent problem to be solved.
[0003] In practical applications, when measuring an elevator shaft, the four inner corners of the elevator shaft will be affected by cement, bricks or defects, etc. If these corner points inside the elevator shaft can be accurately predicted, the measurement accuracy will be greatly improved. Summary of the Invention
[0004] The present invention proposes a method for detecting and predicting the corner points of an elevator shaft, which can effectively improve the problem that the DP algorithm has a low accuracy in detecting the corner points of the elevator shaft, and can also predict the corner points affected by obstacles or defects.
[0005] The technical solution of the present invention is as follows:
[0006] A method for detecting and predicting the corner points of an elevator shaft comprises the following specific steps:
[0007] S1. Removing interference factors: The original data is divided into N clusters by density clustering (DBSCAN clustering). The cluster with the largest amount of data is the elevator shaft data cluster, and the data therein is the elevator shaft data, and the other is the noise point cluster. The data in the noise point cluster is removed.
[0008] S2. Finding corner points and points similar to corner points: That is, using the DP algorithm to perform polygon fitting on the elevator shaft data, and obtaining corner point data and data of points similar to corner points through this method.
[0009] S3. Judgment of corner points: Using DBSCAN clustering, all corner point data and data similar to corner points are divided into n clusters. Define the average value of the coordinates of all data in each cluster as the midpoint coordinates of the cluster. Calculate the angle once for the midpoint coordinates of three adjacent clusters, and divide the cluster in the middle position of these three clusters into two types according to this angle, namely the demand cluster related to corner point data and the noise cluster unrelated to corner point data. Remove the noise cluster, and then divide the demand cluster into three subcategories, namely the deviation type that is close to the corner point but not the required corner point; the demand prediction type with data deformation caused by the influence of cement, bricks or defects, etc., and the accurate corner point standard type.
[0010] S4. Prediction of the actual corner point positions corresponding to the deviation type and the demand prediction type: For the deviation type and the demand prediction type demand clusters obtained in S3, take all the elevator shaft data between this cluster and the previous cluster in the counterclockwise direction, and use the least squares method to fit a straight line; then take all the elevator shaft data between this cluster and the next cluster in the clockwise direction, and use the least squares method to fit another straight line, and find the intersection point of these two straight lines as the predicted actual corner point position corresponding to this cluster.
[0011] Advantages of the present invention: Compared with the DP algorithm, the present invention can filter out the influencing factors such as the protrusions and depressions on the inner wall of the elevator shaft, remove more redundant data, reduce the amount of computation, and can predict the corner point positions affected by obstacles or defects, effectively improving the corner point detection accuracy of the elevator shaft. Description of the drawings
[0012] Figure 1 is the overall flowchart of the present invention;
[0013] Figure 2 is the clustering result diagram obtained by density clustering of the example of the present invention;
[0014] Figure 3 is the present invention Figure 2 is the result diagram obtained after polygon fitting;
[0015] Figure 4 is the schematic diagram of classifying corner points of the present invention;
[0016] Figure 5 is the example result of the present invention. Detailed implementation manners
[0017] The process of the present invention is as Figure 1 shown, and it includes 4 steps, which are respectively:
[0018] S1. Remove interference factors: The original data is divided into N clusters through density clustering. The original data is obtained based on 2D radar detection and has a fixed quantity. The cluster with the largest amount of data is the elevator shaft data cluster, and the data in it is the elevator shaft data, while the others are noise clusters. The data contained in the noise clusters is removed.
[0019] As Figure 2 shown, first, the original data R obtained by 2D lidar detection is clustered by DBSCAN to obtain the elevator shaft data set D. The data set D is Figure 2 the part circled in dark color, and the rest are noise clusters.
[0020] Furthermore, using DBSCAN clustering can filter out the noise outside the elevator shaft data.
[0021] S2. Find corner points and points similar to corner points: That is, use the DP algorithm to perform polygon fitting on the elevator shaft data, and obtain corner point data and data similar to corner points through this method. As Figure 3 shown, the data set D obtains the corner point data and data similar to corner points in D through the polygon fitting algorithm. The set of these data is J, as Figure 3 shown in the circled part.
[0022] Furthermore, the DP algorithm processes a large amount of redundant geometric data points, which can not only achieve the purpose of data volume reduction but also retain the skeleton of the geometric shape to a large extent.
[0023] The principle of the DP algorithm is as follows:
[0024] (1) Connect a straight line AB between the two end points A and B of the curve. The straight line AB is the chord of the curve;
[0025] (2) Find the point C on the curve that is farthest from the straight line AB, and calculate the distance d between the point C and the straight line AB;
[0026] (3) Compare the size of the distance d with a pre-given threshold threshold. If it is less than the threshold, the straight line AB is used as the approximation of the curve, and this section of the curve is processed;
[0027] (4) If the distance is greater than the threshold, use the point C to divide the curve into two sections of curves AC and BC, and repeat the processing of (1)-(4) for the two sections of curves AC and BC respectively;
[0028] (5) When all curves are processed, connect the approximate straight lines of each curve in turn to complete the polygon fitting.
[0029] When the value of threshold is smaller, the polygon fitted is more accurate. However, very little redundant data is removed in this case, and wall defects will also be judged as corner points in this situation, resulting in an undesired outcome.
[0030] When the value of threshold is larger, the polygon fitted is more blurred. If it is used for corner point detection in an elevator shaft, underfitting is likely to occur, making it impossible to find the key corner points.
[0031] S3. Judgment of corner points: To address the defects of the DP algorithm, the present invention uses DBSCAN clustering to divide all corner point data and data similar to corner points into n clusters, and defines the average value of the sum of the coordinates of all data in each cluster as the midpoint coordinate of the cluster. The angle is calculated once for the midpoint coordinates of three adjacent clusters, and according to this angle, the cluster in the middle position of these three clusters is divided into two types, namely the demand cluster related to corner point data; and the noise cluster unrelated to corner point data. The noise cluster is removed, and the demand cluster is further divided into three sub - types, namely the deviation type that is close to the corner point but not the required corner point; the demand prediction type where data is deformed due to the influence of cement, bricks or defects, etc.; and the accurate corner point standard type.
[0032] The calculation process is as follows:
[0033] Use density clustering for the data set J, divide the data in J into n clusters, and define them as {j1, j2, j3.......j n} ∈ J. Therefore, the midpoint coordinates of each cluster are as follows:
[0034]
[0035]
[0036] where j i represents the i - th cluster in J, and the midpoint coordinate of each cluster is defined as Let the j i cluster contain k points, and j i.p represents the p - th point in the j i cluster. Then represents the sum of the x - coordinates of all points in the j i cluster, represents the sum of the y - coordinates of all points in the j i cluster,
[0037] After that, the angle is calculated once for the midpoint of every three clusters, and the expression is:
[0038]
[0039] Define an allowable angular error range e and a target angle a. When the angle value θ satisfies cos(a + e) ≤ cosθ ≤ cos(a - e), divide the cluster j i into ① the requirement cluster related to the corner point data (defined as set T); otherwise, divide the cluster j i into ② the noise cluster unrelated to the corner point data (defined as set F), and delete this cluster. Then divide the ① requirement cluster into three sub - categories, namely the deviation type (defined as set P) that is close to the corner point but not the required corner point, the requirement prediction type (defined as set Y) where the data is deformed due to the influence of cement, bricks or defects, etc., and the accurate corner point standard type (defined as set B), as Figure 4 shown. The method for judging the division of the requirement cluster into three sub - categories is:
[0040] If the number of corner points q in the cluster = 1, then this cluster belongs to the standard type.
[0041] If the number of corner points q in the cluster ≥ 2, then this cluster is the deviation type that is close to the corner point but not the required corner point; or it is the requirement prediction type where the data is deformed due to the influence of cement, bricks or defects, etc.
[0042] S4. Prediction of the actual corner point positions corresponding to the deviation type and the requirement prediction type: For the standard type, no processing is required. For the deviation type and the requirement prediction type requirement clusters obtained in S3, take all the elevator shaft data (defined as set U1, with the number of elements N1) between this cluster and the previous cluster in the counter - clockwise direction, use the least - squares method to fit a straight line. Then take all the elevator shaft data (defined as set U2, with the number of elements N2) between this cluster and the next cluster in the clockwise direction, use the least - squares method to fit another straight line, and find the intersection point of these two straight lines as the predicted actual corner point position corresponding to this cluster.
[0043] Simplifying the above steps into a formula can be expressed as:
[0044] Let the formulas of these two fitted straight lines be y1 = a1x + b1 and y2 = a2x + b2, then the coordinates of this intersection point can be expressed as The coordinates of the finally predicted corner point are as follows:
[0045]
[0046]
[0047] where U 1.i.x represents the x - coordinate of the i - th point in set U1, and U 1.i.y represents the y - coordinate of the i - th point in set U1.
[0048] Furthermore, the judgment and prediction of corner points can improve the corner point loss problem of the DP algorithm and can predict the positions of corner points affected by obstacles or missing parts.
Claims
1. A method for detecting and predicting the corner points of an elevator shaft, characterized in that The method includes the following specific steps: S1. Divide the original data into N clusters through density clustering. The cluster with the largest amount of data is the elevator shaft data cluster, and the data therein is the elevator shaft data. The others are noise clusters, and the data in the noise clusters is removed; S2. Use the DP algorithm to perform polygon fitting on the elevator shaft data to obtain corner point data and data similar to corner points; S3. Use DBSCAN clustering to divide all corner point data and data similar to corner points into n clusters. Define the average value of the sum of all coordinate data in each cluster as the midpoint coordinate of the cluster. Calculate the angle once for the midpoint coordinates of three adjacent clusters. According to this angle, divide the cluster in the middle position among these three clusters into a demand cluster related to the corner point data and a noise cluster unrelated to the corner point data; Remove the noise clusters, and then divide the demand clusters into deviation type, demand prediction type, and standard type; among them, the deviation type refers to the demand cluster that is close to the corner point but is not a demand corner point; the demand prediction type refers to the demand cluster in which the data is deformed due to the influence of cement, bricks, or defects; the standard type refers to the demand cluster with accurate corner points; S4. For the deviation type and demand prediction type demand clusters obtained in S3, take all the elevator shaft data between this cluster and the previous cluster in the counterclockwise direction, and use the least squares method to fit a straight line; then take all the elevator shaft data between this cluster and the next cluster in the clockwise direction, and use the least squares method to fit another straight line, and find the intersection point of these two straight lines as the predicted actual corner point position corresponding to this cluster.
2. The elevator shaft corner detection and prediction method according to claim 1, wherein: The original data described in step S1 is obtained based on 2D radar detection and has a fixed quantity.
3. A method for detecting and predicting the corner points of an elevator shaft according to claim 1, characterized in that: The specific principle of the DP algorithm described in step S2 is as follows: (1) Connect a straight line AB between the two end points A and B of the curve. The straight line AB is the chord of the curve; (2) Find the point C on the curve that is farthest from the straight line AB, and calculate the distance d between point C and the straight line AB; (3) Compare the size of the distance d with a pre-given threshold threshold. If it is less than threshold, the straight line AB is used as the approximation of the curve, and this section of the curve is processed; (4) If the distance is greater than the threshold threshold, use point C to divide the curve into two sections of curves AC and BC, and repeat the processing of (1)-(4) for the two sections of curves AC and BC respectively; (5) When all the curves are processed, connect the approximate straight lines of each curve in turn to complete the polygon fitting.
4. A method for detecting and predicting the corner points of an elevator shaft according to claim 1, characterized in that: The operation process of dividing the cluster in the middle position among these three clusters into a demand cluster related to the corner point data and a noise cluster unrelated to the corner point data according to this angle described in step S3 is as follows: Define an allowable angle error interval e and a target angle α; When the angle value θ obtained in step S3 satisfies cos(α + e) ≤ cosθ ≤ cos(α - e), divide the cluster in the middle position among these three clusters into a demand cluster related to the corner point data; otherwise, divide the cluster in the middle position among these three clusters into a noise cluster unrelated to the corner point data.
5. A method for detecting and predicting the corner points of an elevator shaft according to claim 1, characterized in that: The method of dividing the demand clusters into deviation type, demand prediction type, and standard type in step S3 is as follows: If the number of corner points q in the demand cluster = 1, then this demand cluster belongs to the standard type; If the number of corner points q in the demand cluster is greater than or equal to 2, then the demand cluster belongs to the deviation type or the demand forecasting type.
Citation Information
Patent Citations
Method For Measuring An Elevator Hoistway
CN104061921A
Method for efficiently and accurately identifying angular point features
CN114511709A