A part bending forming deformation amount detection method, device, medium and equipment
By using machine vision and spatial ranging technology, a model for detecting the bending deformation of parts was constructed, which solved the problems of large measurement errors and dynamic detection during the bending and forming process of parts. This enabled high-precision, dynamic deformation monitoring and intelligent control, improving forming quality and process optimization capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHENGDU AIRCRAFT INDUSTRY GROUP
- Filing Date
- 2026-03-20
- Publication Date
- 2026-07-14
AI Technical Summary
In existing technologies, the measurement error of deformation during the bending and forming process of parts is large, and dynamic detection cannot be achieved, which seriously affects the precise control and optimization of the process.
By employing machine vision and spatial ranging technology, the bending deformation images of parts are acquired, preprocessed, and a bending deformation detection model is constructed. The bending deformation is output in real time, and intelligent control is achieved by combining the model with risk warning thresholds.
It achieves high-precision and dynamic monitoring of the bending and forming process of parts, improves the consistency of forming quality, prevents defects, provides data support for process optimization, and realizes the upgrade from experience-based processing to digital and intelligent control.
Smart Images

Figure CN122391082A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of material forming monitoring technology, specifically relating to a method, device, medium and equipment for detecting the deformation of a part during bending forming. Background Technology
[0002] Bending forming is a common plastic forming process for machining curved contours of parts such as guide tubes and frame edges in fields such as vehicles, ships, aerospace, and machinery. Controlling the amount of deformation during the process is crucial, as the degree of matching between this parameter and material properties and mechanical properties directly determines the surface quality and overall performance of the machined part. Currently, the measurement of this deformation mainly relies on manual marking combined with tools such as measuring tapes, calculating by comparing the change in the spacing of the markings before and after bending. However, this method has two significant limitations: first, due to insufficient positioning accuracy of the markings, it is difficult to ensure an ideal fit between them and the outer contour of the bent section of the part, resulting in large measurement errors; second, this method can only obtain the static deformation before and after bending, and cannot achieve real-time monitoring of the dynamic changes in deformation throughout the bending process, severely restricting the precise control and optimization of the process. Summary of the Invention
[0003] In view of the shortcomings of the prior art, the purpose of this application is to provide a method, device, medium and equipment for detecting the deformation of parts during bending and forming. This application aims to solve the problems of large measurement error of deformation and inability to dynamically detect data during the bending and forming process of parts.
[0004] To achieve the above objectives, this application provides the following technical solution: A method for detecting the bending deformation of a part includes: acquiring a bending deformation image of the part to be tested; preprocessing the bending deformation image of the part to be tested; constructing a bending deformation detection model for the part and training the model; inputting the preprocessed bending deformation image of the part to be tested into the trained bending deformation detection model for the part, and outputting the bending deformation of the part to be tested.
[0005] Optionally, the preprocessing of the bending deformation image of the part under test includes: converting the bending deformation image to grayscale; denoising the grayscale-converted bending deformation image; enhancing the contrast of the denoised bending deformation image; binarizing the contrast-enhanced bending deformation image; performing morphological processing on the binarized bending deformation image; and performing edge detection on the morphologically processed bending deformation image.
[0006] Optionally, the part bending deformation detection model includes: a feature marker point selection module, an image-spatial distance mapping module, a dynamic process association module, and a risk warning threshold module. The feature marker point selection module automatically identifies and locates the geometric transition points at both ends of the bending segment of the part, and marks them as reference feature points characterizing the part's deformation. The image-spatial distance mapping module establishes a conversion relationship between the pixel positions of feature points in the image and their actual three-dimensional spatial coordinates through calibration to calculate the feature point spacing. The dynamic process association module is used to convert the real-time calculated bending deformation... L With bending angle α Perform synchronous association and generate a description of the dynamic relationship between the two. L-α The curve; the risk warning threshold module is used to monitor the deformation of the part in real time according to the preset deformation threshold of the part, and automatically trigger a warning when the deformation exceeds the threshold.
[0007] Optionally, training the part bending deformation detection model includes: constructing a dataset containing the part bending deformation and corresponding feature vectors, and dividing it into a training set and a validation set according to a ratio; training the part bending deformation detection model based on the training set until the loss function converges; validating the model based on the validation set, and if the key performance indicators meet the preset conditions, the model is validated; otherwise, the training strategy is adjusted or the model structure is improved.
[0008] This application also provides a device for detecting the bending deformation of a part, the device comprising: an acquisition module for acquiring a bending deformation image of the part to be tested; a preprocessing module for preprocessing the bending deformation image of the part to be tested; a model building and training module for building a bending deformation detection model of the part and training the model; and a detection module for inputting the preprocessed bending deformation image of the part to be tested into the trained bending deformation detection model of the part and outputting the bending deformation of the part to be tested.
[0009] Optionally, the preprocessing module includes: a grayscale processing unit for performing grayscale processing on the curved deformation image; a denoising unit for performing denoising on the grayscale processed curved deformation image; a contrast enhancement unit for performing contrast enhancement on the denoised curved deformation image; a binarization processing unit for performing binarization processing on the contrast-enhanced curved deformation image; a morphological processing unit for performing morphological processing on the binarized curved deformation image; and an edge detection unit for performing edge detection on the morphologically processed curved deformation image.
[0010] This application also provides a storage medium including instructions that, when executed on a computer, cause the computer to perform the method as described in the preceding claim.
[0011] This application also provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as described in any of the preceding claims.
[0012] Compared with the prior art, the beneficial effects of this application are as follows: This application integrates machine vision and spatial ranging technologies to achieve non-contact, high-precision dynamic monitoring of deformation during the bending and forming process of parts. It effectively overcomes the limitations of traditional manual scribing and measurement methods, such as inaccurate positioning, large errors, and inability to acquire data in real time. This application can automatically establish a real-time correlation curve between bending deformation and bending angle, and realize intelligent early warning and automatic control of the processing process based on material performance thresholds. This significantly improves the consistency of forming quality, prevents over-bending or cracking defects in parts, and provides reliable data support for process optimization. It realizes the upgrade of bending and forming from experience-based processing to digital and intelligent control. Attached Figure Description
[0013] Figure 1 This is a schematic flowchart of a method for detecting the deformation of a part during bending forming, provided in one embodiment of this application. Figure 2 This is a schematic diagram of a part bending deformation detection process provided in another embodiment of this application; Figure 3 This is a schematic diagram of a feature marking method for the bending deformation process of a part provided in another embodiment of this application; Figure 4 This is a schematic diagram of a part bending deformation detection device provided in another embodiment of this application. Detailed Implementation
[0014] 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 a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0015] It should be noted that all directional indicators (such as up, down, left, right, front, back, etc.) in the embodiments of this application are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indicator will also change accordingly.
[0016] In this application, unless otherwise expressly specified and limited, the terms "connection," "fixed," etc., should be interpreted broadly. For example, "fixed" can mean a fixed connection, a detachable connection, or an integral part; it can mean a mechanical connection or an electrical connection; it can mean a direct connection or an indirect connection through an intermediate medium; it can mean the internal communication of two components or the interaction between two components, unless otherwise expressly limited. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0017] Furthermore, if the embodiments of this application involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the meaning of "and / or" throughout the text includes three parallel solutions; for example, "A and / or B" includes solution A, solution B, or a solution where both A and B are satisfied simultaneously. Furthermore, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. When the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed in this application.
[0018] Figure 1 This is a flowchart illustrating a method for detecting the deformation of a part during bending forming, as provided in an exemplary embodiment of this application. Figure 1 As shown, the method includes the following steps: S100: Acquire the bending deformation image of the part under test; S200: Preprocess the bending deformation image of the part to be tested; S300: Construct a model for detecting the bending deformation of parts and train the model; S400: Input the preprocessed bending deformation image of the part to be tested into the trained part bending deformation detection model, and output the bending deformation of the part to be tested.
[0019] This application acquires and preprocesses images of the bending deformation of the part under test, constructs and trains a dedicated model for detecting the bending deformation, and then inputs the preprocessed image to output the bending deformation of the part. This method integrates machine vision and spatial ranging technology, achieving high-precision, dynamic, real-time detection of deformation during the bending process. It effectively overcomes the limitations of traditional manual scribing measurement methods, such as inaccurate positioning, large errors, and inability to acquire data in real time. The system can automatically correlate the deformation with the bending angle, generate a dynamic change curve, and combine it with preset thresholds to achieve intelligent early warning and process control, thereby significantly improving the consistency and stability of forming quality and providing reliable data support for process optimization.
[0020] In another exemplary embodiment, step S200, the preprocessing of the bending deformation image of the part to be tested, includes the following steps: S201: Perform grayscale processing on the bending deformation image; In this step, this application uses a region-sensitive weighted grayscale method to process the bending deformation image into grayscale. This method does not apply a fixed RGB weight to the entire image, but dynamically adjusts the weight coefficients only for the inherent color features of the bending area of the part and the background, so that the grayscale contrast between the bending section outline and the straight pipe section is maximized in the initial stage.
[0021] S202: Denoise the bent and deformed image after grayscale processing; In this step, this application designs an adaptive hybrid filtering strategy that combines motion blur estimation. This strategy first analyzes the image sequence to estimate the motion blur kernel caused by equipment vibration, and then selectively strengthens the filtering in the direction of motion while maintaining edge sharpness in the vertical direction. This directional filtering can smooth noise while greatly preserving axial edge details crucial for calculating bending deformation, thus overcoming the shortcomings of traditional filtering methods in edge preservation capabilities in dynamic industrial scenarios.
[0022] S203: Enhance the contrast of the denoised curved image; In this step, this application employs a region-guided contrast-limited adaptive histogram equalization (CLAHE) algorithm. Based on the initially identified part regions, this algorithm divides the image into a "region of interest" (the part itself) and a "background region," performing the CLAHE operation only on the "region of interest," while forcibly compressing the grayscale distribution of the background region. This algorithm avoids equalizing background noise, thereby accurately allocating the limited grayscale dynamic range to the part contour, helping to enhance the grayscale gradient in the small intervals near the start and end points of the curve.
[0023] S204: Binarize the contrast-enhanced curved deformation image; In this step, this application proposes a local adaptive thresholding algorithm that integrates gradient magnitude. When calculating the local threshold for each pixel, this algorithm considers not only the average grayscale value of its neighborhood but also incorporates the gradient magnitude calculated in Canny edge detection as a weighting factor. In potential edge regions with high gradients, the binarization threshold is appropriately reduced to ensure the complete detection of weak edges; in flat regions, a higher threshold is used to suppress noise. This method, which links with edge information, achieves continuous and accurate segmentation of curved contours, especially ensuring the integrity of low-contrast transition regions.
[0024] S205: Perform morphological processing on the binarized bending deformation image; In this step, this application proposes an adaptive morphological processing method based on contour curvature analysis. This method first performs a preliminary analysis of the binarized contour to estimate the radius of curvature of the curved segment, and then dynamically generates an elliptical structural element with dimensions matching the curvature. When performing closing operations to fill contour holes, this adaptive structural element better fits the geometric characteristics of the curved segment, avoiding contour distortion or loss of detail caused by using structural elements that are too large or too small, thus ensuring the geometric accuracy of feature point localization.
[0025] S206: Perform edge detection on the morphologically processed curved deformation image.
[0026] In this step, this application introduces a dual-modal threshold self-learning mechanism based on the Canny algorithm. This mechanism utilizes multiple sets of calibration images acquired during the initialization phase to automatically learn and establish a statistical distribution model of the pixel gradient magnitudes of "strong edges" and "weak edges," thereby recommending the optimal high and low threshold pairs for each specific experiment, rather than relying on manual experience. This self-learning capability enables the system to adapt to different part materials, surface treatment processes, and lighting conditions, ensuring the stability and reliability of edge detection results across different production batches, and providing the ultimate guarantee for achieving high-precision dynamic measurement.
[0027] In another exemplary embodiment, in step S300, the part bending deformation detection model includes: The system comprises a feature marker selection module, an image-spatial distance mapping module, a dynamic process association module, and a risk warning threshold module. The feature marker selection module automatically identifies and locates the geometric transition points at both ends of the bending section of a part, marking them as reference feature points characterizing the part's deformation. The image-spatial distance mapping module establishes a conversion relationship between the pixel positions of feature points in the image and their actual three-dimensional spatial coordinates through calibration, in order to calculate the distance between feature points. The dynamic process association module is used to convert the real-time calculated bending deformation (… L ) and bending angle ( α Synchronize and associate them, and generate a description of their dynamic relationship.L-α The curve; the risk warning threshold module is used to monitor the deformation of the part in real time according to the preset deformation threshold of the part, and automatically trigger a warning when the deformation exceeds the threshold.
[0028] Specifically, the feature point selection module adopts a three-level progressive structure of visual perception, algorithm extraction, and logical verification. First, the image preprocessing unit denoises and enhances the original video stream, highlighting the contours of curved regions. The image preprocessing unit consists of a frame buffer management submodule, a parallel filtering submodule, and a contour enhancement submodule. The frame buffer management submodule is responsible for receiving and buffering the original video stream, providing stable data input. The parallel filtering submodule integrates separate filtering kernels for Gaussian noise and impulse noise, which are executed in parallel on a programmable logic device to achieve high-speed real-time noise reduction. The contour enhancement submodule uses an adaptive sharpening algorithm based on gradient magnitude direction, which strengthens the gradient response of the curved region edges through convolution operations, thereby outputting an intermediate image with prominent contours and a high signal-to-noise ratio, laying the foundation for subsequent accurate analysis.
[0029] Subsequently, the intelligent edge recognition and curvature analysis unit automatically scans and locates the point with the largest curvature abrupt change at the junction of the straight and curved sections. This unit comprises two components: an edge tracking engine and a curvature calculation and peak detector. The edge tracking engine employs an improved edge detection algorithm combined with connected component tracking technology to generate a continuous, single-pixel-wide part contour chain code. This improved edge detection algorithm uses an adaptive dual-threshold generation mechanism to dynamically determine the optimal threshold pair based on the image gradient distribution to cope with varying lighting environments. Furthermore, the algorithm introduces a multi-scale Gaussian pyramid strategy, fusing the coarse-scale continuous main contour with the fine edge details at the fine scale. This ensures edge integrity in low-contrast areas while suppressing noise. Further, edge direction consistency constraints are added to non-maximum suppression to effectively filter out false edges caused by texture or noise, improving edge geometric realism. Finally, tightly coupled with the contour tracking process, it intelligently repairs edge breaks using multi-scale information, directly outputting a high-quality, single-pixel-wide continuous contour chain code, providing a robust and accurate data foundation for subsequent geometric analysis. Subsequently, the curvature calculation and peak detector receives a continuous, single-pixel-wide contour chain code from the edge tracking engine output, and then processes it using a sliding window analysis technique. Specifically, the system defines a fixed-length analysis window for each pixel on the chain code (e.g., a window containing the current point and all pixels before and after it). k There are 2 points, with a total length of 2. k An odd-numbered window of +1 is created, and this window slides sequentially along the chain code. Within each window, a method based on differential geometry is applied (e.g., calculating the ratio of the change in the direction angle of the line connecting adjacent contour points within the window to its corresponding arc length, or using a specific...). kThe discrete curvature value at the center point of the window is accurately calculated using an approximate estimation based on the curvature formula. Next, to effectively suppress high-frequency fluctuations introduced by image noise or pixel-level discretization, the calculated original discrete curvature sequence is input into a smoothing filter (such as a Gaussian filter or a Savitzky-Golay filter) for processing. This outputs a smooth curvature change curve that robustly and accurately reflects the true geometric bending characteristics of the part's contour, laying a solid data foundation for subsequent accurate identification and location of curvature abrupt change peaks (i.e., feature marker points). By detecting abrupt changes where the curvature value increases dramatically, this unit can pinpoint the candidate location at the junction of the straight and curved sections where the curvature change is most drastic, and output this location as a candidate feature point representing the start and end of the bend.
[0030] Finally, the logic decision-maker verifies the identified candidate points according to preset geometric topology rules, ultimately determining and outputting unique "starting point" and "ending point" coordinates to ensure the uniqueness and accuracy of the benchmark feature points. Specifically, the logic decision-maker's working mechanism is as follows: First, preliminary screening based on geometric topology rules is performed: The system has a built-in structured geometric topology rule library, containing prior constraints such as "the starting point and ending point must be located on opposite sides of the curved segment," "the line connecting the two points should be approximately perpendicular to the local tangent direction of the contour at that point," and "the contour segment between the two points should have a continuous and monotonically changing curvature sign." The logic decision-maker first substitutes all candidate point pairs (i.e., possible combinations of starting and ending points) output by the curvature calculation and peak detector into these rules for verification one by one, automatically filtering out invalid point pairs that obviously violate geometric rationality, significantly narrowing the candidate range. Second, multi-frame spatiotemporal consistency depth verification is performed: For candidate point pairs that pass the preliminary screening, the system initiates a depth verification process. The decision-maker retrieves image sequences of the part during the current bending process for multiple consecutive frames (e.g., 5 to 10 frames) and their corresponding candidate point information. Subsequently, the spatial coordinates of each candidate point in time are tracked and analyzed, and its displacement fluctuation and trajectory smoothness between different frames are calculated. Simultaneously, the variation trend of the "start-end" line segment length formed by the candidate point pair across consecutive frames is verified to ensure it conforms to the physical expectations of bending deformation (e.g., it should change monotonically and the trend should be stable). This step aims to utilize temporal information to eliminate false positives caused by noise in a single frame or momentary occlusion, ensuring that the selected point pairs exhibit consistent and stable spatiotemporal evolution. Next, a comprehensive scoring and optimal decision are performed: the logical decision-maker establishes a comprehensive scoring model for each candidate point pair. This model weightedly integrates the following key indicators: geometric regularity compliance (e.g., verticality deviation, curvature continuity), spatiotemporal stability (e.g., positional variance, consistency of length variation), and curvature peak significance (the intensity of curvature abrupt changes at the candidate point). The system automatically calculates the comprehensive score of all candidate point pairs and, based on preset decision thresholds (e.g., the score must be higher than a certain lower limit) and optimization strategies (e.g., selecting the point pair with the highest score), ultimately determines a unique set of "starting point" and "ending point" coordinates that best conforms to geometric logic, is most stable, and is physically most reasonable. Finally, output and feedback are provided: once the optimal point pair is determined, the logic decision-maker immediately outputs its coordinates to downstream modules (e.g., the image-spatial distance mapping module) and records the confidence level of the decision for the system. Simultaneously, this decision result can serve as a feedback signal for dynamically fine-tuning the parameters of the preceding image processing or curvature calculation, forming an adaptive optimization closed loop, further improving the system's robustness and accuracy in long-term operation.
[0031] The image-spatial distance mapping module is used to achieve accurate conversion between image pixel coordinates and real 3D spatial coordinates. Its structure mainly consists of three parts: a dual-datastream calibration unit, a nonlinear mapping relationship model, and a real-time solver. During system initialization, the dual-datastream calibration unit simultaneously acquires high-precision 3D spatial point cloud data from a laser ranging device and corresponding 2D pixel data from an image acquisition device (such as an industrial camera), forming a series of "image pixel point - actual spatial point" calibration pairs. This calibration data is input into a nonlinear mapping relationship model constructed based on polynomial fitting or neural network training. The model learns the complex geometric transformations between the pixel coordinate system and the spatial coordinate system caused by factors such as lens distortion, viewing angle tilt, and depth of field changes. It establishes a high-precision and robust conversion function from pixel displacement to actual three-dimensional spatial distance. During real-time detection, the real-time solver directly calls the pre-trained mapping model and inputs the pixel coordinate difference (i.e., pixel displacement) of the feature points identified in the pre-processed image into the model. The corresponding actual physical distance can be calculated instantly, thereby realizing dynamic, non-contact, and accurate measurement of bending deformation. This provides a key spatial scale benchmark for subsequent deformation monitoring and early warning.
[0032] The dynamic process correlation module is responsible for the real-time synchronization and dynamic characterization of bending deformation and bending angle. Internally, it consists of a high-precision time synchronization unit and a curve fitting engine working together. The high-precision time synchronization unit first receives the real-time deformation from the image-spatial distance mapping module. L Signals and real-time bending angles from CNC equipment (such as pipe bending machines) α The signal is used to assign a consistent time stamp with microsecond-level precision to the two asynchronous data streams based on a unified system clock, thereby achieving strict alignment and synchronization of multi-source heterogeneous signals in the time domain; subsequently, the module uses this time-aligned ( L , α The data pairs are used to perform real-time dynamic correlation analysis using a curve fitting engine. This engine typically employs a sliding window strategy, performing polynomial fitting (such as quadratic or cubic fitting) or piecewise linear regression on data points within the most recent time period to dynamically generate and continuously update a curve that accurately describes the variation of deformation with bending angle. L-α The relationship curve not only visually presents the evolution trajectory of deformation throughout the bending process, but also allows for the analysis of material deformation rate by calculating its instantaneous slope (dL / dα). This enables a refined, digital, and dynamic depiction of the bending and forming process of parts, and provides key process characteristic data for subsequent process optimization and risk warning.
[0033] The risk warning threshold module adopts a closed-loop architecture based on threshold management and hierarchical response control, specifically comprising three core parts: a threshold configuration library, a high-speed comparator, and a hierarchical decision logic unit. The threshold configuration library presets and stores multi-level deformation thresholds, such as warning values, based on the part's material properties (e.g., aluminum alloy, stainless steel), specifications (e.g., diameter, wall thickness), and process requirements. L 1 (indicating the approach of the material's plastic deformation limit) and emergency shutdown value L 2 (Preventing parts from cracking or bending); During real-time monitoring, the high-speed comparator continuously receives real-time deformation data from the dynamic process correlation module. L It then instantly compares the real-time deformation with the corresponding threshold retrieved from the configuration library; once the real-time deformation is detected... L If a certain threshold is reached or exceeded, the hierarchical decision-making logic unit is immediately triggered, executing the corresponding control command according to the preset response strategy—if a warning value is reached. L If the emergency stop threshold is reached or exceeded, an audible and visual alarm will be sent to the operating interface, and the CNC equipment will be advised to reduce its speed. L 2. Then, an emergency stop command is sent directly to the CNC equipment through the digital I / O or industrial bus control signal interface to forcibly interrupt the machining process. This module seamlessly connects real-time monitoring, threshold judgment and equipment control to form a fast, closed-loop control link from data perception, intelligent decision-making to direct execution, thereby effectively realizing real-time intervention and active protection of risks in the bending and forming process, ensuring processing quality and equipment safety.
[0034] In another exemplary embodiment, step S300, training the bending deformation detection model for the part, includes the following steps: S301: Construct a dataset containing the bending deformation of the parts and their corresponding feature vectors; In this step, such as Figure 2 As shown, firstly, the test part is subjected to bending deformation operation on a CNC bending machine. During this process, the actual deformation of the test part at different bending deformation stages (corresponding to different bending angles and deformation amounts) is collected simultaneously. (i.e., the actual change in the straight-line distance between the starting point and the ending point), and simultaneously acquire the bending deformation image corresponding to each bending deformation stage.
[0035] Secondly, each acquired bending deformation image undergoes the preprocessing described above. Then, from each preprocessed bending deformation image, key features characterizing the bending deformation state of the part are extracted to form a feature vector. These key features include, for example, geometric features and morphological features, such as... Figure 3 As shown, the geometric features include the coordinates of the starting and ending points of the curved section of the part in the image pixel coordinate system. and and the length of the line connecting the starting point and the ending point. Morphological features include, for example, extracting the radius of curvature of curved segments and the orientation angle of the minimum bounding rectangle.
[0036] Finally, the extracted feature vector [ [Radius of curvature, orientation angle] and the corresponding actual deformation Pair them up to form a dataset, and then divide the dataset into a training set and a validation set in a ratio (e.g., 7:3).
[0037] S302: Train the part bending deformation detection model based on the training set; In this step, the "image sequence-spatial coordinates-actual deformation" data pairs, which have been precisely calibrated using laser ranging and other methods, are batch-input into the model. The model generates a predicted deformation based on the current parameters through forward propagation. Then, a preset loss function is used to compare the predicted value with the true labeled value to calculate the prediction error. This error is then used through a backpropagation algorithm to automatically adjust the weights and coefficients of the feature extraction network, spatial mapping model, and curve fitting engine within the model. After multiple iterations, the model gradually minimizes the prediction error, ultimately obtaining a high-precision and robust model that can accurately infer the actual deformation of the part from changes in image features.
[0038] S303: Validate the model based on the validation set.
[0039] In this step, the validation set data is input into the trained model, which then performs forward inference and outputs the predicted deformation sequence. L-α Relationship curves; subsequently, the model's predictions are compared with the labeled true values on the validation set, and key performance indicators (such as mean absolute error (MAE), coefficient of determination (R²) are calculated. 2 (etc.) Implement quantitative evaluation; the specific conditions for model validation are: MAE is lower than the preset tolerance (e.g., ≤1.0mm), indicating that the prediction accuracy meets engineering requirements; at the same time, R 2 A value greater than a set threshold (e.g., ≥0.98) reflects a high degree of consistency between the predicted curve and the actual data; furthermore, the generated... L–α The curve should be smooth and monotonous overall, and its trend should conform to the physical laws of material bending and the expected process. If the above conditions are met, the model is validated; otherwise, the training strategy needs to be adjusted (such as randomly changing the lighting or viewpoint of the images in the training set or adding noise to improve the model's generalization ability and robustness) or the model structure needs to be improved.
[0040] The above technical solutions will now be described by way of example with reference to specific embodiments.
[0041] This embodiment takes a 6XXX series aluminum alloy conduit with a diameter of φ50mm and a wall thickness of 1mm as the object and describes in detail the process of detecting its bending deformation.
[0042] Step 1: Set up a spatial ranging platform and perform system calibration; Based on the guide tube dimensions, a matching bending mold was selected and installed on the CNC bending equipment. Subsequently, a spatial ranging platform consisting of a high-speed camera, a laser rangefinder, and a data analysis module was integrated. The image acquisition and ranging equipment was positioned directly over the bending deformation area, and the spatial coordinates of the image acquisition equipment (267.23, 519.98, 1603.57) and the coordinates of the bending start point of the part (1546.59, 2611.95, 1615.61) were accurately recorded, completing the initial calibration of the relative spatial positions.
[0043] Step 2: Determine feature markers and establish the image-deformation mapping relationship; The starting and ending points of the bending segment were dynamically determined through a trial bending process. The initial spatial coordinates of the ending point (1546.59, 2595.95, 1615.61) were recorded, and the corresponding image pixel parameter changes (1950-3651) were collected when the bending deformation increased from 16 mm to 25 mm within 0-5 seconds. Based on this, a quantitative correlation between "image pixel displacement and actual bending deformation" was successfully established, serving as a benchmark model for real-time detection.
[0044] Step 3: Real-time correlation of bending deformation and bending angle; During the formal CNC bending process, the system calculates and outputs the deformation L in real time based on the established image-deformation mapping relationship. At the same time, the system synchronously acquires the measured value of the bending angle α fed back by the CNC equipment, accurately correlates the two in the time domain, dynamically generates and updates the L-α relationship curve, thereby completely depicting the entire bending and forming process.
[0045] Step 4: Set risk thresholds and implement early warning controls.
[0046] For this type of conduit, the upper limit of deformation L1, which causes surface "orange peel" defects, was set at 23 mm, and the upper limit of deformation L2, which causes cracking, was set at 31 mm. In actual processing, when the system detects a real-time deformation of 23 mm, the equipment automatically pauses and warns of the orange peel risk, allowing the operator to intervene and make decisions (such as reducing processing speed). When the deformation reaches 31 mm, the equipment immediately triggers an emergency stop and issues an alarm. Subsequent disassembly and inspection confirmed that the part was already close to cracking at these thresholds, verifying the accuracy and effectiveness of the early warning control.
[0047] In another exemplary embodiment, this application also provides a device for detecting the amount of bending deformation of a part, such as... Figure 4As shown, the device includes: an acquisition module 100 for acquiring a bending deformation image of the part to be tested; a preprocessing module 200 for preprocessing the bending deformation image of the part to be tested; a model building and training module 300 for building a bending deformation detection model of the part and training the model; and a detection module 400 for inputting the preprocessed bending deformation image of the part to be tested into the trained bending deformation detection model of the part and outputting the bending deformation of the part to be tested.
[0048] Optionally, the preprocessing module includes: a grayscale processing unit for performing grayscale processing on the curved deformation image; a denoising unit for performing denoising on the grayscale processed curved deformation image; a contrast enhancement unit for performing contrast enhancement on the denoised curved deformation image; a binarization processing unit for performing binarization processing on the contrast-enhanced curved deformation image; a morphological processing unit for performing morphological processing on the binarized curved deformation image; and an edge detection unit for performing edge detection on the morphologically processed curved deformation image.
[0049] In another exemplary embodiment, this application also provides a storage medium including instructions that, when executed on a computer, cause the computer to perform the part bending deformation detection method as described in any of the preceding embodiments.
[0050] In another exemplary embodiment, this application also provides an electronic device, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the part bending deformation detection method as described in any of the preceding embodiments.
[0051] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for detecting the deformation amount of a part during bending and forming, characterized in that, The method includes: Obtain the bending deformation image of the part to be tested; The bending deformation image of the part to be tested is preprocessed; Construct a model for detecting the bending deformation of parts and train the model. The preprocessed bending deformation image of the part to be tested is input into the trained bending deformation detection model, and the bending deformation of the part to be tested is output.
2. The method according to claim 1, characterized in that, The preprocessing of the bending deformation image of the part under test includes: The image of the bending deformation is converted to grayscale. Denoise the bent and deformed image after grayscale processing; Contrast enhancement is performed on the denoised curved and deformed image; Binarize the contrast-enhanced image of the bending deformation. Morphological processing is performed on the binarized bending deformation image; Edge detection is performed on morphologically processed curved and deformed images.
3. The method according to claim 1, characterized in that, The component bending deformation detection model includes: The module includes a feature marker selection module, an image-spatial distance mapping module, a dynamic process association module, and a risk warning threshold module. The feature marker selection module is used to automatically identify and locate the geometric transition points at both ends of the curved section of a part, and mark them as reference feature points characterizing the deformation of the part. The image-spatial distance mapping module is used to establish the conversion relationship between the pixel position of feature points in an image and their actual three-dimensional spatial coordinates through calibration, so as to calculate the distance between feature points; The dynamic process correlation module is used to correlate the bending deformation calculated in real time. L With bending angle α Perform synchronous association and generate a description of the dynamic relationship between the two. L-α curve; The risk warning threshold module is used to monitor the deformation of the part in real time according to the preset deformation threshold and automatically trigger a warning when the deformation exceeds the threshold.
4. The method according to claim 3, characterized in that, The training of the part bending deformation detection model includes: Construct a dataset containing the bending deformation of parts and their corresponding feature vectors, and divide it into a training set and a validation set according to the proportions. The model for detecting bending deformation of parts is trained based on the training set until the loss function converges. The model is validated based on the validation set. If the key performance indicators meet the preset conditions, the model is validated. Otherwise, the training strategy is adjusted or the model structure is improved.
5. A device for detecting the deformation amount of a part during bending and forming, characterized in that, The device includes: The acquisition module is used to acquire images of the bending deformation of the part under test; The preprocessing module is used to preprocess the bending deformation image of the part to be tested; The model building and training module is used to build a model for detecting the bending deformation of parts and to train the model. The detection module is used to input the pre-processed bending deformation image of the part to be tested into the trained bending deformation detection model and output the bending deformation of the part to be tested.
6. The apparatus according to claim 5, characterized in that, The preprocessing module includes: The grayscale processing unit is used to process the bent deformation image in grayscale. The denoising unit is used to denoise the curved and deformed image after grayscale processing; A contrast enhancement unit is used to enhance the contrast of the denoised curved and deformed image; The binarization processing unit is used to perform binarization processing on the contrast-enhanced curved deformation image; The morphological processing unit is used to perform morphological processing on the binarized curved deformation image; The edge detection unit is used to perform edge detection on morphologically processed curved and deformed images.
7. A storage medium, characterized in that, It includes instructions that, when executed on a computer, cause the computer to perform the method described in any one of claims 1 to 5.
8. An electronic device, characterized in that, The electronic device includes: Memory, processor, and computer programs stored in memory and executable on the processor, wherein, When the processor executes the program, it implements the method as described in any one of claims 1 to 5.