Contour extraction method and system based on optimized clustering and fractional order error backpropagation network
By optimizing the contour extraction method using clustering and fractional-order error backpropagation networks, the problems of manual dependence and high computational complexity in existing technologies are solved, achieving efficient, automated, and real-time kidney contour detection and obtaining high-precision and smooth detection results.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU UNIV
- Filing Date
- 2024-06-25
- Publication Date
- 2026-05-01
AI Technical Summary
Existing ultrasound kidney contour detection methods rely on manual annotation, which increases the workload of doctors, reduces detection efficiency and consistency, and has insufficient computational complexity and processing speed, making it difficult to meet the needs of real-time detection. Traditional edge detection algorithms are unable to accurately capture blurry and discontinuous kidney contours, resulting in compromised extraction accuracy and completeness.
A contour extraction method based on optimized clustering and fractional-order error backpropagation network is adopted. By obtaining sampling points, the convex hull is calculated, the starting point of the convex hull is found, the polar angle is calculated and the boundary is generated, the Voronoi diagram and convex polygon are constructed, the density noise spatial clustering algorithm is used to find the inflection point, and the contour extraction is optimized by combining the fractional-order error backpropagation model to achieve the output of smooth object contour.
This method improves the automation and consistency of kidney contour detection, reduces subjective errors, meets the needs of real-time detection, and achieves high-precision and smooth contour extraction results.
Smart Images

Figure CN118628517B_ABST
Abstract
Description
A contour extraction method and system based on optimized clustering and fractional-order error backpropagation network Technical Field
[0001] This invention relates to the field of contour extraction technology, specifically to a contour extraction method and system based on optimized clustering and fractional-order error backpropagation network. Background Technology
[0002] Furthermore, many current ultrasound kidney contour detection methods require manual annotation or intervention to correct automated detection results. This not only increases the workload for physicians but also reduces detection efficiency and consistency. Over-reliance on manual intervention not only affects the automation process of segmentation but also increases the risk of subjective error, impacting the reliability of the results.
[0003] In clinical applications, real-time performance is a crucial indicator. However, existing kidney contour detection algorithms still fall short in terms of computational complexity and processing speed, making it difficult to meet the demands of real-time detection. This limits their widespread adoption and application in practice. Efficient real-time processing capabilities are essential for physicians to make rapid decisions during diagnosis and treatment, and current technologies still have significant room for improvement in this area.
[0004] The edges of the kidney contour often appear blurred and discontinuous in ultrasound images, making it difficult for traditional edge detection algorithms to accurately capture the true contour of the kidney. Existing technologies are prone to unstable detection results when dealing with blurred edges, affecting the accuracy and completeness of contour extraction. Summary of the Invention
[0005] To address the shortcomings mentioned in the background section, the present invention aims to provide a contour extraction method and system based on optimized clustering and fractional-order error backpropagation networks.
[0006] Firstly, the objective of this invention can be achieved through the following technical solution: a contour extraction method based on optimized clustering and fractional-order error backpropagation network, the method comprising the following steps:
[0007] Obtain sampling points, calculate the convex hull using the sampling points, find the starting point of the convex hull, calculate the polar angle based on the starting point of the convex hull, sort the points of the convex hull based on the polar angle, generate the boundary of the convex hull using stack operations based on the sorted points, and calculate the points inside the convex hull based on the boundary of the convex hull.
[0008] Calculate the Voronoi diagram and construct a convex polygon based on the points inside the convex hull and the sampling points. Determine if the Voronoi diagram is stable. If it is unstable, recalculate the convex hull until it is stable. If it is stable, extract the Voronoi points and calculate the Voronoi circle based on the Voronoi points. Extract the radius of the Voronoi circle and sort it. Find the inflection point based on the sorted radius.
[0009] The inflection point is input into the density noise spatial clustering algorithm to calculate MinPts. Points with a number of points in the neighborhood greater than or equal to MinPts are selected and saved. If none are found, the convex hull is recalculated. If there are, the cluster points are updated and cluster points are searched for. The cluster point profile coefficient is calculated and the optimal cluster point is determined based on the cluster point profile coefficient.
[0010] Calculate whether the optimal cluster points converge. If they do not converge, recalculate the convex hull. If they converge, obtain a closed polygon. Use the projection mechanism to obtain a data sequence from the closed polygon. Input the data sequence into a pre-established initial fractional-order error backpropagation model for training. Output the final smooth object contour.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: acquiring the sampling points is acquiring a set of n two-dimensional sampling points P = {P0,...,P...} n},P i ∈R 2 The matrix representation of the sampling points is P = [P0,...,P...]. n ] T The convex hull is calculated using sampling points by calling the Graham Scan algorithm to calculate and construct P. The starting point of the convex hull is the point with the lowest y-coordinate in the given set of points. If multiple points have the same y-coordinate, the point with the lowest x-coordinate is selected as the starting point of the convex hull.
[0012] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: calculating the polar angle based on the starting point of the convex hull.
[0013] CRP = (x i -x0)*(y i+1 -y0)-(y i -y0)*(x i+1 -x0), i=1,2,...,n-1 (1)
[0014] Where: P0(x0,y0) is the lowest point; P i (x i ,y i ) represents the current point used to calculate the polar angle; P i+1 (x i+1 ,y i+1 () represents the next point, used to calculate the polar angle between the relative lowest point and the current point.
[0015] The process of generating the boundary of the convex hull using stack operations based on sorted points is as follows: Create an empty stack and start traversing the sorted point sequence. The points in the stack form the boundary of the convex hull. Push the first two points onto the stack. Starting from the third point, for each point, check the two line segments formed by the top two points of the stack and the currently processed point. Determine whether the angle between these two line segments is a left turn or a right turn. If the angle is a left turn or collinear, push the current point onto the stack. Otherwise, pop the top point from the stack. Continue until the angle becomes a left turn or collinear. Finally, the points in the stack form the boundary of the convex hull.
[0016] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the Voronoi diagram calculates the Voronoi diagram of the dataset P by calling the VD(P) function, taking all points on the plane as generating points, calculating the nearest neighbor points around each generating point, and then determining the boundary between the generating point and its nearest neighbor points to form a convex polygon;
[0017] If the boundary change of the Voronoi diagram is less than the preset threshold, the Voronoi diagram has reached a stable state; if the boundary change of the Voronoi diagram is greater than or equal to the preset threshold, the Voronoi diagram has not reached a stable state.
[0018] Extract Voronoi points and store the pre-calculated Voronoi vertices inside the convex hull in the array `vor_in` as candidate centers for Voronoi circles. Calculate the Voronoi circles and obtain the radius (rad) of each Voronoi circle by calculating the distances between the Voronoi vertices in `vor_in` and the vertices of the convex hull.
[0019]
[0020] Where: Voronoi vertex (x1, y1), convex hull vertex (x2, y2).
[0021] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the inflection point is found using the inflection point / elbow method to find the inflection point in the radius graph, wherein the inflection point / elbow method is: to find an inflection point or elbow by observing the changing trend of the data, firstly calculating the slope or curvature of the curve, and then finding the point on the curve where the slope or curvature changes significantly as the inflection point.
[0022] Choose the DBSCAN algorithm parameters, the optimal MinPts, i loops from the preset range, and in the loop, Eps = Eps_bes and MinPts = i;
[0023] Select and save points with a neighborhood number greater than or equal to MinPts as core points;
[0024] p∈Eps(p),|Eps(q)|≥MinPts (3)
[0025] The cluster update step determines whether a density reachability relationship can be established:
[0026] d>Eps&&Eps(q)>=MinPts (4)
[0027] Find clusters, group density-reachable and density-connected points into the same cluster, and assign a unique identifier to each cluster to represent the cluster it belongs to.
[0028] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the step of calculating the cluster point contour coefficient SH:
[0029] s(x i+1 )>s(x i If ), then update MinPts_bes = i + 1.
[0030]
[0031] Where: a(x i ) is sample x i The average distance to all other points within the same cluster, b(x) i ) is sample x i The average distance to all points in the nearest other cluster;
[0032] After determining the optimal cluster points, run the traditional DBSCAN algorithm again using Eps = Eps_bes and MinPts = MinPts_bes to group all core points and their directly density-reachable points into the same cluster, forming a cluster point set. The optimal cluster points need to be marked as noise points and then excluded. The noise level is...
[0033]
[0034] Conditions for evaluating convergence:
[0035] Eps(q) >= MinPts && Eps <d (7)。
[0036] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the process of obtaining a data sequence from the closed polygon using a projection mechanism:
[0037] In the projection mechanism, data points are classified according to the line segments or vertices onto which they are projected on the first principal component line. Let f be a line segment of the first principal component line V = {v1, ..., v1}. k+1Let S be the vertex set, and let S = {s1, ..., s2} be the vertex set. k Let} be a curve composed of a set of polygonal line segments with sides , where s i With v i and v i+1 For vertices;
[0038] V i ={x∈X n :Δ(x,v i )=Δ(x,f),Δ(x,v i )<Δ(x,v m ),m=1,2...i-1} (8)
[0039]
[0040] Obtaining the vertex sequence: The projection index {t1, t2, ..., t} of the dataset is achieved by projecting the dataset onto a closed polygon. n}, based on the projection index t from smallest to largest i The order of the dataset (x) i ,y i (i = 1, 2, ..., n) are sorted sequentially, and the projection index is expressed as:
[0041] t(x i )=sup{t:||x i -f(t)||=inf τ ||x i -f(τ)||} (10)
[0042] Among them, sup(·) is the upper bound function and inf(·) is the lower bound function.
[0043] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: the pre-established initialization fractional-order error backpropagation model projection index t i As input to the fractional-order error backpropagation model; initialize the fractional-order error backpropagation model by setting the learning rate r, momentum parameter m, number of neurons S, weights w and threshold v; select the number of layers n, number of input layer neurons A, number of hidden layer neurons Z and number of output layer neurons U of the fractional-order error backpropagation model.
[0044] A general mathematical expression for the profile based on a cascaded excitation strategy:
[0045]
[0046] Where S represents the number of hidden layer neurons; w1 and w2 represent the weights from the input layer to the hidden layer and from the hidden layer to the output layer; a represents the output threshold of the hidden layer neurons; and b represents the output threshold of the output neurons.
[0047] During forward propagation, the input and output values for each layer are calculated;
[0048] During backpropagation, the output layer error is calculated;
[0049] Update the model parameters, specifically the weights w and threshold v in the fractional-order error backpropagation network based on federated activation; update the weights w and threshold v based on Caputo gradient descent, satisfying the following formula:
[0050] Weight w updated:
[0051]
[0052] Threshold v update:
[0053]
[0054] In backpropagation, the Sigmoid function is chosen as the activation function to calculate the global error E;
[0055] The global error E is derived from the mean square error E k Composition, E is represented as:
[0056]
[0057] Among them, the mean square deviation This represents the deviation between the actual value y and the expected value c.
[0058] If the constraints are met, the final smooth object contour is output; otherwise, the input and output values for each layer are recalculated.
[0059] Secondly, in order to achieve the above objectives, this invention discloses a contour extraction system based on optimized clustering and fractional-order error backpropagation network, comprising:
[0060] The interior point acquisition module is used to acquire sampling points, calculate the convex hull using the sampling points, find the starting point of the convex hull, calculate the polar angle based on the starting point of the convex hull, sort the points of the convex hull based on the polar angle, generate the boundary of the convex hull using stack operations based on the sorted points, and calculate the interior points of the convex hull based on the boundary of the convex hull.
[0061] The inflection point search module is used to calculate the Voronoi diagram and construct a convex polygon based on the points inside the convex hull and the sampling points. It determines whether the Voronoi diagram is stable. If it is unstable, it recalculates the convex hull until it is stable. If it is stable, it extracts the Voronoi points and calculates the Voronoi circle based on the Voronoi points. It extracts the radius of the Voronoi circle and sorts it. It then finds the inflection point based on the sorted radius.
[0062] The optimal cluster point module is used to input the inflection point into the density noise spatial clustering algorithm to calculate MinPts, select and save points in the neighborhood with a number of points greater than or equal to MinPts. If none are found, the convex hull is recalculated. If there are, the cluster points are updated, and cluster points are searched for and used. The cluster point profile coefficient is calculated, and the optimal cluster point is determined based on the cluster point profile coefficient.
[0063] The contour extraction module is used to calculate whether the optimal cluster points have converged. If they have not converged, the convex hull is recalculated. If they have converged, a closed polygon is obtained. The closed polygon is used to obtain a data sequence through a projection mechanism. The data sequence is then input into a pre-established initial fractional-order error backpropagation model for training, and the final smooth object contour is output.
[0064] In conjunction with the second aspect, in some implementations of the second aspect, the system further includes: the interior point acquisition module acquires sampling points by acquiring a set of n two-dimensional sampling points P = {P0,...,P...} n},P i ∈R 2 The matrix representation of the sampling points is P = [P0,...,P...]. n ] T The convex hull is calculated using sampling points by calling the Graham Scan algorithm to calculate and construct P. The starting point of the convex hull is found by finding the point with the lowest y-coordinate in the given point set. If multiple points have the same y-coordinate, the point with the lowest x-coordinate is selected as the starting point of the convex hull.
[0065] The interior point acquisition module calculates the polar angle based on the starting point of the convex hull:
[0066] CRP = (x i -x0)*(y i+1 -y0)-(y i -y0)*(x i+1 -x0), i=1,2,...,n-1 (1)
[0067] Where: P0(x0,y0) is the lowest point; P i (x i ,y i ) represents the current point used to calculate the polar angle; P i+1 (x i+1 ,y i+1() represents the next point, used to calculate the polar angle between the relative lowest point and the current point.
[0068] The process of generating the boundary of the convex hull using stack operations based on sorted points is as follows: Create an empty stack and start traversing the sorted point sequence. The points in the stack form the boundary of the convex hull. Push the first two points onto the stack. Starting from the third point, for each point, check the two line segments formed by the top two points of the stack and the currently processed point. Determine whether the angle between these two line segments is a left turn or a right turn. If the angle is a left turn or collinear, push the current point onto the stack. Otherwise, pop the top point from the stack. Continue until the angle becomes a left turn or collinear. Finally, the points in the stack form the boundary of the convex hull.
[0069] The Voronoi diagram in the inflection point search module calculates the Voronoi diagram of dataset P by calling the VD(P) function. All points on the plane are used as generating points. For each generating point, the nearest neighbor points around it are calculated, and then the boundary between the generating point and its nearest neighbor points is determined to form a convex polygon.
[0070] If the boundary change of the Voronoi diagram is less than the preset threshold, the Voronoi diagram has reached a stable state; if the boundary change of the Voronoi diagram is greater than or equal to the preset threshold, the Voronoi diagram has not reached a stable state.
[0071] Extract Voronoi points and store the pre-calculated Voronoi vertices inside the convex hull in the array `vor_in` as candidate centers for Voronoi circles. Calculate the Voronoi circles and obtain the radius (rad) of each Voronoi circle by calculating the distances between the Voronoi vertices in `vor_in` and the vertices of the convex hull.
[0072]
[0073] Where: Voronoi vertex (x1, y1), convex hull vertex (x2, y2);
[0074] The inflection point search module uses the inflection point / elbow method to find inflection points in the radius graph. The inflection point / elbow method finds an inflection point or elbow by observing the trend of data change. First, the slope or curvature of the curve is calculated, and then the point on the curve where the slope or curvature changes significantly is taken as the inflection point.
[0075] Choose the DBSCAN algorithm parameters, the optimal MinPts, i loops from the preset range, and in the loop, Eps = Eps_bes and MinPts = i;
[0076] Select and save points with a neighborhood number greater than or equal to MinPts as core points;
[0077] p∈Eps(p),|Eps(q)|≥MinPts (3)
[0078] The cluster update step determines whether a density reachability relationship can be established:
[0079] d>Eps&&Eps(q)>=MinPts (4)
[0080] Find clusters, group density-reachable and density-connected points into the same cluster, and assign a unique identifier to each cluster to represent the cluster it belongs to;
[0081] Steps for calculating the cluster profile coefficient SH within the optimal cluster module:
[0082] s(x i+1 )>s(x i If ), then update MinPts_bes = i + 1.
[0083]
[0084] Where: a(x i ) is sample x i The average distance to all other points within the same cluster, b(x) i ) is sample x i The average distance to all points in the nearest other cluster;
[0085] After determining the optimal cluster points, run the traditional DBSCAN algorithm again using Eps = Eps_bes and MinPts = MinPts_bes to group all core points and their directly density-reachable points into the same cluster, forming a cluster point set. The optimal cluster points need to be marked as noise points and then excluded. The noise level is...
[0086]
[0087] Conditions for evaluating convergence:
[0088] Eps(q) >= MinPts && Eps <d (7);
[0089] The process of obtaining a data sequence from a closed polygon using a projection mechanism within the contour extraction module:
[0090] In the projection mechanism, data points are classified according to the line segments or vertices onto which they are projected on the first principal component line. Let f be a line segment of the first principal component line V = {v1, ..., v1}. k+1 Let S be the vertex set, and let S = {s1, ..., s2} be the vertex set. k Let} be a curve composed of a set of polygonal line segments with sides , where si With v i and v i+1 For vertices;
[0091] V i ={x∈X n :Δ(x,v i )=Δ(x,f),Δ(x,v i )<Δ(x,v m ),m=1,2...i-1} (8)
[0092]
[0093] Obtaining the vertex sequence: The projection index {t1, t2, ..., t} of the dataset is achieved by projecting the dataset onto a closed polygon. n}, based on the projection index t from smallest to largest i The order of the dataset (x) i ,y i (i = 1, 2, ..., n) are sorted sequentially, and the projection index is expressed as:
[0094] t(x i )=sup{t:||x i -f(t)||=inf τ ||x i -f(τ)||} (10)
[0095] Where sup(·) is the upper bound function and inf(·) is the lower bound function;
[0096] The projection index t of the pre-established initial fractional-order error backpropagation model within the contour extraction module. i As input to the fractional-order error backpropagation model; initialize the fractional-order error backpropagation model by setting the learning rate r, momentum parameter m, number of neurons S, weights w and threshold v; select the number of layers n, number of input layer neurons A, number of hidden layer neurons Z and number of output layer neurons U of the fractional-order error backpropagation model.
[0097] A general mathematical expression for the profile based on a cascaded excitation strategy:
[0098]
[0099] Where S represents the number of hidden layer neurons; w1 and w2 represent the weights from the input layer to the hidden layer and from the hidden layer to the output layer; a represents the output threshold of the hidden layer neurons; and b represents the output threshold of the output neurons.
[0100] During forward propagation, the input and output values for each layer are calculated;
[0101] During backpropagation, the output layer error is calculated;
[0102] Update the model parameters, specifically the weights w and threshold v in the fractional-order error backpropagation network based on federated activation; update the weights w and threshold v based on Caputo gradient descent, satisfying the following formula:
[0103] Weight w updated:
[0104]
[0105] Threshold v update:
[0106]
[0107] In backpropagation, the Sigmoid function is chosen as the activation function to calculate the global error E;
[0108] The global error E is derived from the mean square error E k Composition, E is represented as:
[0109]
[0110] Among them, the mean square deviation This represents the deviation between the actual value y and the expected value c.
[0111] If the constraints are met, the final smooth object contour is output; otherwise, the input and output values for each layer are recalculated.
[0112] The beneficial effects of this invention are:
[0113] This invention addresses the problem that current master curve variant algorithms require pre-defined contour vertex numbers. Furthermore, current master curve algorithms produce contours composed of line segments that are not smooth enough. Our method proposes a smooth contour mathematical expression to ensure contour smoothness. Finally, our method uses an AI-based fractional-order error backpropagation network to minimize global error, thereby ensuring high-precision contour segmentation. Attached Figure Description
[0114] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0115] Figure 1 is a schematic diagram of the method flow of the present invention;
[0116] Figure 2 is a schematic diagram of the workflow of the present invention;
[0117] Figure 3 is a schematic diagram of the system structure of the present invention;
[0118] Figure 4 shows the results of the ablation qualitative experiment in this embodiment. Detailed Implementation
[0119] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0120] To quantitatively evaluate the performance of the method proposed in this invention, we used clinical transabdominal kidney data from Suzhou Municipal Hospital for validation, and used the following two commonly used evaluation metrics in medical image segmentation as the criteria for measuring the quality of the experimental results: Dice coefficient (DSC) and intersection-over-union ratio (IOU).
[0121]
[0122] Where TP (True Positive) represents the number of true positive pixels, FP (False Positive) represents the number of false positive pixels, and FN (False Negative) represents the number of false negative pixels.
[0123] The proposed method was subjected to ablation experiments, and the results are shown in the table below. We use abbreviations to describe the experiments: DBSCAN (Density-Noise Spatial Clustering Algorithm); GCOP (Geometric Computation Optimization Parametric Model); Multilayer Perceptron (MLP); and Federated Activation Mechanism-Based Contour Mathematical Model (FDMM). Compared with these five baseline models, the proposed method demonstrates superior performance in region of interest detection. The segmentation results show that the proposed method exhibits the best performance in handling both lost and damaged contours.
[0124] Table 1. Results of Ablation Quantitative Experiment
[0125]
[0126] Example 1:
[0127] The following is a description of the relevant terms used in the embodiments of this application:
[0128] As shown in Figure 1, the contour extraction method based on optimized clustering and fractional-order error backpropagation network includes the following steps:
[0129] S101: Obtain sampling points, calculate the convex hull using the sampling points, find the starting point of the convex hull, calculate the polar angle based on the starting point of the convex hull, sort the points of the convex hull based on the polar angle, generate the boundary of the convex hull using stack operations based on the sorted points, and calculate the points inside the convex hull based on the boundary of the convex hull.
[0130] The first step is to obtain the sampling points, specifically a set of n two-dimensional sampling points P = {P0,...,P...} n},P i ∈R 2 The matrix representation of the sampling points is P = [P0,...,P...]. n ] T .
[0131] The second step is to calculate the convex hull. The convex hull is the smallest pair of convex polygons that enclose all points in a point set. The Graham Scan algorithm is called to construct the convex hull for a given set of two-dimensional sampled points P.
[0132] The third step is to find the starting point of the convex hull. From the given set of points, find the point with the lowest y-coordinate. If multiple points have the same y-coordinate, select the point with the lowest x-coordinate. This point must belong to the convex hull because there is at least one point on the boundary of the convex hull that is the lowest point.
[0133] The fourth step is to calculate the polar angle. Calculate the polar angle of all other points relative to this lowest point.
[0134] CRP=(x1-x0)*(y2-y0)-(y1-y0)*(x2-x0) (1)
[0135] Where: P0(x0,y0), P1(x1,y1), P2(x2,y2).
[0136] The fifth step is polar angle sorting. Sort all points according to their polar angles from smallest to largest. After sorting, the lowest point must be on the convex hull, which will serve as the starting point of the convex hull.
[0137] Step 6: Stack operations. Create an empty stack and begin traversing the sorted point sequence. During this process, the points in the stack form the boundary of the convex hull. The first two points are pushed onto the stack. Starting from the third point, for each point, check the two line segments formed by the top two points of the stack and the currently processed point, determining whether the angle between these two line segments is a left or right turn. If the angle is a left turn or collinear, push the current point onto the stack. Otherwise, pop the top point from the stack until the angle becomes a left turn or collinear. Ultimately, the points in the stack form the boundary of the convex hull.
[0138] Step 7: Calculate the points inside the convex hull. For any given point, use points on the boundary of the convex hull to determine if it is inside the convex hull. If it is, store it in an array. This is achieved by checking the direction (left or right turn) of the edges formed by the point and its adjacent points on the convex hull. If the angle formed by the edges formed by the point and all its adjacent points is left, then the point is inside the convex hull. Otherwise, it is outside the convex hull.
[0139] S102: Calculate the Voronoi diagram and construct a convex polygon based on the points inside the convex hull and the sampling points. Determine whether the Voronoi diagram is stable. If it is unstable, recalculate the convex hull until it is stable. If it is stable, extract the Voronoi points and calculate the Voronoi circle based on the Voronoi points. Extract the radius of the Voronoi circle and sort it. Find the inflection point based on the sorted radius.
[0140] Step 8: Calculate the Voronoi diagram. Call the VD(P) function to calculate the Voronoi diagram of dataset P, first using all points on the plane as the generating points.
[0141] Step 9: Construct a convex polygon. For each generated point, calculate its nearest neighbor and then determine the boundary between the generated point and its nearest neighbor to form a convex polygon.
[0142] Step 10: Voronoi diagram optimization step. If the boundary change is less than the preset threshold (error), the Voronoi diagram is considered to have reached a stable state, and step 11 is executed; if the boundary change is greater than the threshold, the process returns to step 2.
[0143] Step 11: Extract Voronoi points. Store the Voronoi vertices inside the calculated convex hull in the array vor_in as candidate centers of the Voronoi circle.
[0144] Where: the Voronoi circle is a set of points around each Voronoi vertex, and the radius of the circle is the distance from the generating point to its nearest neighbor.
[0145] Step 12: Calculate the Voronoi circles. This is done by calculating the distances between the Voronoi vertices in `vor_in` and the vertices of the convex hull, thus obtaining the radius of each Voronoi circle.
[0146]
[0147] Where: Voronoi vertex (x1, y1), convex hull vertex (x2, y2).
[0148] Step 13: Sort the radii of the circles, extract the radii of the empty circles, and sort them in ascending order. Then store them in the radius value and plot the radius graph.
[0149] Step 14: Find the inflection point. Use the inflection point / elbow method to find the inflection point in the radius graph and record its value as Eps_bes, which is used as the input of the traditional DBSCAN algorithm. Among them: (1) Inflection point / elbow method: Find an inflection point or elbow by observing the changing trend of the data. First, calculate the slope or curvature of the curve, and then find the point on the curve where the slope or curvature changes significantly. (2) Eps (Epsilon): DBSCAN algorithm parameter, which specifies the radius of the neighborhood of a point. Eps_bes (EpsilonBest): The best-fit Eps selected by the algorithm.
[0150] S103: Input the inflection point into the density noise spatial clustering algorithm to calculate MinPts, select and save points in the neighborhood with a number of points greater than or equal to MinPts. If none are found, recalculate the convex hull. If any are found, update the cluster points, find the cluster points to use, calculate the cluster point profile coefficient, and determine the optimal cluster point based on the cluster point profile coefficient.
[0151] Step 15: Select the optimal MinPts. i loops from 2 to 50, with Eps = Eps_bes and MinPts = i during the loop.
[0152] Wherein: MinPts (Minimum Points) is a parameter of the DBSCAN algorithm, specifying the minimum number of points contained in the neighborhood of a point.
[0153] Step sixteen: Cluster point filtering step. Select and save points whose number of neighbors is greater than or equal to MinPts. If a suitable core point is found, proceed to step seventeen; otherwise, return to step two.
[0154] p∈Eps(p),|Eps(q)|≥MinPts (3)
[0155] Step 17, Cluster Update Step: Determine whether a density reachability relationship can be established (density reachability defines whether there is sufficient density connection between two data points to determine whether they belong to the same cluster). That is: given two data points p and q, if there exists a path from data point p to data point q, and the adjacent data points on this path are all: (1) the distance d between data points p and q does not exceed Eps; (2) these points are all core points, then data point p can be considered to be density reachable from data point q. If there exists an object o∈D such that p and q are both density reachable from o, then data point p and data point q are density connected, and step 18 is executed; otherwise, return to step 2.
[0156] d>Eps&&Eps(q)>=MinPts (4)
[0157] Step 18: Find cluster points, group density-reachable and density-connected points into the same cluster, and assign a unique identifier to each cluster to indicate the cluster to which it belongs.
[0158] Step 19, calculate the cluster point profile coefficient SH, if s(x i+1 )>s(x i If ), then update MinPts_bes = i + 1.
[0159]
[0160] Where: a(x i ) is sample x i The average distance to all other points within the same cluster (i.e., intra-cluster dissimilarity), b(x) i ) is sample x i The average distance to all points in the nearest other cluster (i.e., sample x) i Similarity to other clusters).
[0161] Step 20: Determine the optimal cluster points. Run the traditional DBSCAN algorithm again using Eps = Eps_bes and MinPts = MinPts_bes to group all core points and their directly density-reachable points into the same cluster, forming a cluster point set.
[0162] Step 21: Label noise points. By eliminating noise points, the clusters become purer and more compact, thereby improving the quality and effectiveness of clustering. Noise points are data points in dataset P that do not belong to any cluster. Pi The set of objects, i.e., the noise, is
[0163]
[0164] S104: Calculate whether the optimal cluster points have converged. If they have not converged, recalculate the convex hull. If they have converged, obtain the closed polygon. Use the projection mechanism to obtain the data sequence from the closed polygon. Input the data sequence into the pre-established initial fractional-order error backpropagation model for training. Output the final smooth object contour.
[0165] Step 22: Evaluate whether convergence has occurred. Evaluate the accuracy and performance metrics based on the value of Eps (as shown in Formula 7) to determine whether convergence has occurred. If convergence has occurred, proceed to the next step; otherwise, proceed to step 2.
[0166] Eps(q) >= MinPts && Eps <d (7)
[0167] Step 23: Obtain the closed polygon that approximates the data points.
[0168] Step 24: In the projection mechanism, data points are classified based on the line segments or vertices they project onto the first principal component line. Let f be a line with line segment V = {v1, ..., v}. k+1 Let S be the vertex set, and let S = {s1, ..., s2} be the vertex set. k Let} be a curve composed of a set of polygonal line segments with sides , where s i With v i and v i+1 The vertex is the vertex.
[0169] V i ={x∈X n :Δ(x,v i )=Δ(x,f),Δ(x,v i )<Δ(x,v m ),m=1,2...i-1} (8)
[0170]
[0171] Step 25, Obtain the vertex sequence (projection index + cluster point coordinates): The projection index {t1, t2, ..., t} of the dataset is obtained by projecting the dataset onto a closed polygon. n According to the projection index t from smallest to largest. i The order of the dataset (x) i ,y i Sort the integers (i = 1, 2, ..., n) sequentially. The projection index is expressed as:
[0172] t(x i )=sup{t:||x i -f(t)||=inf τ ||x i -f(τ)||} (10)
[0173] Where sup(·) is the upper bound function and inf(·) is the lower bound function.
[0174] Step 26, Initialize the fractional-order error backpropagation model: Apply the projection index t obtained in the previous step... i As input to the fractional-order error backpropagation model; initialize the fractional-order error backpropagation model by setting the learning rate r, momentum parameter m, number of neurons S, weights w, and threshold v; select the number of layers n, the number of neurons in the input layer A, the number of neurons in the hidden layer Z, and the number of neurons in the output layer U of the fractional-order error backpropagation model.
[0175] Step 27: A general mathematical expression for the profile based on the cascaded excitation strategy is proposed, which is described by the parameters of the fractional-order error backpropagation model based on the cascaded excitation strategy.
[0176]
[0177] Where S represents the number of hidden layer neurons; w1 and w2 represent the weights from the input layer to the hidden layer and from the hidden layer to the output layer; a represents the output threshold of the hidden layer neurons; and b represents the output threshold of the output neurons.
[0178] Step 28: During forward propagation, calculate the input and output values for each layer;
[0179] Step 29: Calculate the output layer error during backpropagation;
[0180] Step 30: Update the model parameters, specifically the weights w and threshold v in the fractional-order error backpropagation network based on the federated activation mechanism; update the weights w and threshold v based on the Caputo gradient descent mechanism, satisfying the following formula:
[0181] Weight w updated:
[0182]
[0183] Threshold v update:
[0184]
[0185] In the thirty-first step, during backpropagation, the Sigmoid function is selected as the activation function, and the global error E is calculated.
[0186] Step 32, the global error E is derived from the mean square error E k Composition, E is represented as:
[0187]
[0188] Among them, the mean square deviation This represents the deviation between the actual value y and the expected value c.
[0189] Step 33: If the constraint condition is met, such as E decreasing and the global error E < 10, then... -5 If the maximum number of epochs is reached (5000), proceed to the next step; otherwise, return to step twenty-eight.
[0190] Step 34: Use the acquired error backpropagation network parameters to express the unified mathematical expression proposed in step 27.
[0191] Step 35: Display the final smooth object outline.
[0192] Example 2: In a second aspect, as shown in Figure 3, to achieve the above objective, this invention discloses a contour extraction system based on optimized clustering and fractional-order error backpropagation network, comprising:
[0193] The interior point acquisition module 11 is used to acquire sampling points, calculate the convex hull using the sampling points, find the starting point of the convex hull, calculate the polar angle based on the starting point of the convex hull, sort the points of the convex hull based on the polar angle, generate the boundary of the convex hull using stack operations based on the sorted points, and calculate the interior points of the convex hull based on the boundary of the convex hull.
[0194] The inflection point search module 12 is used to calculate the Voronoi diagram and construct the convex polygon based on the points inside the convex hull and the sampling points, determine whether the Voronoi diagram is stable, and if it is unstable, recalculate the convex hull until it is stable. If it is stable, extract the Voronoi points, calculate the Voronoi circle based on the Voronoi points, extract the radius of the Voronoi circle and sort it, and find the inflection point based on the sorted radius.
[0195] The optimal cluster point module 13 is used to input the inflection point into the density noise spatial clustering algorithm to calculate MinPts, select and save points in the neighborhood with a number of points greater than or equal to MinPts. If there are none, the convex hull is recalculated. If there are, the cluster points are updated, and cluster points are searched for and used. The cluster point profile coefficient is calculated, and the optimal cluster point is determined based on the cluster point profile coefficient.
[0196] The contour extraction module 14 is used to calculate whether the optimal cluster points converge. If they do not converge, the convex hull is recalculated. If they converge, a closed polygon is obtained. The closed polygon is used to obtain a data sequence through a projection mechanism. The data sequence is input into a pre-established initial fractional-order error backpropagation model for training, and the final smooth object contour is output.
[0197] In conjunction with the second aspect, in some implementations of the second aspect, the system further includes: the interior point acquisition module 11 acquires sampling points by acquiring a set of n two-dimensional sampling points P = {P0,...,P...} n},P i ∈R 2 The matrix representation of the sampling points is P = [P0,...,P...]. n ] T The convex hull is calculated using sampling points by calling the Graham Scan algorithm to calculate and construct P. The starting point of the convex hull is found by finding the point with the lowest y-coordinate in the given point set. If multiple points have the same y-coordinate, the point with the lowest x-coordinate is selected as the starting point of the convex hull.
[0198] The interior point acquisition module 11 calculates the polar angle based on the starting point of the convex hull:
[0199] CRP = (x i -x0)*(y i+1-y0)-(y i -y0)*(x i+1 -x0), i=1,2,...,n-1 (1)
[0200] Where: P0(x0,y0) is the lowest point; P i (x i ,y i ) represents the current point used to calculate the polar angle; P i+1 (x i+1 ,y i+1 () represents the next point, used to calculate the polar angle between the relative lowest point and the current point.
[0201] The process of generating the boundary of the convex hull using stack operations based on sorted points is as follows: Create an empty stack and start traversing the sorted point sequence. The points in the stack form the boundary of the convex hull. Push the first two points onto the stack. Starting from the third point, for each point, check the two line segments formed by the top two points of the stack and the currently processed point. Determine whether the angle between these two line segments is a left turn or a right turn. If the angle is a left turn or collinear, push the current point onto the stack. Otherwise, pop the top point from the stack. Continue until the angle becomes a left turn or collinear. Finally, the points in the stack form the boundary of the convex hull.
[0202] The Voronoi diagram in the inflection point search module 12 calculates the Voronoi diagram of the dataset P by calling the VD(P) function. All points on the plane are used as generating points. For each generating point, the nearest neighbor points around it are calculated, and then the boundary between the generating point and its nearest neighbor points is determined to form a convex polygon.
[0203] If the boundary change of the Voronoi diagram is less than the preset threshold, the Voronoi diagram has reached a stable state; if the boundary change of the Voronoi diagram is greater than or equal to the preset threshold, the Voronoi diagram has not reached a stable state.
[0204] Extract Voronoi points and store the pre-calculated Voronoi vertices inside the convex hull in the array `vor_in` as candidate centers for Voronoi circles. Calculate the Voronoi circles and obtain the radius (rad) of each Voronoi circle by calculating the distances between the Voronoi vertices in `vor_in` and the vertices of the convex hull.
[0205]
[0206] Where: Voronoi vertex (x1, y1), convex hull vertex (x2, y2);
[0207] The inflection point search module 12 uses the inflection point / elbow method to find inflection points in the radius graph. The inflection point / elbow method finds an inflection point or elbow by observing the trend of data change. First, the slope or curvature of the curve is calculated, and then the point on the curve where the slope or curvature changes significantly is taken as the inflection point.
[0208] Choose the DBSCAN algorithm parameters, the optimal MinPts, i loops from the preset range, and in the loop, Eps = Eps_bes and MinPts = i;
[0209] Select and save points with a neighborhood number greater than or equal to MinPts as core points;
[0210] p∈Eps(p),|Eps(q)|≥MinPts (3)
[0211] The cluster update step determines whether a density reachability relationship can be established:
[0212] d>Eps&&Eps(q)>=MinPts (4)
[0213] Find clusters, group density-reachable and density-connected points into the same cluster, and assign a unique identifier to each cluster to represent the cluster it belongs to;
[0214] The steps for calculating the cluster profile coefficient SH within the optimal cluster module 13 are as follows:
[0215] s(x i+1 )>s(x i If ), then update MinPts_bes = i + 1.
[0216]
[0217] Where: a(x i ) is sample x i The average distance to all other points within the same cluster, b(x) i ) is sample x i The average distance to all points in the nearest other cluster;
[0218] After determining the optimal cluster points, run the traditional DBSCAN algorithm again using Eps = Eps_bes and MinPts = MinPts_bes to group all core points and their directly density-reachable points into the same cluster, forming a cluster point set. The optimal cluster points need to be marked as noise points and then excluded. The noise level is...
[0219]
[0220] Conditions for evaluating convergence:
[0221] Eps(q) >= MinPts && Eps <d (7);
[0222] The process by which the contour extraction module 14 obtains a data sequence from a closed polygon using a projection mechanism:
[0223] In the projection mechanism, data points are classified according to the line segments or vertices onto which they are projected on the first principal component line. Let f be a line segment of the first principal component line V = {v1, ..., v1}. k+1 Let S be the vertex set, and let S = {s1, ..., s2} be the vertex set. k Let} be a curve composed of a set of polygonal line segments with sides , where s i With v i and v i+1 For vertices;
[0224] V i ={x∈X n :Δ(x,v i )=Δ(x,f),Δ(x,v i )<Δ(x,v m ),m=1,2...i-1} (8)
[0225]
[0226] Obtaining the vertex sequence: The projection index {t1, t2, ..., t} of the dataset is achieved by projecting the dataset onto a closed polygon. n}, based on the projection index t from smallest to largest i The order of the dataset (x) i ,y i (i = 1, 2, ..., n) are sorted sequentially, and the projection index is expressed as:
[0227] t(x i )=sup{t:||x i -f(t)||=inf τ ||x i -f(τ)||} (10)
[0228] Where sup(·) is the upper bound function and inf(·) is the lower bound function;
[0229] The projection index t of the pre-established initial fractional-order error backpropagation model within the contour extraction module 14 iAs input to the fractional-order error backpropagation model; initialize the fractional-order error backpropagation model by setting the learning rate r, momentum parameter m, number of neurons S, weights w and threshold v; select the number of layers n, number of input layer neurons A, number of hidden layer neurons Z and number of output layer neurons U of the fractional-order error backpropagation model.
[0230] A general mathematical expression for the profile based on a cascaded excitation strategy:
[0231]
[0232] Where S represents the number of hidden layer neurons; w1 and w2 represent the weights from the input layer to the hidden layer and from the hidden layer to the output layer; a represents the output threshold of the hidden layer neurons; and b represents the output threshold of the output neurons.
[0233] During forward propagation, the input and output values for each layer are calculated;
[0234] During backpropagation, the output layer error is calculated;
[0235] Update the model parameters, specifically the weights w and threshold v in the fractional-order error backpropagation network based on federated activation; update the weights w and threshold v based on Caputo gradient descent, satisfying the following formula:
[0236] Weight w updated:
[0237]
[0238] Threshold v update:
[0239]
[0240] In backpropagation, the Sigmoid function is chosen as the activation function to calculate the global error E;
[0241] The global error E is derived from the mean square error E k Composition, E is represented as:
[0242]
[0243] Among them, the mean square deviation This represents the deviation between the actual value y and the expected value c.
[0244] If the constraints are met, the final smooth object contour is output; otherwise, the input and output values for each layer are recalculated.
[0245] Based on the same inventive concept, this invention also provides a computer device, comprising: one or more processors, and a memory for storing one or more computer programs; the programs include program instructions, and the processor executes the program instructions stored in the memory. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, used to implement one or more instructions, specifically for loading and executing one or more instructions stored in a computer storage medium to implement the above-described method.
[0246] It should be further explained that, based on the same inventive concept, the present invention also provides a computer storage medium storing a computer program, which, when executed by a processor, performs the above-described method. This storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the present invention, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0247] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0248] The foregoing has shown and described the basic principles, main features, and advantages of this disclosure. Those skilled in the art should understand that this disclosure is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of this disclosure. Various changes and modifications can be made to this disclosure without departing from its spirit and scope, and all such changes and modifications fall within the scope of this disclosure as claimed.
Claims
1. A contour extraction method based on optimized clustering and fractional-order error backpropagation network, characterized in that, The method includes the following steps: Obtain sampling points, calculate the convex hull using the sampling points, find the starting point of the convex hull, calculate the polar angle based on the starting point, sort the points of the convex hull according to the polar angle, generate the boundary of the convex hull using stack operations based on the sorted points, calculate the points inside the convex hull based on the boundary of the convex hull, calculate the Voronoi diagram based on the points inside the convex hull and the sampling points, construct the convex polygon, determine whether the Voronoi diagram is stable, if not, recalculate the convex hull until stable, if stable, extract Voronoi points, calculate the Voronoi circle using the Voronoi points, extract the radius of the Voronoi circle and sort it, find the point based on the sorted radius. Find inflection points; input the inflection points into the density noise spatial clustering algorithm to calculate MinPts, select and save points in the neighborhood with a number of points greater than or equal to MinPts. If none are found, recalculate the convex hull. If they are found, update the cluster points and find the cluster points to use. Calculate the cluster point contour coefficients and determine the optimal cluster points based on the cluster point contour coefficients. Calculate whether the optimal cluster points have converged. If they have not converged, recalculate the convex hull. If they have converged, obtain a closed polygon. Use the projection mechanism to obtain a data sequence from the closed polygon. Input the data sequence into a pre-established initial fractional-order error backpropagation model for training, and output the final smooth object contour.
2. The contour extraction method based on optimized clustering and fractional-order error backpropagation network according to claim 1, characterized in that, The acquisition of sampling points refers to acquiring a set of n two-dimensional sampling points P = {P0,...,P}. n },P i ∈R 2 The matrix representation of the sampling points is P = [P0,...,P...]. n ] T The convex hull is calculated using sampling points by calling the Graham Scan algorithm to calculate and construct P. The starting point of the convex hull is the point with the lowest y-coordinate in the given set of points. If multiple points have the same y-coordinate, the point with the lowest x-coordinate is selected as the starting point of the convex hull.
3. The contour extraction method based on optimized clustering and fractional-order error backpropagation network according to claim 1, characterized in that, The polar angle is calculated based on the starting point of the convex hull: CRP = (x i -x0)*(y i+1 -y0)-(y i -y0)*(x i+1 -x0), i=1,2,...,n-1 (1) where: P0(x0,y0) is the lowest point; P i (x i ,y i P represents the current point; i+1 (x i+1 ,y i+1 Let '(')' be the next point. The process of generating the boundary of the convex hull using stack operations based on the sorted points is as follows: Create an empty stack, start traversing the sorted point sequence, and the points in the stack form the boundary of the convex hull. Push the first two points onto the stack. Starting from the third point, for each point, check the two line segments formed by the top two points of the stack and the currently processed point, and determine whether the angle between these two line segments is a left turn or a right turn. If the angle is a left turn or collinear, push the current point onto the stack; otherwise, pop the top point from the stack. Continue until the angle becomes a left turn or collinear. Finally, the points in the stack form the boundary of the convex hull.
4. The contour extraction method based on optimized clustering and fractional-order error backpropagation network according to claim 1, characterized in that, The Voronoi diagram is calculated by calling the VD(P) function to compute the Voronoi diagram of dataset P. All points on the plane are used as generation points. For each generation point, its nearest neighbors are calculated, and the boundary between the generation point and its nearest neighbors is determined, forming a convex polygon. If the change in the Voronoi diagram boundary is less than a preset threshold, the Voronoi diagram has reached a stable state; if the change is greater than or equal to the preset threshold, the Voronoi diagram has not reached a stable state. Voronoi points are extracted, and the Voronoi vertices inside the calculated convex hull are stored in the array vor_in as candidate centers for Voronoi circles. Voronoi circles are calculated, and the radius (rad) of each Voronoi circle is obtained by calculating the distance between the Voronoi vertices in vor_in and the vertices of the convex hull. Where: Voronoi vertex (x1, y1), convex hull vertex (x2, y2).
5. The contour extraction method based on optimized clustering and fractional-order error backpropagation network according to claim 1, characterized in that, The inflection point is found using the inflection point / elbow method in the radius graph. The inflection point / elbow method is as follows: an inflection point or elbow is found by observing the trend of data change. First, the slope or curvature of the curve is calculated. Then, the point on the curve where the slope or curvature changes significantly is found as the inflection point. The DBSCAN algorithm parameters are selected, and the optimal MinPts is selected. i is looped from the preset range. In the loop, Eps = Eps_bes and MinPts = i. The points with a number of points in the neighborhood greater than or equal to MinPts are selected and saved as core points. p∈Eps(p),|Eps(q)|≥MinPts (3) Cluster point update step: determine whether a density reachable relationship can be established: d>Eps&&Eps(q)>=MinPts (4) Find cluster points, divide the density reachable and density connected points into the same cluster, and assign a unique identifier to each cluster to indicate the cluster to which it belongs.
6. The contour extraction method based on optimized clustering and fractional-order error backpropagation network according to claim 1, characterized in that, The step for calculating the cluster point contour coefficient SH: s(x i+1 )>s(x i If ), then update MinPts_bes = i + 1. Where: a(x i ) is sample x i The average distance to all other points within the same cluster, b(x) i ) is sample x i The average distance to all points in the nearest other cluster is calculated; the optimal cluster point is determined, and the traditional DBSCAN algorithm is run again using Eps = Eps_bes and MinPts = MinPts_bes to group all core points and their directly density-reachable points into the same cluster, forming a cluster point set. The optimal cluster point needs to be marked with noise points and then excluded. The noise level is... The condition for evaluating convergence is: Eps(q) >= MinPts && Eps <d (7)。 7. The contour extraction method based on optimized clustering and fractional-order error backpropagation network according to claim 1, characterized in that, The process of obtaining a data sequence from a closed polygon using a projection mechanism: In the projection mechanism, data points are classified according to the line segments or vertices they project onto the first principal component line. Let f be a line segment with line segment V = {v1, ..., v1}. k+1 Let S be the vertex set, and let S = {s1, ..., s2} be the vertex set. k Let} be a curve composed of a set of polygonal line segments with sides , where s i With v i and v i+1 V is the vertex; i ={x∈X n :Δ(x,v i )=Δ(x,f),Δ(x,v i )<Δ(x,v m ),m=1,2...i-1} (8) Obtaining the vertex sequence: The projection index {t1, t2, ..., t} of the dataset is achieved by projecting the dataset onto a closed polygon. n }, based on the projection index t from smallest to largest i The order of the dataset (x) i ,y i The x(i) are sorted sequentially (i = 1, 2, ..., n), and the projection index is expressed as: t(x) i )=sup{t:||x i -f(t)||=inf τ ||x i -f(τ)||} (10) where, sup(·) is the upper bound function, and inf(·) is the lower bound function.
8. The contour extraction method based on optimized clustering and fractional-order error backpropagation network according to claim 1, characterized in that, The pre-established initial fractional-order error backpropagation model projection index t i As input to the fractional-order error backpropagation model; initialize the fractional-order error backpropagation model, setting the learning rate r, momentum parameter m, number of neurons S, weights w, and threshold v; select the number of layers n, input layer neurons A, hidden layer neurons Z, and output layer neurons U of the fractional-order error backpropagation model; the general mathematical expression for the contour based on the cascaded firing strategy is: Where S represents the number of hidden layer neurons; w1 and w2 represent the weights from the input layer to the hidden layer and from the hidden layer to the output layer; a represents the output threshold of the hidden layer neurons; b represents the output threshold of the output neurons; during forward propagation, the input and output values of each layer are calculated; during backpropagation, the output layer error is calculated; the model parameters are updated, i.e., the weights w and thresholds v in the fractional-order error backpropagation network based on the federated activation mechanism are updated; the weights w and thresholds v are updated based on the Caputo gradient descent mechanism, satisfying the following formula: Weight w update: Threshold v update: In backpropagation, the Sigmoid function is chosen as the activation function to calculate the global error E; the global error E is derived from the mean squared error E0. k Composition, E is represented as: Among them, the mean square deviation This represents the deviation between the true value y and the expected value c; if the constraints are met, the final smooth object contour is output; otherwise, the input and output values of each layer are recalculated.
9. A contour extraction system based on optimized clustering and fractional-order error backpropagation network, characterized in that, include: The interior point acquisition module is used to acquire sampling points, calculate the convex hull using the sampling points, find the starting point of the convex hull, calculate the polar angle based on the starting point of the convex hull, sort the points of the convex hull based on the polar angle, generate the boundary of the convex hull using stack operations based on the sorted points, and calculate the interior points of the convex hull based on the boundary of the convex hull. The inflection point search module is used to calculate the Voronoi diagram and construct the convex polygon based on the interior points of the convex hull and the sampling points, determine whether the Voronoi diagram is stable, if it is unstable, recalculate the convex hull until it is stable, if it is stable, extract the Voronoi points, calculate the Voronoi circle using the Voronoi points, extract the radius of the Voronoi circle and sort it, and find the inflection point based on the sorted radius. The optimal clustering module is used to input the inflection points into the density noise spatial clustering algorithm to calculate MinPts, select and save points in the neighborhood with a number of points greater than or equal to MinPts. If none are found, the convex hull is recalculated. If a convex hull is found, the clustering points are updated, and clustering points are searched for and used. The clustering point contour coefficients are calculated, and the optimal clustering points are determined based on the clustering point contour coefficients. The contour extraction module is used to calculate whether the optimal clustering points have converged. If they have not converged, the convex hull is recalculated. If they have converged, a closed polygon is obtained. The closed polygon is used to obtain a data sequence using a projection mechanism. The data sequence is input into a pre-established initial fractional-order error backpropagation model for training, and the final smooth object contour is output.
10. The contour extraction system based on optimized clustering and fractional-order error backpropagation network according to claim 9, characterized in that, The interior point acquisition module acquires sampling points by obtaining a set of n two-dimensional sampling points P = {P0,...,P}. n },P i ∈R 2 The matrix representation of the sampling points is P = [P0,...,P...]. n ] T The convex hull is calculated using sampling points by calling the Graham Scan algorithm to calculate and construct P. The starting point of the convex hull is found by finding the point with the lowest y-coordinate in the given point set. If multiple points have the same y-coordinate, the point with the lowest x-coordinate is selected as the starting point of the convex hull. The interior point acquisition module calculates the polar angle based on the starting point of the convex hull: CRP = (x i -x0)*(y i+1 -y0)-(y i -y0)*(x i+1 -x0), i=1,2,...,n-1 (1) where: P0(x0,y0) is the lowest point; P i (x i ,y i P represents the current point; i+1 (x i+1 ,y i+1 The process of generating the convex hull boundary using stack operations based on the sorted points is as follows: An empty stack is created, and the sorted point sequence is traversed. The points in the stack form the boundary of the convex hull. The first two points are pushed onto the stack. Starting from the third point, for each point, the two line segments formed by the top two points of the stack and the currently processed point are checked. It is determined whether the angle between these two line segments is a left turn or a right turn. If the angle is a left turn or collinear, the current point is pushed onto the stack; otherwise, the top point of the stack is popped. This continues until the angle becomes a left turn or collinear. Finally, the points in the stack form the boundary of the convex hull. The Voronoi diagram in the inflection point search module calculates the Voronoi diagram of dataset P by calling the VD(P) function, using all points on the plane as generation points. For each generated point, its nearest neighbors are calculated, and the boundary between the generated point and its nearest neighbors is determined, forming a convex polygon. If the change in the Voronoi diagram boundary is less than a preset threshold, the Voronoi diagram has reached a stable state; if the change in the Voronoi diagram boundary is greater than or equal to the preset threshold, the Voronoi diagram has not reached a stable state. Voronoi points are extracted, and the Voronoi vertices inside the calculated convex hull are stored in the array `vor_in` as candidate centers for Voronoi circles. Voronoi circles are calculated, and the radius (rad) of each Voronoi circle is obtained by calculating the distance between the Voronoi vertices in `vor_in` and the vertices of the convex hull. Where: Voronoi vertex (x1, y1), convex hull vertex (x2, y2); Inflection point search module uses inflection point / elbow method to find inflection points in radius graph, where, inflection point / elbow method: find an inflection point or elbow by observing the trend of data change, first calculate the slope or curvature of the curve, then find the point on the curve where the slope or curvature changes significantly as the inflection point; select DBSCAN algorithm parameters, the best MinPts, i loops from the preset range, in the loop Eps=Eps_bes and MinPts=i; select and save the points in the neighborhood with a number of points greater than or equal to MinPts as core points; p∈Eps(p),|Eps(q)|≥MinPts (3) Cluster point update step, judge whether the density reachability relationship can be established: d>Eps&&Eps(q)>=MinPts (4) Find cluster points, group density-reachable and density-connected points into the same cluster, and assign a unique identifier to each cluster to indicate its clustering class; calculate the cluster profile coefficient SH within the optimal cluster point module: s(x i+1 )>s(x i If ), then update MinPts_bes = i + 1. Where: a(x i ) is sample x i The average distance to all other points within the same cluster, b(x) i ) is sample x i The average distance to all points in the nearest other cluster is calculated; the optimal cluster point is determined, and the traditional DBSCAN algorithm is run again using Eps = Eps_bes and MinPts = MinPts_bes to group all core points and their directly density-reachable points into the same cluster, forming a cluster point set. The optimal cluster point needs to be marked with noise points and then excluded. The noise level is... Conditions for evaluating convergence: Eps(q) >= MinPts && Eps < d (7); Process of obtaining a data sequence from a closed polygon using a projection mechanism within the contour extraction module: In the projection mechanism, data points are classified according to the segments or vertices where they project onto the first principal component line. Let f be a curve composed of a polygon segment set with a vertex set V = {v1,..., v k+1}, and an edge set S = {s1,..., s k}, where s i has v i and v i+1 as vertices; V i = {x ∈ X n : Δ(x, v i ) = Δ(x, f), Δ(x, v i ) < Δ(x, v m ), m = 1, 2... i - 1} (8) Obtaining the vertex sequence: The projection index {t1, t2, ..., t} of the dataset is achieved by projecting the dataset onto a closed polygon. n }, based on the projection index t from smallest to largest i The order of the dataset (x) i ,y i The x(i) are sorted sequentially (i = 1, 2, ..., n), and the projection index is expressed as: t(x) i )=sup{t:||x i -f(t)||=inf τ ||x i -f(τ)||} (10) where sup(·) is the upper bound function and inf(·) is the lower bound function; the projection index t of the pre-established initial fractional error backpropagation model in the contour extraction module is... i As input to the fractional-order error backpropagation model; initialize the fractional-order error backpropagation model, setting the learning rate r, momentum parameter m, number of neurons S, weights w, and threshold v; select the number of layers n, input layer neurons A, hidden layer neurons Z, and output layer neurons U of the fractional-order error backpropagation model; the general mathematical expression for the contour based on the cascaded firing strategy is: Where S represents the number of hidden layer neurons; w1 and w2 represent the weights from the input layer to the hidden layer and from the hidden layer to the output layer; a represents the output threshold of the hidden layer neurons; b represents the output threshold of the output neurons; during forward propagation, the input and output values of each layer are calculated; during backpropagation, the output layer error is calculated; the model parameters are updated, i.e., the weights w and thresholds v in the fractional-order error backpropagation network based on the federated activation mechanism are updated; the weights w and thresholds v are updated based on the Caputo gradient descent mechanism, satisfying the following formula: Weight w update: Threshold v update: In backpropagation, the Sigmoid function is chosen as the activation function to calculate the global error E; the global error E is derived from the mean squared error E0. k Composition, E is represented as: Among them, the mean square deviation This represents the deviation between the true value y and the expected value c; if the constraints are met, the final smooth object contour is output; otherwise, the input and output values of each layer are recalculated.
Citation Information
Patent Citations
Image edge detection method and device
CN103955944A
Point cloud and image registration method and device based on calibration plate angular point alignment
CN116958218A