Burr removing method, device and equipment based on machine vision and storage medium

By using a machine vision-based burr removal method, we have achieved fine-grained monitoring and feedback adjustment of burr morphology, which solves the problems of incomplete burr removal and poor adaptability in existing technologies, and improves the accuracy and quality of burr removal.

CN121366104AInactive Publication Date: 2026-01-20DONGGUAN LIMINDA ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511444837.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-10
Publication Date
2026-01-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing burr removal methods lack online, refined monitoring and feedback adjustment of burr morphology and removal effect, resulting in incomplete removal or damage to the workpiece body, and failing to achieve high-precision, low-damage adaptive optimization.

Method used

A machine vision-based burr removal method is adopted, which combines image acquisition, edge detection, morphological segmentation, 3D point cloud registration, spatial coordinate mapping, tool path planning and dynamic optimization, with the sliding window mechanism and spatiotemporal convolutional network to predict defects in the machining residual map and achieve real-time parameter adjustment.

Benefits of technology

It achieves universality for workpiece shape, material and burr type, can identify residual or overcut areas online, improve surface quality and reduce rework rate, and achieve high-precision, low-damage burr removal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121366104A_ABST
    Figure CN121366104A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of model machining, and provides a burr removing method, device and equipment based on machine vision and a storage medium. Image acquisition and preprocessing are performed on the surface of a target workpiece to obtain a grayscale image, edge detection and morphological segmentation are performed on the grayscale image to obtain burr binary data, and three-dimensional point cloud registration and space coordinate mapping are performed according to the burr binary data to obtain a burr three-dimensional coordinate set. And according to the burr three-dimensional coordinate set, tool path planning and dynamic optimization processing are carried out to obtain machining track data, and according to the machining track data, the target mechanical arm is driven to carry out track cruise detection and feedback adjustment to obtain a burr removal execution instruction. According to the invention, dynamic adjustment of intelligent processing is realized through visual inspection, three-dimensional measurement, trajectory planning and execution feedback.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of model processing, in particular to a burr removing method, device and equipment based on machine vision and a storage medium. BACKGROUND

[0002] The existence of burrs not only affects the surface finish and assembly fit of parts, but also may cause stress concentration, fatigue cracks, and even safety hazards such as leakage and personnel cuts. Therefore, burr removal has become a necessary link to ensure product quality, prolong service life, and improve production safety.

[0003] The commonly used burr removal methods in the industry mainly include mechanical polishing, vibration polishing, chemical etching, thermal energy burr removal, electrolytic burr removal, and ultrasonic cleaning. Mechanical polishing and vibration polishing rely on abrasive wheels or abrasive media to cut or rub to remove burrs, but are mostly manual or semi-automatic operations. Chemical etching and electrolytic burr removal can process complex cavities by accelerating the dissolution of materials through chemical solutions. Thermal energy burr removal uses high temperature to ablate burrs. Ultrasonic cleaning uses cavitation effect to clean small particles.

[0004] The existing burr removal methods lack online, fine monitoring and feedback adjustment of burr morphology and removal effect. Once the workpiece geometry or burr distribution changes slightly, it is often difficult to adjust the process parameters in time, resulting in incomplete removal or damage to the workpiece body, and high-precision, low-damage self-adaptive optimization cannot be achieved. SUMMARY

[0005] Therefore, the present application provides a burr removal method, device, equipment and storage medium based on machine vision to solve the problems of insufficient burr removal precision and poor adaptability.

[0006] The first aspect of the present application provides a burr removal method based on machine vision, which comprises: image acquisition and preprocessing of the target workpiece surface to obtain a gray-scale image; edge detection and morphological segmentation processing of the gray-scale image to obtain burr binary data; three-dimensional point cloud registration and spatial coordinate mapping processing according to the burr binary data to obtain a burr three-dimensional coordinate set; tool path planning and dynamics optimization processing according to the burr three-dimensional coordinate set to obtain machining trajectory data; driving the target mechanical arm according to the machining trajectory data to perform trajectory cruise detection and feedback adjustment to obtain burr removal execution instructions.

[0007] In an optional embodiment, the image acquisition and preprocessing of the target workpiece surface to obtain a gray-scale image comprises: The target workpiece surface is image acquired and processed according to preset signal acquisition parameters to obtain the original RGB image. The original RGB image is subjected to luminance extraction processing to obtain an original grayscale image, and the original grayscale image is subjected to filtering processing to obtain a denoised grayscale image; Based on the preset camera intrinsic parameter matrix and distortion coefficients, the denoised grayscale image is subjected to radial and tangential distortion correction processing to obtain a grayscale image.

[0008] In an optional implementation, the edge detection and morphological segmentation processing of the grayscale image to obtain spiky binary data includes: The grayscale image is subjected to Canny edge detection processing to obtain a gradient magnitude image and gradient direction; The gradient magnitude image is subjected to non-maximum suppression processing according to the gradient direction to obtain a gradient map; The gradient map is subjected to threshold segmentation processing based on a preset set of high and low threshold coefficients and the global maximum value in the grayscale image to obtain a binary edge map. The binary edge map is morphologically segmented based on a preset rectangular structuring element to obtain the burr binary data.

[0009] In an optional implementation, the step of performing 3D point cloud registration and spatial coordinate mapping processing based on the burr binary data to obtain a burr 3D coordinate set includes: The deformation area of ​​the target workpiece surface is collected to obtain a deformation stripe image; The deformed stripe image is subjected to deformed stripe phase shift analysis according to a preset half-local matching algorithm to obtain a disparity map; The disparity map is subjected to pixel-by-pixel matching and filtering based on the spur binary data to obtain spur data. Based on the camera intrinsic parameter matrix and the preset baseline distance, the spur data is subjected to three-dimensional coordinate mapping processing to obtain the spur three-dimensional coordinate set.

[0010] In an optional implementation, the step of performing toolpath planning and dynamic optimization based on the burr three-dimensional coordinate set to obtain machining trajectory data includes: The three-dimensional coordinate set of the burrs is subjected to curve fitting to obtain a smooth and continuous trajectory; The smooth, continuous trajectory is subjected to joint rotation analysis based on preset DH parameters to obtain joint space commands; The joint space command is time-optimized according to the preset joint torque constraints to obtain the machining trajectory data.

[0011] In an optional implementation, the step of driving the target robotic arm to perform trajectory cruise detection and feedback adjustment based on the processing trajectory data to obtain the burr removal execution command includes: Error analysis is performed on the machining trajectory data based on the actual angles collected in real time to obtain real-time joint error data; The PID control signal is converted and processed based on the real-time joint error data to obtain the independent control quantity for each joint. The target robotic arm is driven according to the independent control quantity and the processing trajectory data, and the target robotic arm is driven and tracked for measurement to obtain actual position data and contact force. The processing position of the smooth continuous trajectory is adjusted based on the actual position data and the contact force to obtain optimized end-point desired position data; The PID control parameters of the machining trajectory data are adjusted based on the optimized end-point desired position data to obtain the burr removal execution command.

[0012] In an optional implementation, the method further includes: The burr removal execution command is subjected to pose data parsing and corresponding image acquisition area mapping to obtain a dynamic interest area. Based on the instantaneous speed of the tool detected during the processing and the preset safety distance, pose synchronous image acquisition is performed, and residual comparison is performed based on the preset template image to obtain a real-time residual map. The real-time residual image is subjected to pixel-by-pixel matching and filtering based on the dynamic interest region to obtain a denoised residual image. Defect correlation analysis is performed based on the denoised residual map and the burr removal execution instruction to obtain the predicted defect probability. The parameter set is adjusted in real time by using a preset sliding window to perform gradient descent optimization on the control parameters of the burr removal execution command based on the predicted defect probability and the preset optimization weight coefficient, so as to obtain the parameter set for real-time adjustment. The real-time adjustment parameter set is encapsulated according to the timestamp corresponding to the burr removal execution instruction to obtain the execution optimization instruction.

[0013] A second aspect of this application provides a machine vision-based burr removal device, the device comprising: The image acquisition module is used to acquire and preprocess images of the target workpiece surface to obtain grayscale images. The morphological analysis module is used to perform edge detection and morphological segmentation processing on the grayscale image to obtain burr binary data. The coordinate mapping module is used to perform three-dimensional point cloud registration and spatial coordinate mapping processing based on the burr binary data to obtain the burr three-dimensional coordinate set. The trajectory planning module is used to perform tool path planning and dynamic optimization based on the burr three-dimensional coordinate set to obtain machining trajectory data. The feedback adjustment module is used to drive the target robotic arm to perform trajectory cruise detection and feedback adjustment based on the processing trajectory data, so as to obtain the burr removal execution command.

[0014] A third aspect of this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the machine vision-based burr removal method as described above.

[0015] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the machine vision-based burr removal method described above.

[0016] In summary, this application includes at least the following beneficial technical effects: 1. It has strong versatility for workpiece shape, material and burr type. It can be quickly deployed to different production lines by simply adjusting the camera parameters and model weights.

[0017] 2. By combining a sliding window mechanism with a spatiotemporal convolutional network to predict defects in the processing residual map, it is possible to identify and classify residual or overcut regions online. Based on the prediction results, nonlinear weighted programming and gradient descent are used to dynamically adjust the processing parameters, further improving surface quality and reducing the rework rate. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.

[0019] Figure 1 This is a flowchart of a machine vision-based burr removal method provided in an embodiment of this application; Figure 2 This is a functional block diagram of a machine vision-based burr removal device provided in an embodiment of this application; Figure 3 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0020] 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.

[0021] like Figure 1 The diagram shows a flowchart of a machine vision-based burr removal method provided in an embodiment of this application. The machine vision-based burr removal method provided in this embodiment includes the following steps.

[0022] Step S1: Acquire and preprocess an image of the target workpiece surface to obtain a grayscale image.

[0023] To ensure that the acquired raw RGB image has a sufficient signal-to-noise ratio under high brightness conditions, the system in this embodiment employs preset signal acquisition parameters to precisely control the exposure time of the image acquisition device and synchronize it with the light source. These signal acquisition parameters include, but are not limited to, the trigger mode (i.e., external trigger / free-running) and the exposure time t. exp The parameters include sensor gain, white balance coefficient, frame rate, resolution, and trigger delay. Furthermore, the synchronization clock configured between the ring LED light source and the image acquisition device includes a pulse frequency f of the light source. pulse =1kHz and pulse width t pulse This ensures that the light source and the image acquisition device are triggered synchronously. The exposure time t of the image acquisition device... exp The pulse width of the light source is t pulse To ensure sufficient light intensity is collected throughout the entire pulse illumination period and to prevent pulse edge attenuation from affecting imaging, 90% of the light intensity is collected. Furthermore, the image acquisition device is set to a trigger delay of 5μs after the rising edge of the light source to filter out stray light at the moment of power-on.

[0024] During image acquisition, a frame rate of 30 frames per second and a resolution of 20 MP are selected based on the target workpiece's movement speed and processing cycle. A global shutter mode is activated to ensure simultaneous exposure of all pixels. The system sends a trigger signal to the light source controller via industrial Ethernet or a dedicated I / O interface to activate the LED pulse emission. Simultaneously, the image acquisition device receives the trigger signal from the system and, according to the exposure time t... exp The system performs exposure and then transmits the acquired raw RGB image to the system's buffer via a gigabit Ethernet interface. After receiving each frame of raw RGB image, the system calculates frame checksum and CRC32 checksum to ensure that the image data is complete and without frame loss, and stores the raw RGB images that pass the checksum into a circular buffer for subsequent preprocessing.

[0025] It should be understood that the verified original RGB image is represented in matrix form, and its original RGB image matrix I raw (x,y)=[R(x,y),G(x,y),B(x,y)]. Based on preset weighting coefficients for human eye responses to different colors, the original RGB image matrix I is then processed. raw A weighted summation of (x, y) is performed to extract the brightness of the original RGB image, thus obtaining the corresponding grayscale image. Further, the Sobel operator is used to apply the horizontal gradient Gx and vertical gradient Gy to the original grayscale image, and the corresponding gradient magnitudes of Gx and Gy are further calculated to obtain the gradient magnitude map |▽I. gray |。 Thus, by statistically analyzing the gradient magnitude map |▽I gray The median of all pixels in ||▽I gray |), to combine empirical coefficients to median(|▽I) of the gradient magnitude gray The standard deviation σ of the Gaussian filter kernel is converted from |). The empirical coefficient is an empirical constant selected based on extensive experiments and sample statistics, used to balance the effects of noise reduction and edge preservation. For special materials, extreme noise, or higher precision requirements, the empirical coefficient can be adjusted to the range [1.2, 2.0]. For example, in this embodiment, the standard deviation σ of the Gaussian filter kernel is 1.5 × median(|▽I gray |). By adaptively setting the filter standard deviation (i.e., the Gaussian filter kernel standard deviation σ) based on the image's own gradient information, noise is suppressed while preserving edges.

[0026] To achieve smooth noise reduction of the original grayscale image and provide a high signal-to-noise ratio input for subsequent edge detection and morphological processing, Gaussian filtering is required. First, based on the difference in noise reduction requirements for pixels at different distances (i.e., the closer the pixel, the greater its influence on the true value), a Gaussian weight matrix is ​​generated with a size of (2k+1)×(2k+1) (where k is three times the standard deviation σ of the Gaussian filter kernel to ensure the kernel covers more than 99% of the Gaussian energy). The weight at offset (i,j) in this matrix is ​​represented as w(i,j). By considering a two-dimensional Gaussian distribution (with the current pixel as the center, the weight decreases exponentially with increasing distance), w(i,j) is obtained using the standard two-dimensional Gaussian kernel calculation formula, resulting in a larger weight for (i,j) closer to the center and a smaller weight for those farther away. Next, this weight matrix is ​​used to perform a weighted average of the neighborhood of each pixel in the original grayscale image (i.e., weighted convolution of the original grayscale image in the spatial domain). This leverages the Gaussian distribution to reduce noise (which is typically random and sporadically distributed, and therefore suppressed due to low weights). Simultaneously, because weights decay with distance, details at image edges (boundaries between different regions, far from the center pixel but important in their own right) are effectively preserved. After this process, the original grayscale image undergoes Gaussian filtering denoising, resulting in the denoised grayscale image I. denoise It can provide a high signal-to-noise ratio input for subsequent edge detection and morphological processing.

[0027] Due to the optical characteristics of the lens in image acquisition equipment, the denoised image data still exhibits geometric distortions such as fisheye and pincushion (barrel) shapes. Therefore, for denoised grayscale images I... denoise Radial and tangential distortion correction is required. Before performing distortion correction, the system reads the preset camera intrinsic parameter matrix from the database. And the distortion coefficient D = [k1,k2,p1,p2,k3]. Wherein, , These are the focal lengths in the horizontal and vertical directions, respectively. The coordinates of the principal point (i.e., the optical center) are given. k1, k2, and k3 are radial distortion coefficients. p1 and p2 are tangential distortion coefficients. Each pixel coordinate in the denoised grayscale image is normalized based on the focal length and principal point coordinates, thus converting the pixel coordinates into normalized coordinate data in the camera coordinate system. Specifically, for each pixel coordinate in the denoised grayscale image, normalization is performed based on the focal length and principal point coordinates to obtain normalized coordinates in the camera coordinate system. Then, the squared radial distance r from this coordinate to the optical center is calculated. 2 Then, using the camera lens distortion correction formula, all coordinates (x, y) in the normalized coordinates are multiplied by the radial distortion coefficient and r. 2 ,r 4 ,r 6 The combined correction term (i.e., Similarly for y), the correction part for tangential distortion is superimposed (i.e., the x-coordinate is added to the x-coordinate). The y-coordinate is then added ), thus obtaining the normalized coordinates after distortion correction ( , This corrects the geometric distortion of the image caused by the optical characteristics of the lens, providing a distortion-free image basis for subsequent precise image processing (such as measurement and recognition).

[0028] Finally, the corrected normalized coordinates are calculated based on the focal length and principal point coordinates. , The image undergoes inverse normalization to map the corrected normalized coordinates back to pixel coordinates, generating pixel-level distortion-free image coordinates for reconstructing the corrected image. Then, bilinear or cubic interpolation is performed on the reconstructed corrected image according to the transformed pixel coordinates to generate a corrected grayscale image of the same size as the original image.

[0029] Step S2: Perform edge detection and morphological segmentation on the grayscale image to obtain spiking binary data.

[0030] In grayscale images, jagged edges appear as regions of abrupt changes in pixel brightness. By calculating the horizontal and vertical gradients separately, brightness changes in different directions within the image can be identified, allowing for preliminary location of potential edges. This embodiment employs Canny edge detection, using the Sobel operator to perform two first-order derivative convolutions on the image to obtain gradient information in the horizontal and vertical directions, thereby calculating the gradient magnitude and direction for each pixel. Specifically, the Sobel operator is first used to perform two first-order derivative convolution operations on the grayscale image obtained in step S1, targeting the horizontal gradient... Using the horizontal Sobel kernel matrix Perform a two-dimensional convolution with each pixel coordinate value in the grayscale image (i.e., multiply the corresponding pixel grayscale value by the kernel matrix element and then sum them) to obtain the horizontal gradient information; for the vertical gradient... Using the vertical Sobel kernel matrix A two-dimensional convolution is performed with the coordinates of each pixel in the grayscale image to obtain the vertical gradient information. Then, based on the two obtained gradients, the horizontal gradient is... and vertical gradient Calculate the gradient magnitude at each pixel (x, y) by squaring the values ​​separately, summing them, and then taking the square root. (Right now, The gradient magnitude reflects the intensity of the brightness change at that point. Simultaneously, the gradient direction is calculated using the arctangent function. (Right now, The gradient direction θ is used to represent the direction of the maximum change in brightness, which can be used as a basis for subsequent non-maximum suppression judgment. These operations are then applied sequentially to all pixels in the entire image to complete edge detection, resulting in a gradient magnitude image G and gradient direction θ of the same size. Canny edge detection accurately locates potential edge candidate points based on the rate of change of image pixel brightness.

[0031] In edge detection, a simple gradient magnitude map will exhibit a wideband response on both sides of the edge. This embodiment employs non-maximum suppression (NMS) to retain only the local maximum magnitude along the gradient direction, removing suboptimal responses on the sides to achieve edge refinement. Refining the edge width to the single-pixel level achieves accurate contours, which is beneficial for subsequent accurate segmentation and morphological processing. Specifically, for each pixel... First, read its gradient direction. The direction is quantized into four main categories (0°, 45°, 90°, 135°). Based on the direction category, two adjacent pixels (i.e., G pixels) in that direction are selected from the gradient magnitude map. neighbor1 and G neighbor2 The gradient magnitude of the current pixel is compared with that of its neighbors. By iterating through each pixel, the gradient magnitude of the current pixel is compared with that of its neighbors to determine if the current pixel represents the maximum value in the gradient direction. If the current pixel's gradient magnitude is greater than or equal to that of its neighbors, it is retained in the gradient magnitude image; otherwise, the current pixel is set to 0 to eliminate weak responses. Through this non-maximum suppression process, non-primary edge responses are removed from the gradient magnitude image, compressing the edge width to one pixel to achieve a clear edge skeleton and generating a refined gradient map. The gradient map retains non-zero values ​​only at precise edge skeleton locations, providing accurate input for thresholding.

[0032] Simultaneously, a global scan is performed on the grayscale image to obtain the global maximum amplitude G of the pixels in the grayscale image. max Therefore, based on the preset high threshold coefficient α and low threshold coefficient β, the global maximum amplitude G is... max Threshold synthesis is performed to obtain a high threshold T high =αG max and low threshold T low =βG max The high threshold coefficient α and the low threshold coefficient β correspond to empirical values, which are obtained through statistical analysis of a large number of experiments or sample data and can be adjusted according to the actual system noise level and edge strength. Finally, the high threshold T... high and low threshold T low Each pixel in the gradient map is compared one by one to perform thresholding on the gradient map. When (x,y)≥T in the gradient map... high When (x,y) ∈ (T), then (x,y) is retained as a strong edge; when (x,y) ∈ (T) in the gradient graph... low ,Thigh When (x,y) < (T) in the gradient graph, it is temporarily considered a weak edge and needs to be connected to a strong edge to be retained; when (x,y) < (T) in the gradient graph, it is considered a weak edge and needs to be connected to a strong edge to be retained. low ,T high When the edge is strong, it is suppressed to a non-edge. By traversing the gradient map, all strong edges are first marked, and then weak edges connected to the strong edges are searched and retained, thus generating the final binary edge map.

[0033] In a binary edge image, the edges of burr regions may have tiny breakpoints due to noise or local contour breaks. Morphological closing operations (i.e., dilation followed by erosion) can fill edge gaps, merge adjacent edge fragments, and generate continuous region contours. This ensures the final mask region is connected and complete, facilitating the extraction of complete burr point clouds during subsequent 3D mapping. Specifically, morphological closing operations are performed on the binary edge image based on a preset rectangular structuring element. In this embodiment, the rectangular structuring element is generally set to 3×3 pixels, which can balance detail preservation and breakpoint filling; for finer burrs, it can be adjusted to 5×5 or larger depending on the resolution. The binary edge image is subjected to a dilation followed by erosion operation. The dilation operation aligns all foreground pixels in the binary edge image with the center of the structuring element and outputs the union of foreground pixels to fill small gaps. The erosion operation processes the dilation result, removing redundant edge dilation portions and restoring the original width. Through morphological segmentation processing, the obtained binary image is the burr binary data, where regions with a value of 1 correspond to potential burrs, and 0 represents the background. Furthermore, connected component analysis can be performed on the spurious binary data to remove noise points with an area smaller than a set threshold (e.g., 10 pixels), resulting in clean and complete spurious binary data.

[0034] Step S3: Perform three-dimensional point cloud registration and spatial coordinate mapping processing based on the burr binary data to obtain the burr three-dimensional coordinate set.

[0035] Since the surfaces of large metal or plastic workpieces often lack natural texture, camera photography alone can only produce blank or uniform grayscale distributions, failing to distinguish pixels at different locations. Therefore, projecting a set of known patterns (i.e., Gray code fringes) onto the target workpiece surface using a projector can reveal traceable variations in brightness and darkness on a textureless, smooth surface, providing necessary features for subsequent correspondence search and 3D reconstruction. Specifically, based on a preset encoding bit depth N (i.e., Gray code pattern sequence), corresponding k=N level binary fringe patterns are generated. For the k-th level fringe pattern, the unique encoded value at pixel (x,y) is... By calculating the Gray code stripe encoding formula (i.e., This allows each pixel to obtain a unique code across multiple projection layers. Unique code value The result is 0 for black and 1 for white. Through this layered binary encoding, each pixel has a unique encoding combination in multiple projection layers, which facilitates the subsequent location of correspondence and decoding phase, so as to present traceable changes in brightness on a smooth surface without texture.

[0036] The system sequentially sends Gray code patterns from k=1 to N layers to the projector. Before each projection, the projector warms up for 50ms to ensure stable light intensity. The camera exposure is triggered 5ms after the Gray code pattern stabilizes, with the exposure time synchronized with the light source pulse to avoid motion artifacts. The binocular camera acquires N frames of stripe image sequences from the left and right viewpoints, and saves them separately. and The acquired left and right images contain information about the stripe deformation on the workpiece surface caused by height undulations. The stripe images of each layer from the left and right cameras are combined using the gray-scale difference method or phase encoding and decoding (such as the multi-frequency heterodyne method) to form a pulse phase map, which facilitates subsequent stereo matching calculations.

[0037] Furthermore, using preset camera intrinsic and extrinsic parameter matrices, epipolar geometric correction is performed on the left and right image sequences to ensure that corresponding pixels are searched and matched on the same scan line. Simultaneously, to reduce noise and computational load, the left image is a grayscale image. For reference, traverse the parallax range d min to d max The pixel matching cost is calculated using a semi-local matching algorithm. Specifically, for the current pixel position p=(x,y) in the reference image and the disparity value d to be evaluated, a matching cost is constructed. In this embodiment, the cost consists of two parts: the first part is the cost of the matching window R centered on p. p Calculate the pixels in the left image for all pixels q within the image. Pixels at the corresponding positions in the right image (i.e., considering parallax d) The sum of absolute grayscale differences measures the matching similarity. The second part is the sum of the absolute grayscale differences of the window R. p The neighborhood set N of all pixels q p Calculate the current disparity d and the current optimal disparity estimate d for pixel q. q The sum of the absolute values ​​of the differences, multiplied by the smoothing term weight λ, penalizes discontinuities in disparity. This calculation combines the local matching cost with the global smoothing constraint, ultimately yielding a pixel matching cost that helps search for corresponding pixels in the left and right image sequences, providing a foundation for subsequent accurate matching and 3D reconstruction. By combining the local matching cost with the global smoothing term and accumulating costs in multiple directions, the optimal disparity distribution is obtained.

[0038] Then, the matching cost is accumulated along eight predefined path directions, approximately minimizing the global cost. For each pixel p, the disparity value with the minimum cost is selected to form an initial disparity map. Finally, to improve measurement accuracy, a cubic parabolic fit is performed on the adjacent costs at the optimal integer disparity point to calculate the sub-pixel-level optimal disparity.

[0039] After obtaining the disparity map through the above steps, the spur binary data is aligned with the disparity map. Then, the disparity map is filtered pixel-by-pixel based on the spur binary data, retaining only the depth information corresponding to the spur regions in the spur binary data and removing redundant data from non-spur regions. Finally, the disparity values ​​of all filtered spur regions are processed pixel by pixel. The corresponding disparity value d is recorded as the initial point cloud set. Finally, connected component clustering is performed on the initial point cloud set to remove isolated point cloud clusters smaller than a set area threshold (e.g., 5 pixels in area) to ensure that the remaining point cloud all come from actual spurs, thereby obtaining spur data.

[0040] Finally, based on the camera intrinsic parameter matrix K and the baseline distance B, a 3D coordinate mapping is performed on the spur data. Here, the baseline distance B is the magnitude of the left and right camera translation vectors T obtained from the stereo calibration. Furthermore, information extraction is required from the camera intrinsic parameter matrix K to obtain the equivalent focal length f and the principal point coordinates (…). In this embodiment, the stereo vision 3D reconstruction formula shown below is used to achieve 3D coordinate mapping processing.

[0041] Where (x,y) are the image pixel coordinates. d(x,y) is the disparity value of the corresponding pixel. z(x,y) is the recovered scene depth (i.e., the straight-line distance from the camera's optical center). X,Y are the horizontal and vertical three-dimensional coordinates in the camera coordinate system. Based on the principles of stereo vision, two-dimensional pixels and disparities are mapped to real three-dimensional spatial coordinates.

[0042] The above-described 3D coordinate mapping process is used to calculate the corresponding 3D spatial coordinates (X, Y, Z) for each point cloud data (x, y, d). All points are then merged to obtain the complete 3D coordinate set P of the burr. debris ={(X i ,Y i Z i )} M i=1 , where M is the number of effective burrs.

[0043] Step S4: Perform tool path planning and dynamic optimization based on the burr three-dimensional coordinate set to obtain machining trajectory data.

[0044] From the 3D coordinate set P of the burr debris ={(Xi ,Y i Z i )} M i=1 The set of control points {P0, ..., P} is selected based on spatial distribution characteristics. n Specifically, curvature-weighted sampling is used. The density of control points is increased in regions with high curvature (i.e., where the geometry of the burr changes drastically), while the density is decreased in smooth regions with low curvature. This ensures that the fitted curve closely follows the shape of the burr while avoiding excessive redundant points. The i-th control point... For example, in the 3D coordinate set P of the burr debris Search engine The largest point p is used as .in, Let be the curvature at point p, reflecting the degree of local curvature of the spatial point cloud. To connect with the previous control point The Euclidean distance between them is used to automatically select the set of control points that best reflect the geometric characteristics of the burr, providing a framework for subsequent curve fitting.

[0045] Simultaneously, based on the selected curve order p, construct a uniform or non-uniform node vector {t0,……,t}. n+p+1}. Calculate the B-spline basis functions according to the Cox-deBoor recursive formula. Then, using these basis functions and control points Constructing the fitted trajectory function That is, for parameter t, each control point Multiply by the corresponding p-th order B-spline basis function The result of summation is... It can output the three-dimensional trajectory points corresponding to parameter t, and finally obtain a smooth curve with no overlap, continuous curvature and no warping at the control point, which can be adapted as the tool motion trajectory.

[0046] Furthermore, the curvature distribution of the fitted curve is calculated. To evaluate smoothness, if the curvature is too high in a certain segment, the node vector density can be appropriately increased or the curve order p can be increased to achieve fine tracking of burr edges. The trajectory parameter t is then uniformly or non-uniformly distributed according to the distance between control points to parameterize the velocity or acceleration requirements. A time parameter mapping function t(s) is generated, where s represents the progress percentage or actual processing time, ensuring strict alignment between subsequent motion planning and timing. Finally, a smooth, continuous trajectory Q(t) is obtained.

[0047] Meanwhile, the Denavit-Hartenberg parameters were calibrated on the UR5 robotic arm or the corresponding six-degree-of-freedom robotic arm (i.e., the deburring execution device), and the parameter table shown below was obtained.

[0048] Therefore, based on the DH parameters in the above parameter table, the motion transformation matrix for each section is defined as follows: in, Let α be the angle of the j-th joint (unknown). j-1 ,a j-1 ,d j These are known quantities in the DH parameters. The elements of the motion transformation matrix are given according to the standard DH transformation law and are used to describe the pose relationship between adjacent coordinate systems. The motion transformation matrix can be used to represent the rotational and translational motions of each joint as homogeneous transformation matrices, facilitating matrix multiplication operations of the entire kinematic chain.

[0049] Then, based on the above motion transformation matrix Construct the forward kinematics calculation formula as shown below: in, End position From smooth continuous trajectory Extract from. The attitude matrix is ​​determined by preset desired attitude weight coefficients. Calculated. Based on the target end-effector pose { }= Perform the inverse operation on the above forward kinematics calculation formula to obtain the joint angles { }

[0050] Furthermore, for each discrete time point t k From smooth continuous trajectory Extract trajectory point Q(t) k ) and corresponding attitude, so as to extract trajectory points Q(t) through the inverse kinematics module. k The inverse operation of the above forward kinematics calculation formula is performed on the corresponding posture to obtain the joint angle array {θ1(t)}. k ),……,θ6(t k The joint angle array is used as the input for real-time motion control (i.e., joint space commands).

[0051] After completing the fitting of the smooth continuous trajectory and solving the inverse kinematics, the joint space command q(t) = [θ1(t), ..., θ6(t)] for the time-varying joint angles under ideal conditions has been obtained. THowever, joint-space commands do not take into account the maximum output torque limits of each joint of the robotic arm, the physical constraints of acceleration / deceleration, and the requirements of machining efficiency. If the joint-space command q(t) is directly used to drive at a constant speed in the shortest time, the drive motors of each joint may fail to complete the specified acceleration due to insufficient torque, or the system may trigger protection actions due to overload. Therefore, it is necessary to perform time parameterization and reprogramming on the joint-space command q(t) with the goal of minimizing the total machining time, while ensuring that the maximum output torque of each joint is not exceeded, in order to obtain a set of discrete machining trajectory data. It can ensure that the robotic arm is safe and does not overload, while also efficiently and quickly completing the deburring action.

[0052] Specifically, we first construct the Eulerian-Lagrange form of the dynamic equations describing the motion of the robotic arm. .in, This is a joint angle vector, containing the angles of each joint at time [time]. The location. This represents the joint velocity and acceleration vectors. The mass inertia matrix is ​​a function derived from the mass distribution of the connecting rod. The terms represent the Coriolis force and centrifugal force, reflecting the inertial coupling caused by velocity. This is a gravitational torque term, which depends on the joint position and the weight distribution of the connecting rod. This represents the motor output torque vector, which is the control input. This dynamic equation describes the robotic arm under a given driving torque. The actual acceleration response under these conditions is the basis for torque constraints and motion planning.

[0053] Each joint motor has a rated maximum output torque. Exceeding this torque will trigger overload protection or cause the motor to lose synchronization. To ensure system safety, the driving torque of each joint j must be limited, i.e. Incorporating motor capabilities into motion planning prevents exceeding hardware limits during rapid acceleration or sudden load changes. Furthermore, machining efficiency is often inversely proportional to machining time; reducing the total tool travel time on the workpiece increases productivity. Therefore, the final completion point... To achieve the goal Time optimization constraints. Among them... To optimize the metric, namely the total processing time, the time optimization constraint can directly use time itself as the objective function to be minimized.

[0054] While minimizing time, it is necessary to satisfy any All satisfy Furthermore, the torque at each node must satisfy... The limitations. And to ensure the robotic arm starts from a stationary state and returns to a stationary state, it is necessary to consider... The joint angle vector boundary conditions. Similarly, if there are constraints on joint angles (or velocities), the joint angle vector can be referenced for each... and Based on the upper and lower boundary conditions of the robotic arm joint angles.

[0055] Since the optimization problem is infinite-dimensional, it must be discretized into a finite-dimensional parametric optimization problem before it can be solved using numerical tools. This application's embodiment uses the direct collocation method to perform the discretization operation, as detailed below: Set the time interval [0, Discretize into K segments to define time nodes. Furthermore, the time nodes can be evenly distributed, or the density can be increased in certain segments based on the complexity of the trajectory. At each time node... The above treats variables such as joint angle, velocity, acceleration, and torque as optimization variables. To optimize the set of variables Therefore, by employing polynomial interpolation or finite difference, the above continuous dynamic equations can be rewritten as discrete equations. Discretized torque constraints are added to each node k. and the initial and final state constraints of the robotic arm After discretization, the objective function is to minimize... It can be directly included in the optimization variables. .

[0056] The system employs mature NLP solvers such as IPOPT, SNOPT, and KNITRO, capable of handling large-scale constraints, sparse Jacobian matrices, and gradient information. The constructed optimization variables, objective function, and a series of equality / inequality constraints are input into the solver via an API. To accelerate convergence, this application example generates initial guesses using a time-scaled linear scaling method. Specifically, initial guesses are generated for the k-th optimization variable. Starting from the angle of the initial joint, according to (Where K is a parameter related to the total number of steps) Linear interpolation generates initial guesses for joint velocities. Initial guess of joint acceleration Initial guess of termination time Then, based on the joint displacement (i.e., ) and the maximum safe joint speed of the robotic arm ,according to The result is obtained. Subsequently, an MLP solver is used to iteratively process the input optimization problem. In each iteration, the objective function, constraint functions, and their gradients are evaluated, and the variables { are adjusted}. , , , The process continues until the convergence criterion is met (e.g., the gradient norm is below a threshold). After solving, the optimal solution is obtained, which includes the joint position, velocity, torque at each node, and the optimized termination time. The results are then packaged into processing trajectory data C in chronological order. traj ={ , } K k=0 (timestamp) With precision down to milliseconds or higher, data is sent in real time via the control bus to drive the servo driver for precise tracking and execution.

[0057] Step S5: Drive the target robotic arm to perform trajectory cruise detection and feedback adjustment based on the processing trajectory data to obtain the burr removal execution command.

[0058] Read the desired joint angle vector at the current time t from the processing trajectory data. Simultaneously, the actual joint angle vector of the current target robotic arm is acquired through a joint encoder or absolute rotation sensor. Furthermore, the sampling frequency of both is kept consistent with the trajectory execution frequency (e.g., 1kHz) to ensure data synchronization. Then, by calculating the joint angle error vector e(t) between the desired joint angle vector and the current actual joint angle vector, the deviation of each joint relative to the desired position is accurately quantified. The obtained joint angle error vectors e(t) are then arranged in chronological order to form real-time joint error data E={e(t)}. k )} K k=0 This is to provide timing data for subsequent control algorithms.

[0059] It should be understood that the robotic arm is driven and controlled by a PID controller. Therefore, the aforementioned real-time joint error data needs to be converted into PID control signals to adjust the joint motor control signals. The PID control signal consists of a proportional (P), an integral (I), and a derivative (D) element, used for rapid error response, eliminating steady-state error, and suppressing overshoot, respectively. Specifically, for the... Joints, based on their time error Using proportional links Fast response error, integral stage Eliminating steady-state deviation, differential element Predict the trend of error change, and add the three factors together to obtain the control quantity. (For example, drive signals, such as voltage or current). This allows the controller to output an adaptive signal to drive the joint motor, achieving closed-loop precise adjustment of the joint position.

[0060] In the controller, continuous integrals and derivatives are difficult to calculate directly and require discretization. For the integral term, an accumulator is used, according to... Iterative computation (where, It is the integral value of the j-th joint at the k-th step. It is the integral value from the previous step. It is the error of the current step. (This refers to the sampling period). The integral is updated by accumulating the product of the current error and the sampling period; for the differential term, a first-order difference approximation is used, according to... Calculate (where, (This is the differential value of the j-th joint at the k-th step). By dividing the error difference between two adjacent steps by the sampling period, we obtain an approximate differential. This allows us to realize the integral and derivative functions of PID control in a discrete system, preparing for subsequent discrete PID control.

[0061] For each control quantity The current is converted into motor current by the servo driver, then output to the corresponding joint via the reducer, driving the joint movement. Simultaneously, the joint encoder on the robotic arm provides real-time feedback of the current actual joint angle vector of joint j to the system. This is used for error calculation in the next cycle. Simultaneously, a six-dimensional force sensor at the end effector of the robotic arm measures the contact force vector. The force sensor transmits the acquired data and encoder data synchronously to the system via an EtherCAT bus. Through real-time drive tracking and measurement operations, a real-time position data stream is generated. } and contact force data stream { }, used for subsequent force feedback calculations.

[0062] It should be understood that, in order to achieve compliant machining when the robotic arm's end effector interacts with the environment, constructing an impedance model to simulate the mass-damped-spring system requires associating the desired end effector position deviation, motion state, and contact force. Specifically, a desired position deviation vector is defined. (in, It is the desired location. (This refers to the actual location), introducing a virtual mass matrix. Reflecting system inertia, damping matrix Suppressing oscillations, stiffness matrix Determine the linear force-displacement relationship. (Through...) Let the acceleration of the deviation ,speed After the effects of mass, damping, and stiffness, the contact force measured at the end is... The balance is achieved by dynamically adjusting the desired position deviation based on the contact force, realizing force-position interactive control, avoiding excessive processing force or workpiece damage, providing a model basis for subsequent calculation of position deviation compensation and updating of the desired end position, and supporting the compliant processing process.

[0063] The position deviation compensation amount is obtained by solving the impedance equation of the above impedance model. To compensate for positional deviation. Update the expected position at the end .in, From smooth continuous trajectory Provided. This will optimize the desired end position. Form an optimized data stream at the desired end position.

[0064] Furthermore, the desired position of the end Transforming inverse kinematics into joint expectations This information is then updated to the PID controller input, enabling closed-loop control of the position. Furthermore, through forward kinematics or an additional end-effector vision calibration system, the latest actual joint angle vector is obtained. Convert to actual end pose If equipped with vision or laser tracking devices, and simultaneously acquiring the actual end-effector coordinates, errors in the forward kinematics model can be further corrected. Finally, the actual end-effector pose at each moment can be determined. Output in time sequence to form glitch removal execution instructions.

[0065] To achieve adaptive control and adjustment during instruction execution, in one optional implementation, this application embodiment further includes: Execute instructions to obtain burr removal The data is analyzed to obtain the spatial position and orientation of the machining head in the workpiece coordinate system at the current moment, given by each data point. Based on the current orientation... ( , , ) Offset of the safe projection landing point Determine the center of the tool window at each moment in the image plane. .in For camera projection function, This is the camera's intrinsic parameter. Therefore, it is based on the center of the tool viewport. Calculate the coordinates of any pixel in the acquired image and the center of the tool window. The Euclidean distance is used. When this Euclidean distance is less than or equal to the safe projection point offset, the pixel moment is included in the quality inspection range; otherwise, the pixel moment is not within the quality inspection range, and the image acquisition device needs to be adjusted. By cropping the center of a large image into a "region of interest" that only contains the current tool processing area, the subsequent computation is reduced and irrelevant background interference is eliminated. For all moments... Generate a corresponding binary mask to form a dynamic region of interest.

[0066] Furthermore, based on the instantaneous tool velocity detected at two adjacent pose points, and combined with the preset safety distance D, safe Calculate cache trigger latency Thus at every moment + Send a trigger command to the high frame rate camera to acquire the grayscale image of the current workpiece surface. And through a preset template image. (i.e., a burr-free image taken before processing begins) and a grayscale image of the workpiece surface acquired. Perform residual comparison. Then, perform the following difference calculation between the acquired processed image and the template image: The time is obtained by subtraction. residual plot This is used to extract the brightness difference between the processed surface and the reference template, highlighting residual burrs or overcut areas. A real-time residual map sequence is then generated based on the time sequence. This provides the basic raw data for the next step of weighted screening.

[0067] The obtained dynamic interest region and real-time residual map sequence are then aligned at the pixel level. Each pixel in the real-time residual map is then weighted and filtered using the following formula: in, This is the residual value after being weighted by the mask. This represents the original residual value. The mask represents the region of interest. "×" indicates pixel-wise multiplication, suppressing residuals where the mask equals 0. The real-time residual map is weighted and filtered using the dynamically selected region of interest to retain only residual information within the tool machining area, effectively removing background and non-machined area noise.

[0068] By traversing all pixels in the real-time residual image and performing the weighted filtering process described above, a denoised residual image sequence is obtained. Meanwhile, in order to meet the input requirements of the spatiotemporal convolutional network model, each denoised residual image is subjected to small-range smoothing (e.g., 3×3 median filtering) for denoising.

[0069] It should be understood that the spatiotemporal convolutional network model includes a method for receiving denoised residual maps. and the corresponding pose vector sequence The input layer consists of a spatial convolutional layer for extracting spatial features from the residual map using multi-level two-dimensional convolution, a temporal convolutional or recurrent layer for temporal modeling of spatial features from consecutive frames, and an output defect probability. one-hot vector of defect type The fully connected layer. The spatiotemporal convolutional network model processes the denoised residual map of the input according to a preset window length W (e.g., 5 frames). and the pose vector in the glitch removal execution instruction A splicing operation is performed along the signal channel dimension. Based on the pre-trained network weight set W, high-confidence predictions of residual glitch or overcutting defects are made on the fused spatiotemporal and pose information to obtain the results for each time step. Corresponding defect sequence .in, For the predicted time The corresponding defect probability, For a moment The corresponding defect type code.

[0070] During burr removal, different process parameters (such as laser power, feed rate, and tool tilt angle) have mutual influences on processing quality and machining trajectory tracking accuracy: excessive power or speed accelerates processing but easily leads to overcutting defects, while insufficient power or speed leaves burrs behind; the tool tilt angle affects the laser incident angle, material removal efficiency, and introduces deviations in attitude tracking. Therefore, this application's embodiments construct a nonlinear weighted objective function that combines pose tracking deviation and defect prediction probability, comprehensively evaluating them according to preset weights, thereby providing a quantitative basis for subsequent dynamic optimization of process parameters.

[0071] It should be understood that the preset parameter vector to be optimized is a=[P,v,Φ]. T Where P represents laser power, v represents tool feed rate, and Φ represents tool tilt angle (i.e., the angle with the vertical direction). The actual end-effector pose vector obtained from actual measurements... and smooth continuous trajectory The corresponding expected end pose vector Euclidean norm calculation is performed to obtain the pose tracking error term. Simultaneously, the probability of a defect at that location is predicted by the spatiotemporal convolutional network model based on preset optimized weight coefficients λ∈(0,1). Weighted calculations are performed to obtain a defect probability term that balances pose accuracy and machining quality. Based on the pose tracking error term and the defect probability term, a parameter optimization objective function J(a;) is constructed, which is associated with the parameter vector to be optimized. The objective function for parameter optimization is J(a; This can be expressed by the following formula: Optimize the objective function J(a) through parameters; This method quantifies two key indicators of the machining process (i.e., pose tracking error and defect probability) into a single scalar, assigning optimization objectives to the associated process parameters to facilitate gradient calculation and iterative updates. Specifically, the laser power P has a non-linear relationship with the amount of material removed; the tool feed rate v and laser energy density jointly determine the removal depth; and the tool tilt angle Φ changes the incident angle, affecting power coupling efficiency. Therefore, the defect probability... There is a nonlinear mapping relationship between the parameter vector a to be optimized and the position tracking error term, which is related to the tool tilt angle Φ. That is, when the tilt angle deviates significantly from the predetermined posture, the end position calculated by the forward kinematics will deviate from the actual position. Furthermore, it is necessary to set upper and lower bound constraints for each parameter in the parameter vector a to be optimized (e.g., laser power P∈[50W,200W]).

[0072] In real-time control systems, single-frame optimization is often affected by noise, measurement errors, or periodic disturbances, while overall optimization faces problems of high computational cost and high latency. This application's embodiment employs a pre-defined sliding window mechanism combined with gradient descent to solve the parameter optimization objective function to obtain a real-time adjustment parameter set. Specifically, firstly, a window size w frames (e.g., 10 frames corresponding to 10ms) is selected according to the sliding window size, forming a time index set. As the sliding window advances one frame, the corresponding... A sliding window update is used, retaining the latest batch of data. This sliding window balances short-term dynamics with avoiding getting bogged down in single-frame noise, ensuring parameter adjustments are based on continuous historical information. Next, the objective function for parameter optimization at all times within the sliding window is accumulated to provide a comprehensive metric for each gradient descent update. Then, the accumulated objective function is used to solve for the parameter gradient using the partial derivative vector of the parameter vector to be optimized, a, to determine the direction of parameter adjustment, thus reducing the accumulated objective function in the next iteration. Therefore, based on a preset learning rate η > 0, the current parameter a... (n) Based on this, iterative updates are performed using the following formula: in, This represents the parameter value for the nth iteration. Let be the gradient of the parameters. "-" indicates moving along the negative direction of the gradient, thus reducing the objective function value. The above iterative update formula is used to achieve iterative parameter optimization based on multi-time-step feedback within a window.

[0073] During the iterative update process, the iteration terminates when any of the following conditions are met: 1. (i.e., the gradient norm is sufficiently small); 2. The maximum number of iterations Nmax is reached. The final initial real-time adjustment parameter set is obtained. = .

[0074] Furthermore, the initial real-time adjustment parameter set needs to be adjusted according to the preset smoothing coefficient Γ∈[0,1). Exponential smoothing is performed. Specifically, based on the smoothing coefficient Γ, the initial real-time adjustment parameter set obtained in the previous iteration is adjusted... and the initial real-time adjustment parameter set obtained this time Perform a weighted summation to obtain the smoothed real-time adjustment parameter set. And the smoothed real-time adjustment parameter set parameter set As a moment Real-time adjustment parameter set .

[0075] The obtained real-time adjustment parameter set Reliable and efficient communication with the execution units of the machining system (i.e., lasers, servo drives, etc.) is essential; therefore, real-time adjustment parameter sets are required. The data is packaged into data frames conforming to industrial communication protocols, with timestamps, verification codes, and control information added to ensure that each instruction is delivered to the actuator on time and accurately, and can be monitored and traced in real time. It should be understood that each process parameter instruction frame contains the following fields: Frame header: identifies the frame type, version number, and target device address; Timestamp: Current moment The units are measured in milliseconds or microseconds; Parameter vector: P( ),v( ),Φ( (i.e., real-time adjustment of parameter set) ); Parameter verification: CRC16 or CRC32 checksum can be selected to ensure data integrity; End of frame: Frame end identifier.

[0076] Specifically, in the real-time control calculation module, the timestamp is... With real-time adjustment parameter set The data is then concatenated. A checksum is calculated on the concatenated instruction sub-data according to the selected verification algorithm to obtain the CRC checksum. For instruction sub-data that passes the checksum, the instruction sub-data is concatenated with the CRC checksum and a preset frame footer to obtain the process parameter instruction Frame=[Header|| || ||CRC||Footer].

[0077] After receiving the process parameter instruction frame, the system uses the EtherCAT bus or Profinet protocol to send the frame to the execution unit (e.g., robotic arm and industrial camera). Each execution unit, upon receiving the frame, first verifies the CRC checksum, then parses the timestamp and parameters. Upon successful execution, a confirmation frame is sent back; the control module in the system checks and confirms this, and records it in the log. If no confirmation is received within a timeout period, the frame is resent or an alarm is triggered. The system writes the instruction content, confirmation status, execution results, and defect prediction information into the database in a time sequence to support subsequent quality traceability, process optimization analysis, and batch comparison.

[0078] Furthermore, if it is necessary to send instructions to multiple devices simultaneously, the system can add a device ID field to the process parameter instruction frame.

[0079] This application is applied to the field of model machining technology. It involves acquiring and preprocessing images of the target workpiece surface to obtain grayscale images, performing edge detection and morphological segmentation on the grayscale images to obtain binary burr data, registering 3D point clouds and mapping spatial coordinates based on the binary burr data to obtain a 3D burr coordinate set, performing toolpath planning and dynamic optimization based on the burr coordinate set to obtain machining trajectory data, and driving the target robotic arm to perform trajectory cruise detection and feedback adjustment based on the machining trajectory data to obtain burr removal execution commands. This application improves the effect and efficiency of burr removal through precise detection, accurate positioning, trajectory optimization, force control closed-loop optimization, and online quality feedback optimization, and also provides reliable technical support for flexible intelligent machining.

[0080] like Figure 2 The diagram shown is a functional block diagram of a machine vision-based burr removal device provided in an embodiment of this application.

[0081] In some embodiments, the machine vision-based burr removal device 2 may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the machine vision-based burr removal device 2 may be stored in the server's memory and executed by at least one processor to perform (see details). Figure 1 (Description) Functionality of a machine vision-based burr removal method.

[0082] In this embodiment, the machine vision-based burr removal device 2 can be divided into multiple functional modules according to its functions. These functional modules may include: an image acquisition module 21, a morphological analysis module 22, a coordinate mapping module 23, a trajectory planning module 24, a feedback adjustment module 25, and an execution optimization module 26. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, stored in memory. In this embodiment, the functions of each module will be detailed in subsequent embodiments.

[0083] Image acquisition module 21 is used to acquire and preprocess images of the target workpiece surface to obtain grayscale images.

[0084] In an optional implementation, the image acquisition module 21 is specifically used for: The target workpiece surface is image acquired and processed according to preset signal acquisition parameters to obtain the original RGB image. The original RGB image is subjected to luminance extraction processing to obtain an original grayscale image, and the original grayscale image is subjected to filtering processing to obtain a denoised grayscale image; Based on the preset camera intrinsic parameter matrix and distortion coefficients, the denoised grayscale image is subjected to radial and tangential distortion correction processing to obtain a grayscale image.

[0085] The morphological analysis module 22 is used to perform edge detection and morphological segmentation processing on the grayscale image to obtain burr binary data.

[0086] In an optional implementation, the morphological analysis module 22 is specifically used for: The grayscale image is subjected to Canny edge detection processing to obtain a gradient magnitude image and gradient direction; The gradient magnitude image is subjected to non-maximum suppression processing according to the gradient direction to obtain a gradient map; The gradient map is subjected to threshold segmentation processing based on a preset set of high and low threshold coefficients and the global maximum value in the grayscale image to obtain a binary edge map. The binary edge map is morphologically segmented based on a preset rectangular structuring element to obtain the burr binary data.

[0087] The coordinate mapping module 23 is used to perform three-dimensional point cloud registration and spatial coordinate mapping processing based on the burr binary data to obtain the burr three-dimensional coordinate set.

[0088] In an optional implementation, the coordinate mapping module 23 is specifically used for: The deformation area of ​​the target workpiece surface is collected to obtain a deformation stripe image; The deformed stripe image is subjected to deformed stripe phase shift analysis according to a preset half-local matching algorithm to obtain a disparity map; The disparity map is subjected to pixel-by-pixel matching and filtering based on the spur binary data to obtain spur data. Based on the camera intrinsic parameter matrix and the preset baseline distance, the spur data is subjected to three-dimensional coordinate mapping processing to obtain the spur three-dimensional coordinate set.

[0089] The trajectory planning module 24 is used to perform tool path planning and dynamic optimization based on the burr three-dimensional coordinate set to obtain machining trajectory data.

[0090] In an optional implementation, the trajectory planning module 24 is specifically used for: The three-dimensional coordinate set of the burrs is subjected to curve fitting to obtain a smooth and continuous trajectory; The smooth, continuous trajectory is subjected to joint rotation analysis based on preset DH parameters to obtain joint space commands; The joint space command is time-optimized according to the preset joint torque constraints to obtain the machining trajectory data.

[0091] The feedback adjustment module 25 is used to drive the target robotic arm to perform trajectory cruise detection and feedback adjustment based on the processing trajectory data, so as to obtain the burr removal execution command.

[0092] In an optional implementation, the feedback adjustment module 25 is specifically used for: Error analysis is performed on the machining trajectory data based on the actual angles collected in real time to obtain real-time joint error data; The PID control signal is converted and processed based on the real-time joint error data to obtain the independent control quantity for each joint. The target robotic arm is driven according to the independent control quantity and the processing trajectory data, and the target robotic arm is driven and tracked for measurement to obtain actual position data and contact force. The processing position of the smooth continuous trajectory is adjusted based on the actual position data and the contact force to obtain optimized end-point desired position data; The PID control parameters of the machining trajectory data are adjusted based on the optimized end-point desired position data to obtain the burr removal execution command.

[0093] In an optional implementation, the machine vision-based burr removal device 2 further includes an execution optimization module 26, which is specifically used for: The burr removal execution command is subjected to pose data parsing and corresponding image acquisition area mapping to obtain a dynamic interest area. Based on the instantaneous speed of the tool detected during the processing and the preset safety distance, pose synchronous image acquisition is performed, and residual comparison is performed based on the preset template image to obtain a real-time residual map. The real-time residual image is subjected to pixel-by-pixel matching and filtering based on the dynamic interest region to obtain a denoised residual image. Defect correlation analysis is performed based on the denoised residual map and the burr removal execution instruction to obtain the predicted defect probability. The parameter set is adjusted in real time by using a preset sliding window to perform gradient descent optimization on the control parameters of the burr removal execution command based on the predicted defect probability and the preset optimization weight coefficient, so as to obtain the parameter set for real-time adjustment. The real-time adjustment parameter set is encapsulated according to the timestamp corresponding to the burr removal execution instruction to obtain the execution optimization instruction.

[0094] It should be understood that the various variations and specific embodiments of the methods provided in the above embodiments are also applicable to the machine vision-based burr removal device of this embodiment. Through the foregoing detailed description of the machine vision-based burr removal method, those skilled in the art can clearly understand the implementation method of the machine vision-based burr removal device in this embodiment. For the sake of brevity, it will not be described in detail here.

[0095] like Figure 3 The diagram shown is a structural schematic of an electronic device provided in an embodiment of this application.

[0096] In a preferred embodiment of the present invention, the electronic device 3 may include, but is not limited to, a memory 31, at least one processor 32, and at least one communication bus 33.

[0097] Those skilled in the art should understand that Figure 3 The structure of the electronic device 3 shown does not constitute a limitation of the embodiments of the present invention. The electronic device 3 may also include more or fewer other hardware or software than shown, or different component arrangements.

[0098] In some embodiments, the electronic device 3 is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices.

[0099] It should be noted that the electronic device 3 is merely an example. Other existing or future electronic products that are suitable for this application should also be included within the scope of protection of this application and are incorporated herein by reference.

[0100] In some embodiments, the memory 31 stores a computer program that, when executed by the at least one processor 32, implements all or part of the steps in the machine vision-based burr removal method described above. The memory 31 includes a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data. Further, the computer-readable storage medium may primarily include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application program required for a function, etc.

[0101] In some embodiments, the at least one processor 32 is the control unit of the electronic device 3, connecting various components of the electronic device 3 via various interfaces and lines. It executes programs or modules stored in the memory 31 and calls data stored in the memory 31 to perform various functions and process data. For example, when the at least one processor 32 executes a computer program stored in the memory 31, it implements all or part of the steps of the machine vision-based burr removal method described in this application embodiment; or it implements all or part of the functions of the machine vision-based burr removal device. The at least one processor 32 may be composed of integrated circuits, such as a single-packaged integrated circuit or multiple integrated circuits with the same or different functions, including combinations of one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips.

[0102] In some embodiments, the at least one communication bus 33 is configured to enable communication between the memory 31 and the at least one processor 32, etc. Although not shown, the electronic device 3 may also include a power supply (e.g., a battery) to power the various components. Preferably, the power supply can be logically connected to the at least one processor 32 via a power management device, thereby enabling functions such as charging, discharging, and power consumption management. The power supply may also include one or more DC or AC power supplies, recharging devices, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 3 may also include various sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be described in detail here.

[0103] The integrated unit implemented as a software functional module described above can be stored in a computer-readable storage medium. This software functional module, stored in a storage medium, includes several instructions to cause an electronic device (which may be a personal computer, electronic device, or network device, etc.) or processor to execute portions of the methods described in the various embodiments of this application.

[0104] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and other division methods may be used in actual implementation.

[0105] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0106] The above are all preferred embodiments of this application, and are not intended to limit the scope of protection of this application. Therefore, all equivalent changes made in accordance with the structure, shape and principle of this application should be covered within the scope of protection of this application.

Claims

1. A machine vision-based burr removal method characterized by, The method comprises: image acquisition and preprocessing of the target workpiece surface to obtain a gray image; edge detection and morphological segmentation processing of the gray image to obtain burr binary data; three-dimensional point cloud registration and spatial coordinate mapping processing according to the burr binary data to obtain a burr three-dimensional coordinate set; tool path planning and dynamics optimization processing according to the burr three-dimensional coordinate set to obtain machining trajectory data; driving the target mechanical arm according to the machining trajectory data to obtain burr removal execution instructions.

2. The machine vision-based burring method according to claim 1, characterized in that, The image acquisition and preprocessing of the target workpiece surface to obtain a gray image comprises: image acquisition and preprocessing of the target workpiece surface according to preset signal acquisition parameters to obtain an original RGB image; brightness extraction processing of the original RGB image to obtain an original gray image, and filtering processing of the original gray image to obtain a denoised gray image; radial and tangential distortion correction processing of the denoised gray image according to a preset camera intrinsic parameter matrix and distortion coefficient to obtain a gray image.

3. The machine vision-based burring method according to claim 1, wherein The edge detection and morphological segmentation processing of the gray image to obtain burr binary data comprises: Canny edge detection processing of the gray image to obtain a gradient amplitude image and a gradient direction; non-maximum suppression processing of the gradient amplitude image according to the gradient direction to obtain a gradient image; threshold segmentation processing of the gradient image according to a preset high-low threshold coefficient set and a global maximum value in the gray image to obtain a binary edge image; morphological segmentation processing of the binary edge image according to a preset rectangular structure element to obtain the burr binary data.

4. The machine vision-based burring method according to claim 2, wherein The three-dimensional point cloud registration and spatial coordinate mapping processing according to the burr binary data to obtain a burr three-dimensional coordinate set comprises: deformation region acquisition of the target workpiece surface to obtain a deformation fringe image; deformation fringe phase shift analysis of the deformation fringe image according to a preset semi-local matching algorithm to obtain a parallax map; pixel-by-pixel matching screening processing of the parallax map according to the burr binary data to obtain burr data; three-dimensional coordinate mapping processing of the burr data according to the camera intrinsic parameter matrix and a preset baseline distance to obtain the burr three-dimensional coordinate set.

5. The machine vision-based burring method according to claim 1, wherein The tool path planning and dynamics optimization processing according to the burr three-dimensional coordinate set to obtain machining trajectory data comprises: curve fitting processing of the burr three-dimensional coordinate set to obtain a smooth continuous trajectory; joint rotation analysis of the smooth continuous trajectory according to preset D-H parameters to obtain joint space instructions; time optimization processing of the joint space instructions according to a preset joint torque constraint to obtain the machining trajectory data.

6. The machine vision-based deburring method according to claim 5, wherein, The driving of the target mechanical arm according to the machining trajectory data to obtain burr removal execution instructions comprises: error analysis of the machining trajectory data according to real-time collected actual angles to obtain real-time joint error data; According to the real-time joint error data, PID control signal conversion processing is performed to obtain independent control quantities of each joint; According to the independent control quantities and the machining trajectory data, a target robot arm is driven, and driving tracking measurement processing is performed on the target robot arm to obtain actual position data and contact force; According to the actual position data and the contact force, machining position adjustment is performed on the smooth continuous trajectory to obtain optimized end desired position data; According to the optimized end desired position data, PID control parameter adjustment is performed on the machining trajectory data to obtain the burr removal execution instruction.

7. The machine vision-based burring method according to claim 1, wherein, The method further comprises: The burr removal execution instruction is subjected to pose data analysis and corresponding image acquisition region mapping to obtain a dynamic attention region, pose synchronous image acquisition is performed according to a detected tool instantaneous speed in a machining process and a preset safety distance, and residual error comparison is performed according to a preset template image to obtain a real-time residual error map; According to the dynamic attention region, pixel-by-pixel matching and screening processing are performed on the real-time residual error map to obtain a denoised residual error map; According to the denoised residual error map and the burr removal execution instruction, defect correlation analysis is performed to obtain a predicted defect probability; A real-time adjustment parameter set is obtained by performing gradient descent optimization processing on the burr removal execution instruction according to the predicted defect probability and a preset optimization weight coefficient through a preset sliding window; According to a timestamp corresponding to the burr removal execution instruction, the real-time adjustment parameter set is subjected to instruction encapsulation to obtain an execution optimization instruction.

8. A machine vision based burr removal apparatus, characterized by, The device comprises: An image acquisition module configured to acquire and pre-process an image of a target workpiece surface to obtain a grayscale image; A morphology analysis module configured to perform edge detection and morphology segmentation processing on the grayscale image to obtain burr binary data; A coordinate mapping module configured to perform three-dimensional point cloud registration and spatial coordinate mapping processing on the burr binary data to obtain a burr three-dimensional coordinate set; A trajectory planning module configured to perform tool path planning and dynamics optimization processing on the burr three-dimensional coordinate set to obtain machining trajectory data; A feedback adjustment module configured to drive a target robot arm according to the machining trajectory data to perform trajectory cruise detection and feedback adjustment to obtain a burr removal execution instruction.

9. An electronic device, comprising: The electronic device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the steps of the machine vision-based burr removal method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the machine vision-based burr removal method according to any one of claims 1 to 7.