Complex edge structure bias amplification method, device, medium and equipment

By employing subpixel edge detection and nonparametric reference edge construction methods, adaptively adjusting the neighborhood size, and performing grayscale sampling and offset fitting along the normal direction, the problem of poor amplification effect of deviation in complex edge structures is solved, achieving high-precision micro-offset detection.

CN122390961APending Publication Date: 2026-07-14ANHUI AGRICULTURAL UNIVERSITY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ANHUI AGRICULTURAL UNIVERSITY
Filing Date
2026-06-11
Publication Date
2026-07-14

Smart Images

  • Figure CN122390961A_ABST
    Figure CN122390961A_ABST
Patent Text Reader

Abstract

The application provides a complex edge structure deviation amplification method, device, medium and equipment, relates to the field of image processing, and includes the following steps: obtaining a to-be-processed image; performing sub-pixel edge detection to obtain a point set containing a plurality of unordered sub-pixel edge points; converting the unordered sub-pixel edge points in the point set into a plurality of ordered edge curves; performing non-parametric reference edge construction to obtain a non-parametric reference edge curve and a normal vector of each reference point; performing gray sampling along the normal direction to obtain normal gray distribution data corresponding to each non-parametric reference edge curve; fitting and solving the normal offset of each ordered edge curve relative to the corresponding non-parametric reference edge curve to obtain a one-dimensional deviation signal corresponding to each non-parametric reference edge curve; and finally, performing amplification and interpolation, and deforming the to-be-processed image to obtain a target image after deviation amplification. The application realizes accurate amplification of the slight deviation of the complex edge structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of image processing, and in particular relates to methods, apparatus, media and devices for amplifying deviations in complex edge structures. Background Technology

[0002] In fields such as precision manufacturing and image inspection, it is often necessary to detect and amplify deviations in complex edge structures within images to accurately identify minute edge shifts, providing a basis for subsequent defect assessment and accuracy calibration. A core technical problem in this area is that the effectiveness of deviation extraction is significantly affected by the definition of the reference edge. Common techniques often set the reference as an ideal parametric boundary (such as a circle, ellipse, or straight line), which can also be considered a visual benchmark for the structure. This choice is effective for regular targets, but it is no longer suitable for complex edges with arbitrary global shapes, drastic curvature changes, or rich local details. In these scenarios, parametric modeling introduces reference errors, reducing the reliability of subsequent sampling processes. Specifically, it cannot be adjusted according to the actual noise level and curvature of the edge, resulting in insufficient alignment between the reference edge and the real, ordered edge. This leads to a decrease in the accuracy of subsequent grayscale sampling and the precision of deviation signal calculation, ultimately resulting in poor deviation amplification, an inability to accurately capture minute edge shifts, and an inability to meet the demands of high-precision inspection. Summary of the Invention

[0003] To address the aforementioned technical problems, this application provides a method, apparatus, medium, and device for amplifying deviations in complex edge structures, which at least partially solves the problems existing in the prior art.

[0004] In a first aspect of this application, a method for amplifying deviations in complex edge structures is provided, the method comprising the following steps: Obtain the image to be processed; Subpixel edge detection is performed on the image to be processed to obtain a point set containing several disordered subpixel edge points; Transform the disordered sub-pixel edge points in the point set into several ordered edge curves; Based on several ordered edge curves, nonparametric reference edges are constructed to obtain the nonparametric reference edge curve corresponding to each ordered edge curve, and the unit normal vector of each reference point corresponding to each nonparametric reference edge curve. The nonparametric reference edge construction is based on the principal curve estimation algorithm of local mean, and the neighborhood size corresponding to the principal curve estimation algorithm of local mean is adaptively determined according to the overall fitting degree, local fitting degree and smoothness index. In the process of nonparametric reference edge construction, the neighborhood size corresponding to each ordered edge curve is adaptively determined according to the overall fitting degree, local fitting degree and smoothness index. Gray-scale sampling is performed along the normal direction of each nonparametric reference edge curve to obtain the normal gray-scale distribution data corresponding to each nonparametric reference edge curve; wherein, the normal direction is determined based on the unit normal vector; Based on the grayscale distribution data of each normal direction, the normal offset of each ordered edge curve relative to the corresponding nonparametric reference edge curve is fitted and solved to obtain the one-dimensional deviation signal corresponding to each nonparametric reference edge curve. The one-dimensional deviation signal corresponding to each non-parametric reference edge curve is amplified and interpolated, and then the image to be processed is deformed to obtain the target image after deviation amplification.

[0005] In a second aspect of this application, a device for amplifying deviations in complex edge structures is provided, the device comprising: The acquisition unit is used to acquire the image to be processed; The detection unit is used to perform sub-pixel edge detection on the image to be processed, so as to obtain a point set containing several disordered sub-pixel edge points; The conversion unit is used to convert disordered sub-pixel edge points in a point set into several ordered edge curves; A construction unit is used to construct nonparametric reference edges based on several ordered edge curves, so as to obtain the nonparametric reference edge curve corresponding to each ordered edge curve, and the unit normal vector of each reference point corresponding to each nonparametric reference edge curve; wherein, the nonparametric reference edge construction is based on the principal curve estimation algorithm of local mean, and the neighborhood size corresponding to the principal curve estimation algorithm of local mean is adaptively determined according to the overall fitting degree, local fitting degree and smoothness index. In the process of nonparametric reference edge construction, the neighborhood size corresponding to each ordered edge curve is adaptively determined according to the overall fitting degree, local fitting degree and smoothness index. A sampling unit is used to perform grayscale sampling along the normal direction of each nonparametric reference edge curve to obtain the normal grayscale distribution data corresponding to each nonparametric reference edge curve; wherein, the normal direction is determined according to the unit normal vector; The solving unit is used to fit and solve the normal offset of each ordered edge curve relative to the corresponding nonparametric reference edge curve based on each normal gray-scale distribution data, so as to obtain the one-dimensional deviation signal corresponding to each nonparametric reference edge curve. The amplification unit is used to amplify and interpolate the one-dimensional deviation signal corresponding to each non-parametric reference edge curve, and then deform the image to be processed to obtain the target image after deviation amplification.

[0006] In a third aspect of this application, a non-transient computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored in the storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the aforementioned complex edge structure deviation amplification method.

[0007] In a fourth aspect of this application, an electronic device is provided, including a processor and the aforementioned non-transitory computer-readable storage medium.

[0008] This application has at least the following beneficial effects: The complex edge structure deviation amplification method provided in this application firstly acquires the image to be processed and performs sub-pixel edge detection to obtain a point set containing several disordered sub-pixel edge points. Sub-pixel level detection can capture finer edge details, laying a high-precision foundation for the subsequent construction of ordered edge curves; secondly, it converts the disordered sub-pixel edge points into several ordered edge curves, sorts out the structural features of complex edges, and integrates the messy edge points into curves with clear directions, solving the problem of disordered distribution of complex edge points and difficulty in performing unified deviation analysis; thirdly, it performs... When constructing nonparametric reference edges, a master curve estimation algorithm based on local means is used. The neighborhood size is adaptively determined according to the overall fit, local fit, and smoothness indices. Compared to a fixed neighborhood size approach, this adaptive neighborhood adjustment can dynamically match the optimal neighborhood size based on the actual noise level and curvature of each ordered edge curve. This avoids overfitting of the reference edge (due to noise interference) caused by an excessively small neighborhood, while also avoiding reference edge offset and loss of detail caused by an excessively large neighborhood. Simultaneously, the normal vector of each reference point is obtained, providing an accurate directional reference for subsequent normal grayscale sampling and bias calculation, ensuring... The reference edge achieves high alignment with the real ordered edge; then, grayscale sampling is performed along the normal direction of the nonparametric reference edge curve to obtain normal grayscale distribution data. This sampling method precisely focuses on the normal direction of the edge (i.e., the main direction of deviation generation), avoiding redundant data interference caused by illegal sampling and ensuring that the sampled data can truly reflect the offset characteristics of the edge. Next, the normal offset is solved by fitting the normal grayscale distribution data to obtain a one-dimensional deviation signal. The fitting operation eliminates the influence of noise on deviation detection, enabling accurate extraction of the minute offset of each ordered edge curve relative to the reference edge, solving the problems of existing techniques. The problem of low accuracy and high susceptibility to noise interference in intraoperative deviation signal extraction was addressed. Finally, the one-dimensional deviation signal was amplified and interpolated to deform the original image, resulting in an amplified target image. The amplification operation can intuitively present minute deviations, while the interpolation operation ensures the continuity of the displacement field, making the image deformation smoother and the deviation amplification more uniform. Ultimately, this achieved precise amplification of minute deviations in complex edge structures, solving the core problems of poor deviation amplification effect and difficulty in capturing minute offsets in existing technologies. This provides clear and accurate image evidence for subsequent defect judgment and accuracy calibration, meeting the actual needs of high-precision detection. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 A flowchart of a method for amplifying deviations in complex edge structures provided in this application embodiment; Figure 2 The image shows the effectiveness verification results of the adaptive neighborhood selection criterion in noisy edge scenes provided in the embodiments of this application; wherein, Figure 2 (a) is a graph showing the changes in the overall fit, local fit, and smoothness indices as a function of the neighborhood size of the master curve estimation algorithm based on local mean. Figure 2 (b) shows the effect of the corresponding neighborhood size on the reference fit and bias extraction. Figure 3 The diagram shows the preprocessing of representative frames from the pipeline experiment provided in this application, as well as the reference construction and normal sampling process of the principal curve estimation algorithm based on local means; wherein, Figure 3 (a) shows the input image of the PVC pipe cross-section and the original edge detection result. Figure 3 (b) is a graph showing the global / local fit index and bending energy smoothness of the outer and inner edges in this embodiment as a function of the neighborhood size of the master curve estimation algorithm based on local mean. Figure 3 (c) shows the original edges of the outer and inner edges of the pipe, the reference edge of the principal curve estimation algorithm based on local mean, and the geometric schematic diagram of normal vector sampling. Figure 3 (d) shows the normal grayscale distribution curves at multiple locations on the outer and inner edges of the pipe; Figure 4 A magnified visualization of the deviation of minute deformation of PVC pipe cross-section under impact excitation provided in an embodiment of this application; Figure 5 The input image, edge preprocessing, and normal sampling result diagram of the planar lattice mesh tensile test provided in the embodiments of this application; Figure 5 (a) is a schematic diagram of the input image and region of interest selection for a planar lattice mesh tensile test; Figure 5 (b) is a schematic diagram of the original edge, reference edge, and normal sampling geometry of the master curve estimation algorithm based on local mean within the region of interest. Figure 6 The deviation field and magnified deformation effect of the lattice structure provided in the embodiments of this application at five time points; Figure 7 This is a structural block diagram of the complex edge structure deviation amplification device provided in the embodiments of this application. Detailed Implementation

[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0012] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0013] It should be noted that the following description covers various aspects of embodiments within the scope of the appended claims. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this application, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.

[0014] Please refer to Figure 1 As shown, embodiments of this application provide a method for amplifying deviations in complex edge structures, the method comprising the following steps: S100, acquire the image to be processed.

[0015] Specifically, the images to be processed all come from practical application scenarios such as precision manufacturing and image detection, and usually contain complex edge structures that need to be detected for deviations (such as the outline edge of a part, the edge of the target to be detected, etc.).

[0016] S200: Perform sub-pixel edge detection on the image to be processed to obtain a point set containing several disordered sub-pixel edge points.

[0017] Specifically, in this embodiment, a local area effect edge localization algorithm is used to perform sub-pixel edge detection and extraction on the image to be processed, so as to obtain several sub-pixel edge points. These sub-pixel edge points are usually distributed on multiple different boundaries and do not have an inherent order.

[0018] S300 converts disordered sub-pixel edge points in a point set into several ordered edge curves.

[0019] Specifically, step S300 also includes: S310, cluster the disordered sub-pixel edge points in the point set according to the DBSCAN algorithm to obtain several clusters; wherein, the disordered sub-pixel edge points in each cluster constitute a spatially continuous boundary segment.

[0020] In this embodiment, a density-based clustering method (DBSCAN) is used to classify edge coordinates, assigning each detected pixel to a corresponding cluster based on spatial proximity. Points within the same cluster constitute spatially continuous boundary segments, while minimal clusters and isolated points are considered noise and discarded. The grouping stage yields a set of point clouds, each roughly corresponding to a single boundary. At this point, although the points within each point cloud are close to the same curve, they are still in a disordered state.

[0021] S320 sorts the unordered sub-pixel edge points within each cluster to obtain several ordered sequences.

[0022] For each cluster obtained from clustering, the goal is to arrange all sub-pixel edge points within each cluster into an ordered sequence that fits the underlying boundary and minimizes the cumulative distance between adjacent points. For a given order containing all sub-pixel edge points, the corresponding path length can be expressed as: ; In the formula, For any cluster containing The path length corresponding to a given sort of sub-pixel edge points; This represents the number of sub-pixel edge points in the cluster. The first in this cluster Sub-pixel edge points; The first in this cluster Sub-pixel edge points. Essentially, it represents the total length of the polyline connecting all sub-pixel edge points under the current sorting method, and its value directly reflects the rationality of the sorting: The smaller the value, the more compact the arrangement of adjacent points, the closer they fit the bottom boundary, and the more reasonable the sorting. The larger the value, the more uneven the spacing between adjacent points after sorting, which does not meet the sorting objective of conforming to the bottom boundary and minimizing the cumulative distance. Specifically, this formula means starting from the first sub-pixel edge point and extending to the... The process ends at each sub-pixel edge point. The Euclidean distance between each adjacent sub-pixel edge point is calculated sequentially. Then, the distances of all adjacent points are summed to obtain the total path length. This is used to measure the length of the polyline connecting all points. In practice, the simplest nearest neighbor traveling salesman heuristic algorithm is used to approximately minimize it. The algorithm starts from one endpoint and repeatedly visits the nearest unvisited point until all points are connected. Finally, the sorting direction of the path is determined according to a preset direction or the endpoint position to obtain an ordered sequence.

[0023] S330, based on the structural closure type of each ordered sequence, performs first and last point processing to obtain several ordered edge curves.

[0024] Here, step S330 also includes: S331, if the distance between the first and last points of any ordered sequence is less than the preset sampling distance, then the structure type of the ordered sequence is determined to be a closed structure; otherwise, the structure type of the ordered sequence is determined to be an open structure.

[0025] S332, If the structure type of the ordered sequence is a closed structure, then connect the first point and the last point of the ordered sequence.

[0026] S333, if the structure type of the ordered sequence is an open structure, then the first and last points of the ordered sequence are not connected.

[0027] After grouping and sorting, each boundary structure is considered as a sampling sequence along the curve. To determine whether a structure is closed or open, the distance between the first and last points is compared with a preset sampling distance. The preset sampling distance can be a typical sampling distance. The typical sampling distance can be the average distance between two adjacent sub-pixel edge points (or reference points) in the sampling sequence along the curve for each boundary structure after grouping and sorting. If the distance between the first and last points is less than the preset sampling distance, it is determined to be a closed contour, and subsequent operations are performed in a loop, with the last sampling point connected to the first sampling point; otherwise, it is determined to be an open curve, and the first and last points remain as boundaries without loop connection. In either case, the output of the grouping and sorting stage is a set of clean and ordered edge curves that meet the input format required for the Principal-Curveestimation by Local Means (PCLM) algorithm reference construction, hereinafter referred to as the PCLM algorithm. The PCLM algorithm is a data-driven framework for reference construction and bias signal extraction. This framework directly constructs smooth reference edges from detected edge pixels using the PCLM algorithm. To avoid manually adjusting the smoothing scale, it employs an adaptive neighborhood selection strategy, automatically balancing edge fit and reference smoothness. Based on the constructed reference, the bias signal is estimated along the local normal and transformed into a displacement field to achieve image deformation. Therefore, it can visualize and magnify minute geometric shifts in complex edges while preserving the overall image structure to the greatest extent possible.

[0028] S400, based on several ordered edge curves, nonparametric reference edges are constructed to obtain the nonparametric reference edge curve corresponding to each ordered edge curve, and the unit normal vector of each reference point corresponding to each nonparametric reference edge curve; wherein, during the construction of nonparametric reference edges, the neighborhood size corresponding to each ordered edge curve is adaptively determined according to the overall fitting degree, local fitting degree and smoothness index.

[0029] Specifically, after obtaining the ordered edge curves and their data-driven references, all subsequent processing is completed in the reference-aligned coordinate system.

[0030] In this embodiment, the nonparametric reference edge construction adopts a principal curve estimation algorithm based on local mean. The neighborhood size of the principal curve estimation algorithm based on local mean is different when constructing nonparametric reference edge curves for different ordered edge curves.

[0031] Since both the noise-free baseline and the true deviation are unknown in real-world images, a suitable reference curve needs to be constructed from the observed pixels. This does not require a fixed global function form or rely on real geometric information. Therefore, this embodiment does not use a parameterized model with a fixed global form for fitting, but instead uses a local manifold smoothing algorithm inspired by the principal curve.

[0032] The principal curve estimation algorithm based on local mean is as follows: Let... Let be the set of ordered sub-pixel edge points contained within any cluster. These ordered sub-pixel edge points can be considered as sampled values ​​of the underlying smooth boundary, therefore, it is necessary to derive them from... Construct smooth reference edges .

[0033] The initial reference edge is equal to the observed edge, the first... The coordinates of the reference points in the 0th iteration (initial state) satisfy the following conditions: ; Here, the observed edge refers to the ordered edge curve obtained after sub-pixel edge detection in step S200 and grouping, clustering, and sorting in step S300. The initial reference edge is directly taken as the observed edge, meaning the ordered set of detected and sorted edge points is used as the initial value of the nonparametric reference edge curve, providing a starting point for subsequent iterative smoothing. This allows the reference edge to gradually suppress local noise and normal perturbations while maintaining the overall boundary trend.

[0034] In the In each iteration, for each current reference point Select a fixed size neighborhood index set The neighborhood is defined by edge index or spatial distance. The local mean is calculated from these neighborhood points: ; in, For the first In the next iteration, the reference point The local mean of a is the average of the coordinates of all reference points in its neighborhood; For the first In the next iteration, the reference point The neighborhood index set contains a fixed number of reference point indices around the point; For the first In the nth iteration, the th neighborhood The coordinates of the reference points are used. Here, the local mean is used to calculate the centroid of the local reference points, providing a benchmark for subsequent construction of the local principal direction and updating the reference point positions. It is a key step in the PCLM algorithm to eliminate noise and fit the local orientation.

[0035] as well as Covariance matrix: ; The principal eigenvectors of the covariance matrix give the local one-dimensional principal direction. Its orthogonal unit vector As a local normal vector. By Projected to And the direction is On the straight line, complete the reference point update: ; in, For the first In the next iteration, the reference point The local principal direction (tangent direction) is obtained from the principal eigenvectors of the covariance matrix. The purpose of projection update is to correct the reference point from a position deviating from the local tangent back to the tangent direction, gradually eliminating noise and burrs at the edges and generating smooth reference edges.

[0036] The overall effect of the PCLM algorithm is to perform local principal component analysis (PCA) along the edge, gradually eliminating the normal component of the curve while fitting the locally estimated tangent. Repeating this operation is equivalent to a geometric low-pass filter, generating a smooth reference that passes through the center of the noisy edge band while preserving the overall boundary profile.

[0037] Performing the PCLM algorithm with different neighborhood sizes yields significantly different reference edges, resulting in varying bias signals when sampling the normal along these references. In simulation examples, excessively large neighborhood sizes cause overly smoothed reference edges that shrink inwards towards the spline, leading to low-frequency shifts in the bias signal and a severe underestimation of the true perturbation. Conversely, appropriately sized neighborhoods generate references with smaller biases, and the corresponding bias signals are more consistent with... Highly consistent, among which, The ideal deviation signal refers to the theoretical normal offset of the actual edge relative to the ideal reference edge, and serves as the benchmark for measuring the accuracy of the actual deviation signal. Since both the benchmark and the actual deviation are unknown in practical applications, this parameter cannot be manually adjusted based on the true value; therefore, an adaptive neighborhood selection strategy is urgently needed.

[0038] Among them, the neighborhood size corresponding to the principal curve estimation algorithm based on local mean is adaptively determined according to the overall fit, local fit, and smoothness indices, including: S410, traverse each preset candidate neighborhood size, use each preset candidate neighborhood size as the neighborhood size parameter of the principal curve estimation algorithm based on local mean, and fit to obtain the reference broken line corresponding to each preset candidate neighborhood size.

[0039] Here, the reference construction process is affected by the neighborhood size, which determines the effective smoothing scale of the reference. If the neighborhood size is too small, the reference may overfit to high-frequency detection noise; if the neighborhood size is too large, the reference will shift (such as shrinkage or drift) and deviate from the observation edge.

[0040] For a discrete set of candidate neighborhoods, a reference is constructed for each candidate value, and its fit and smoothness are evaluated to automatically select an appropriate neighborhood size. Regarding the candidate neighborhood size... The reference polyline can be obtained by running the PCLM algorithm for T iterations. ;in, The candidate neighborhood size is At that time, refer to the first fold line. The coordinates of the reference points.

[0041] It's important to note that during the iterative smoothing and neighborhood selection process of the PCLM algorithm, the intermediate shape formed by connecting reference points in sequence is called a reference polyline. After the neighborhood size is determined and the iteration converges, the final smooth and stable reference polyline is called a nonparametric reference edge curve.

[0042] S420, for each preset candidate neighborhood size, calculate the nearest point projection and normal residual of each sub-pixel edge point on the corresponding ordered edge curve on the corresponding reference polyline.

[0043] Here, for Its projection onto the nearest point on the reference broken line is: ; The corresponding signed normal residual can be expressed as: ; In the formula, Indicates the projection point The unit normal vector is the vector whose normal direction is normalized to a length of 1. It only represents the direction and does not contain length information. The unit normal vector is formed by the vertex. The finite difference tangent at the point is calculated and then linearly interpolated along the projected line segment.

[0044] S430, calculate each overall fit and local fit based on each normal residual; where the overall fit characterizes the degree of overall offset of the reference polyline from the corresponding ordered edge curve; and the local fit characterizes the maximum degree of offset of the reference polyline on a local segment.

[0045] S440, calculate the smoothness index based on each reference polyline; where the smoothness index characterizes the average curvature of the reference polyline.

[0046] Here, in order to balance the fidelity of the observed edge with the smoothness of the reference, three metrics need to be evaluated for the size of each candidate neighborhood.

[0047] First, through projection-based normal residuals Two robust fit metrics are used to measure global offset and local drift: ; In the formula, This is the median function, used to take the median of a set of input values. Its core function is to improve data robustness and avoid interference from extreme noise points on the fit calculation results. It is used for projection-based normal residuals. Taking the absolute value eliminates the influence of the offset direction, retaining only the magnitude of the offset distance for subsequent quantitative calculations of the fit. `max()` is the maximum value function, specifically meaning: among the medians of the local residuals corresponding to all sliding windows, the maximum value is selected to characterize the maximum degree of offset of the reference edge in the local segment of the observed edge, avoiding local fit failure. This represents a fixed-length sliding window along an ordered edge index (with endpoints removed to mitigate boundary artifacts). For overall fit, used to penalize overall drift / shrinkage. This is for localized fit, used to prevent segmented drift.

[0048] Secondly, a stable smoothness index is used to evaluate the reference smoothness. The candidate neighborhood size is... The smoothness index at that time is: ; Here, based on the noise scale estimate, global and local fitting thresholds are calculated according to a preset constant ratio to ensure that the threshold matches the noise level: when the noise is high, the threshold is automatically widened; when the noise is low, the threshold is automatically tightened, avoiding overfitting or undersmoothing problems caused by a fixed threshold. This provides a reasonable constraint boundary for subsequent neighborhood selection, ensuring that the selected reference edges will not overfit the noise due to an excessively low threshold, nor will they be overly smoothed due to an excessively high threshold, deviating from the overall trend of the observed edges.

[0049] S450, based on the overall fit threshold and the local fit threshold, select a feasible neighborhood size set that simultaneously satisfies the overall fit and local fit constraints.

[0050] The overall fit threshold and the local fit threshold are determined according to the following steps: First, the noise scale estimate is calculated using the median absolute deviation method based on the second difference of the corresponding ordered edge curves. Second, the overall fit threshold and the local fit threshold are calculated based on the noise scale estimate and a preset constant.

[0051] S460 determines the target neighborhood size as the neighborhood size that has the smallest smoothness index among the feasible neighborhood sizes.

[0052] Specifically, this is as follows: Robust noise scaling estimation based on second-order difference computation of ordered edges. (Based on the absolute deviation of the median) Determine the difference threshold: ; ; In the formula, The overall fit threshold; This represents the local fit threshold. and It is a fixed constant.

[0053] The three indicators mentioned above complement each other: and Feasible solutions are determined by constraining global and local fit. S(n) then sorts the candidate values ​​within the feasible set to select a low-frequency trend reference. The final selected neighborhood size is the smoothest candidate value in the feasible set. ; As mentioned earlier, the adaptive process treats the neighborhood size as a data-driven scaling parameter. This is achieved by evaluating each candidate value individually. The neighborhood size corresponding to the smoothest reference selected simultaneously satisfies both the overall fit constraint (penalizing drift / shrinkage) and the local fit constraint (preventing piecewise drift). This achieves dual constraints on fit and smoothness, automatically balancing the fitting accuracy and smoothness of the reference edge, avoiding the subjectivity of manual parameter tuning, and generating a smooth reference edge that maintains a close fit with the observed edge and suppresses noise disturbances, providing a reliable benchmark for subsequent deviation signal calculations.

[0054] Figure 2 The proposed selection criterion was evaluated in a noisy edge contour scene. This application uses the same synthetic benchmark and local perturbation signal as described above, such as… Figure 2 As shown in (a), the overall fit is given. Local fit The curves showing the smoothness index S(n) as a function of the neighborhood size of the PCLM algorithm are also shown. The red dashed line represents the tolerance threshold determined based on the noise level. and The red markers represent the neighborhood size automatically determined according to the adaptive neighborhood selection criterion. The overall fit index and local fit index corresponding to the size of the neighborhood both meet the corresponding tolerance threshold constraints, and have a better smoothness index among the candidate neighborhoods that meet the tolerance threshold constraints, thereby achieving a balance between edge fit and reference edge smoothness.

[0055] Figure 2 Figure (b) illustrates the impact of selecting this neighborhood size on reference fitting and bias extraction. The upper subplot shows the reference edge comparison results, the middle subplot shows the corresponding bias signal, and the lower subplot shows the result after low-pass filtering of the bias signal. Figure 2As can be seen in (b), when the neighborhood size is too large, the PCLM reference edge is prone to over-smoothing, resulting in low-frequency shifts in the extracted bias signal; while the neighborhood size obtained by adaptive selection... At that time, the extracted deviation signal, after low-pass filtering, is similar to the ideal deviation. The low-pass filtering results show high consistency. This indicates that the adaptive neighborhood selection criterion used in this embodiment can suppress edge detection jitter while preserving local geometric deviations in the analysis, thereby improving the stability of reference edge construction and deviation signal extraction.

[0056] S500, grayscale sampling is performed along the normal direction of each nonparametric reference edge curve to obtain the normal grayscale distribution data corresponding to each nonparametric reference edge curve; wherein, the normal direction is determined according to the unit normal vector.

[0057] Specifically, the normal direction of a nonparametric reference edge curve is defined by the unit normal vectors of all its reference points; the unit normal vector of each reference point corresponds to the local normal direction at that point, and the set of these local directions constitutes the normal direction system of the entire curve.

[0058] Let the reference edge be The corresponding unit normal vector is The image grayscale values ​​are expressed in a local reference normal coordinate system attached to the edge. For each reference position... ,Establish A discrete set of n normal offsets; where the nth offset for: ; In the formula, This is the half-width of the sampling band. Offset. exist[ , The samples are uniformly distributed within the area and symmetrical about zero, forming a narrow sampling band centered on the reference edge.

[0059] set up To continuously extend the input image obtained through bilinear interpolation of the pixel grid, in Location sampling along The grayscale value of the normal vector is used to obtain the normal grayscale distribution: ; in, This is a continuous grayscale function of the input image obtained through bilinear interpolation, which can output grayscale values ​​at any coordinate position; For the first The coordinates of the reference points For the first The unit normal vector of each reference point; summing the distribution of all positions yields the image grayscale value reflecting the coordinates of the reference points and the normal vector. Array.

[0060] parameter and The selection principle is that the sampling band width should be wide enough to include the real edges, while also being narrow enough to avoid crossing irrelevant structures or large grayscale changes. In practical applications, a moderate number of sampling points is usually used. Make adjacent offsets Spacing This achieves a sub-pixel level, thus striking a balance between spatial coverage and distribution length.

[0061] S600, based on the grayscale distribution data of each normal direction, fits and solves the normal offset of each ordered edge curve relative to the corresponding non-parametric reference edge curve to obtain the one-dimensional deviation signal corresponding to each non-parametric reference edge curve.

[0062] Specifically, based on the sampling distribution At the reference position Estimating one-dimensional bias signal First, average the sampling distribution along the edges to obtain the normal common edge distribution: ; Assuming each distribution Relative common distribution There is a translation along the normal coordinate. By performing first-order linearization on the translation model and applying least-squares fitting, the estimated formula is obtained: ; In the formula, This represents the summation over all sampling offsets. For public distribution about The derivative of .

[0063] S700 amplifies and interpolates the one-dimensional deviation signal corresponding to each non-parametric reference edge curve, and then deforms the image to be processed to obtain the target image after deviation amplification.

[0064] Specifically, step S700 also includes: S710 multiplies the one-dimensional deviation signal by a preset amplification factor to obtain the amplified displacement of each reference point along the normal direction.

[0065] Here, the reference point is the discrete sampling point on the corresponding nonparametric reference edge curve.

[0066] S720 constructs a sparse displacement field along the nonparametric reference edge curve based on the normal displacement and the unit normal vector of the corresponding reference point, and extends it to the pixel domain of the image to be processed by interpolation to obtain a continuous displacement field.

[0067] The magnified displacement at each reference point is taken as the normal deviation multiplied by the magnification factor. : ; In the formula, This is the magnification factor. (Vector) A sparse displacement field is defined along the reference edge.

[0068] Constructing a displacement field across the entire image domain, treating edge displacements as scattered control samples, and interpolating to obtain a continuous vector field. .

[0069] S730 performs inverse geometric transformation on the image to be processed based on the continuous displacement field, and assigns grayscale values ​​based on bilinear interpolation to generate the target image after deviation magnification.

[0070] Subsequently according to The input frame is warped to generate a magnified image. Using inverse warping combined with bilinear interpolation, the warped image can be represented as: ; Due to continuous vector field Driven entirely by the amplified deviation signal, the final deformation result can reveal and amplify the geometric deviations around the reference edge while preserving the overall image structure.

[0071] The following specific embodiments illustrate the method for amplifying deviations in complex edge structures provided in this application.

[0072] Example 1: This embodiment uses a PVC pipe structure as an example to illustrate the deviation amplification method based on PCLM reference edge construction provided in this application. The image sequence data used comes from the publicly available MIT-CASIL database. In the experiment, one end of the PVC pipe is fixed, and the free end is subjected to impact excitation by an instrumented impact hammer to induce transient vibration response in the pipe cross-section. A Phantom high-speed camera is used to acquire motion images of the pipe cross-section at a frame rate of 24096 frames / second and an image spatial resolution of 192×192 pixels. Figure 3 Image (a) shows a representative frame from the image sequence and the corresponding edge detection results.

[0073] like Figure 3As shown, this embodiment first performs edge preprocessing, PCLM reference edge construction, and normal sampling on representative frames of the pipeline experiment. Specifically, after edge detection of the representative frames, a total of 871 edge points are obtained; then, through density clustering and curve sorting, these edge points are divided into two groups of closed edge structures, namely outer ring-structure 1 and inner ring-structure 2. Among them, outer ring-structure 1 includes 461 edge points, and inner ring-structure 2 includes 410 edge points. The two groups of closed edge structures after sorting form one-dimensional ordered edge curves, providing input data for subsequent PCLM reference edge construction.

[0074] For the outer ring-structure 1 and the inner ring-structure 2, the corresponding smooth reference edges are constructed using the PCLM algorithm. Figure 3 Figure (b) illustrates the relationship between the neighborhood size of the PCLM algorithm and the overall fit index, local fit index, and smoothness index. The marked points in the figure represent the neighborhood size determined by the adaptive neighborhood selection criterion. After obtaining the PCLM reference edges of the outer ring-structure 1 and the inner ring-structure 2, the unit normal of each sampling point on the reference edge is further calculated, and grayscale sampling is performed along the unit normal. In this embodiment, 11 grayscale values ​​(M=11) are uniformly collected along the normal at each reference position to obtain the corresponding normal grayscale distribution. Figure 3 (c) shows the original edges, PCLM reference edges, and sampled geometry of the PCLM normal for the outer ring-structure 1 and inner ring-structure 2; Figure 3 Figure (d) shows the normal grayscale distribution curves corresponding to multiple sampling positions on two sets of edge structures.

[0075] After completing the reference edge construction and normal sampling, the normal deviation signal is further extracted and amplified for each frame in the image sequence. For each frame in the sequence, the normal deviation signal is extracted along the outer and inner edge references. The spatial reference geometry (including reference edges and normal vectors) is determined by... Once the time frame is determined, all deviations are measured relative to this reference configuration. Each deviation signal is mapped to a displacement field along the normal direction and used to perform warping / reverse geometric transformation on the corresponding frame, resulting in a magnified image sequence that allows clear observation of minute movements of the pipe cross-section.

[0076] Figure 4 The results show magnified visualizations of the deviations in minute deformations of the PVC pipe cross-section at five representative moments. Figure 4 (a) shows the normal deviation field extracted along the fixed reference edge, which is displayed in a color mapping manner on the outer ring-structure 1 and the inner ring-structure 2; Figure 4 Image (b) is a magnified image of the deviation at the corresponding time point. Figure 4 It can be seen that, in At that moment, the impact hammer had not yet contacted the pipe, and the deviation signal mainly reflected the static local irregularities of the pipe cross-section relative to the fixed reference edge and low-level reference vibration; from At the moment of impact, the impact hammer acts on the pipe, and the deviation signal contains the transient deformation component caused by the impact excitation. The corresponding magnified image of the deviation can clearly show the local indentation near the impact point and the subsequent rebound deformation process of the pipe cross-section.

[0077] As can be seen from the above results, the method provided in this application can construct a PCLM reference edge based on the edge structure of the pipe section without the need to lay out physical marker points, and realize the visualization and magnification of the small vibration and local transient deformation of the PVC pipe section under impact excitation by extracting the normal deviation signal and driving the image warping by deviation.

[0078] Example 2: This embodiment uses a planar lattice mesh structure as an example to illustrate the application of the deviation amplification method based on PCLM reference edge construction provided in this application in complex edge structures. Unlike the PVC pipe structure in Embodiment 1, which only contains two smooth closed boundaries, the planar lattice mesh structure in this embodiment consists of a large number of short edge segments and repeating units, forming a dense and complex edge network, which can be used to illustrate the applicability of the method in complex geometric edge structures.

[0079] like Figure 5 As shown in (a), the bottom of the square polyethylene mesh specimen was first fixed in a vise and slowly stretched vertically. Images of the stretched deformation of the mesh structure were acquired using a Chronos 2.1-HD high-speed camera at a frame rate of 1069 frames per second, with an image spatial resolution of 1024×1028 pixels. Subsequently, an analysis region of 430×280 pixels was selected in the central area of ​​the mesh structure as the analysis region for subsequent edge detection, reference edge construction, deviation signal extraction, and deviation amplification.

[0080] Within the analysis area, sub-pixel edge detection was performed on the image, yielding 2982 edge points. Then, density-based clustering and curve sorting methods were used to group and sort the detected edge points, resulting in 19 independent edge structures, including 7 closed edge structures. The number of edge sampling points for each edge structure ranged from 53 to 243, with a median of approximately 140 points. This processing transforms disordered edge points in complex mesh structures into multiple ordered edge curves, providing input data for subsequent PCLM reference edge construction.

[0081] For each edge structure, a corresponding smooth reference edge is constructed using the PCLM algorithm, and the unit normal on the reference edge is calculated. In this embodiment, nine uniformly distributed sampling points (M=9) are set along the unit normal at each reference position to obtain the normal grayscale distribution. Figure 5 (b) uses different colors to distinguish each edge structure, showing the sampling geometry of the original edge, PCLM reference edge, and PCLM normal within the analysis area. Figure 5 As can be seen in (b), the method of this application can construct reference edges and establish corresponding normal sampling geometry for each edge structure in a mesh structure containing multiple repeating pores and complex boundaries.

[0082] Figure 6 The results of deviation signal extraction and deviation amplification visualization for a planar lattice mesh structure at five representative time points are shown. Each row corresponds to one time point. Figure 6 Column 1 represents the input analysis region image at the corresponding time point; column 2 represents the distribution result of the deviation signal extracted along the PCLM reference edge; and column 3 represents the magnified image of the deviation obtained after generating a deviation-driven displacement field based on the deviation signal. The deviation signal distribution result represents the normal deviation value of each edge structure relative to the fixed spatial reference geometry through color mapping.

[0083] exist At this point, the mesh structure is already in a pre-stretched state, and its deviation amplitude relative to the fixed spatial reference geometry is small, with a relatively narrow range of color changes in the deviation signal distribution map. At this time, the magnified image of the deviation in the right column can already show that some mesh cells exhibit non-uniform stretching. As the stretching process progresses... The time lasts until At any given moment, the deviation amplitude gradually increases, and the range of color changes in the deviation signal distribution graph widens accordingly. Figure 6 As can be seen, the deformation of the mesh structure is spatially non-uniformly distributed, with some edge structures and mesh cells exhibiting significant normal offsets related to the stretching direction. The corresponding magnified image clearly shows the gradual elongation, shape changes, and local non-uniform deformation of the mesh pores, while maintaining the overall connectivity of the lattice mesh structure.

[0084] As can be seen from the above results, the method provided in this application is not only applicable to pipe cross-sectional structures with regular closed edges, but also to complex planar lattice mesh structures composed of a large number of short edge segments and repeating elements. By constructing PCLM reference edges for each edge structure and generating a deviation-driven displacement field based on the normal deviation signal, the method in this application can realize the extraction and visualization of local small deformations of complex edge structures during the tensile process.

[0085] Please refer to Figure 7 As shown, an embodiment of this application provides a complex edge structure deviation amplification device 100, the device comprising: Acquisition unit 110 is used to acquire the image to be processed; The detection unit 120 is used to perform sub-pixel edge detection on the image to be processed, so as to obtain a point set containing several disordered sub-pixel edge points; The conversion unit 130 is used to convert disordered sub-pixel edge points in the point set into several ordered edge curves; The construction unit 140 is used to construct nonparametric reference edges based on several ordered edge curves, so as to obtain the nonparametric reference edge curve corresponding to each ordered edge curve, and the unit normal vector of each reference point corresponding to each nonparametric reference edge curve; wherein, in the process of constructing nonparametric reference edges, the neighborhood size corresponding to each ordered edge curve is adaptively determined according to the overall fitting degree, local fitting degree and smoothness index. The sampling unit 150 is used to perform grayscale sampling along the normal direction of each nonparametric reference edge curve to obtain the normal grayscale distribution data corresponding to each nonparametric reference edge curve; wherein, the normal direction is determined according to the unit normal vector. The solver unit 160 is used to fit and solve the normal offset of each ordered edge curve relative to the corresponding nonparametric reference edge curve based on each normal gray-scale distribution data, so as to obtain the one-dimensional deviation signal corresponding to each nonparametric reference edge curve. The amplification unit 170 is used to amplify and interpolate the one-dimensional deviation signal corresponding to each non-parametric reference edge curve, and then deform the image to be processed to obtain the target image after deviation amplification.

[0086] Embodiments of this application also provide a computer program product including program code that, when the program product is run on an electronic device, causes the electronic device to perform the steps of the methods described above according to various exemplary embodiments of this application.

[0087] Furthermore, although the steps of the method in this application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0088] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, mobile terminal, or network device, etc.) to execute the methods according to the embodiments of this application.

[0089] In an exemplary embodiment of this application, an electronic device capable of implementing the above-described method is also provided.

[0090] Those skilled in the art will understand that various aspects of this application can be implemented as a system, method, or program product. Therefore, various aspects of this application can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software implementations, collectively referred to herein as a "circuit," "module," or "system."

[0091] An electronic device according to this embodiment of the present application. The electronic device is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of the present application.

[0092] Electronic devices are manifested in the form of general-purpose computing devices. Components of an electronic device may include, but are not limited to: at least one processor, at least one memory, and buses connecting different system components (including memory and processor).

[0093] The memory stores program code that can be executed by a processor, causing the processor to perform the steps described in the "Exemplary Methods" section above, according to various exemplary embodiments of this application.

[0094] The storage may include readable media in the form of volatile storage, such as random access memory (RAM) and / or cache memory, and may further include read-only memory (ROM).

[0095] The storage may also include programs / utilities having a set (at least one) of program modules, including but not limited to: an operating system, one or more applications, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.

[0096] A bus can represent one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus that uses any of the various bus architectures.

[0097] The electronic device can also communicate with one or more external devices (such as keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device, and / or any device that enables the electronic device to communicate with one or more other computing devices (such as routers, modems, etc.). This communication can be performed via input / output (I / O) interfaces. Furthermore, the electronic device can communicate with one or more networks (such as local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter. As shown in the figure, the network adapter communicates with other modules of the electronic device via a bus. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0098] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this application.

[0099] In exemplary embodiments of this application, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible implementations, various aspects of this application may also be implemented as a program product including program code, which, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of this application described in the "Exemplary Methods" section above.

[0100] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may 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 readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, 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 devices, magnetic storage devices, or any suitable combination thereof.

[0101] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0102] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0103] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0104] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this application, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0105] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0106] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for amplifying deviations in complex edge structures, characterized in that, The method includes: Obtain the image to be processed; Subpixel edge detection is performed on the image to be processed to obtain a point set containing several disordered subpixel edge points; Transform the disordered sub-pixel edge points in the point set into several ordered edge curves; Based on several ordered edge curves, nonparametric reference edges are constructed to obtain the nonparametric reference edge curve corresponding to each ordered edge curve, and the unit normal vector of each reference point corresponding to each nonparametric reference edge curve; wherein, during the construction of nonparametric reference edges, the neighborhood size corresponding to each ordered edge curve is adaptively determined according to the overall fit, local fit and smoothness indices. Gray-scale sampling is performed along the normal direction of each nonparametric reference edge curve to obtain the normal gray-scale distribution data corresponding to each nonparametric reference edge curve; wherein, the normal direction is determined based on the unit normal vector; Based on the grayscale distribution data of each normal direction, the normal offset of each ordered edge curve relative to the corresponding nonparametric reference edge curve is fitted and solved to obtain the one-dimensional deviation signal corresponding to each nonparametric reference edge curve. The one-dimensional deviation signal corresponding to each non-parametric reference edge curve is amplified and interpolated, and then the image to be processed is deformed to obtain the target image after deviation amplification.

2. The method for amplifying deviations in complex edge structures according to claim 1, characterized in that, The process of converting disordered sub-pixel edge points in a point set into several ordered edge curves includes: The DBSCAN algorithm is used to cluster unordered sub-pixel edge points in the point set to obtain several clusters; among them, the unordered sub-pixel edge points in each cluster constitute spatially continuous boundary segments. The unordered sub-pixel edge points within each cluster are sorted to obtain several ordered sequences. The first and last points are processed according to the structural closure type of each ordered sequence to obtain several ordered edge curves.

3. The method for amplifying deviations in complex edge structures according to claim 2, characterized in that, The first and last points are processed according to the structural closure type of each ordered sequence to obtain several ordered edge curves, including: If the distance between the first and last points of any ordered sequence is less than the preset sampling distance, then the structure type of the ordered sequence is determined to be a closed structure; otherwise, the structure type of the ordered sequence is determined to be an open structure. If the structure type of the ordered sequence is a closed structure, then connect the first point and the last point of the ordered sequence; If the structure type of the ordered sequence is an open structure, then the first and last points of the ordered sequence are not connected.

4. The method for amplifying deviations in complex edge structures according to claim 1, characterized in that, The nonparametric reference edge construction adopts a principal curve estimation algorithm based on local means. The neighborhood size of the principal curve estimation algorithm based on local means is different when constructing nonparametric reference edge curves for different ordered edge curves.

5. The method for amplifying deviations in complex edge structures according to claim 4, characterized in that, The neighborhood size corresponding to each ordered edge curve is adaptively determined based on the overall fit, local fit, and smoothness indices, including: Traverse each preset candidate neighborhood size, and use each preset candidate neighborhood size as the neighborhood size parameter of the principal curve estimation algorithm based on local mean, and fit to obtain the reference broken line corresponding to each preset candidate neighborhood size; For each preset candidate neighborhood size, calculate the nearest point projection and normal residual of each sub-pixel edge point on the corresponding ordered edge curve on the corresponding reference polyline; Each global fit and local fit are calculated based on each normal residual; where the global fit represents the overall offset of the reference polyline from the corresponding ordered edge curve; and the local fit represents the maximum offset of the reference polyline on a local segment. A smoothness index is calculated for each reference polyline; the smoothness index represents the average curvature of the reference polyline. Based on the overall fit threshold and the local fit threshold, a feasible neighborhood size set that simultaneously satisfies the overall fit and local fit constraints is selected. The neighborhood size with the smallest smoothness index among the feasible neighborhood sizes is determined as the target neighborhood size.

6. The method for amplifying deviations in complex edge structures according to claim 5, characterized in that, The overall fit threshold and the local fit threshold are determined according to the following steps: Based on the second difference of the corresponding ordered edge curve, the noise scale estimate is calculated using the median absolute deviation method. Based on the noise scale estimate and preset constants, the overall fit threshold and local fit threshold are calculated.

7. The method for amplifying deviations in complex edge structures according to claim 6, characterized in that, The step of amplifying and interpolating the one-dimensional deviation signal corresponding to each non-parametric reference edge curve, and then deforming the image to be processed to obtain the target image after deviation amplification, includes: Multiply the one-dimensional deviation signal by a preset amplification factor to obtain the amplified displacement of each reference point along the normal direction. Based on the normal displacement and the unit normal vector of the corresponding reference point, a sparse displacement field is constructed along the nonparametric reference edge curve, and then extended to the pixel domain of the image to be processed by interpolation to obtain a continuous displacement field. The image to be processed is subjected to inverse geometric transformation based on the continuous displacement field, and grayscale is assigned based on bilinear interpolation to generate the target image after deviation magnification.

8. A device for amplifying deviations in complex edge structures, characterized in that, The device includes: The acquisition unit is used to acquire the image to be processed; The detection unit is used to perform sub-pixel edge detection on the image to be processed, so as to obtain a point set containing several disordered sub-pixel edge points; The conversion unit is used to convert disordered sub-pixel edge points in a point set into several ordered edge curves; The construction unit is used to construct nonparametric reference edges based on several ordered edge curves, so as to obtain the nonparametric reference edge curve corresponding to each ordered edge curve, and the unit normal vector of each reference point corresponding to each nonparametric reference edge curve; wherein, in the process of constructing nonparametric reference edges, the neighborhood size corresponding to each ordered edge curve is adaptively determined according to the overall fitting degree, local fitting degree and smoothness index. A sampling unit is used to perform grayscale sampling along the normal direction of each nonparametric reference edge curve to obtain the normal grayscale distribution data corresponding to each nonparametric reference edge curve; wherein, the normal direction is determined according to the unit normal vector; The solving unit is used to fit and solve the normal offset of each ordered edge curve relative to the corresponding nonparametric reference edge curve based on each normal gray-scale distribution data, so as to obtain the one-dimensional deviation signal corresponding to each nonparametric reference edge curve. The amplification unit is used to amplify and interpolate the one-dimensional deviation signal corresponding to each non-parametric reference edge curve, and then deform the image to be processed to obtain the target image after deviation amplification.

9. A non-transitory computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program segment, which is loaded and executed by a processor to implement the method as described in any one of claims 1-7.

10. An electronic device, characterized in that, Includes a processor and the non-transitory computer-readable storage medium as described in claim 9.