Dynamic monitoring method for machining

Image registration is carried out through industrial cameras and improved SIFT-Harris algorithm, which solves the problem of real-time monitoring accuracy during the machining process, optimizes the machining process, and improves the machining accuracy and automation of mechanical parts.

CN120471848AInactive Publication Date: 2025-08-12LIAONING JIDIAN POLYTECHNIC +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510543410.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-28
Publication Date
2025-08-12
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art is difficult to achieve real-time monitoring of processing accuracy during machining, resulting in waste of resources and economic losses.

Method used

The original image is acquired through an industrial camera, and linear and Euler angle transformation is performed after preprocessing. The image registration is carried out in combination with the improved SIFT-Harris algorithm to dynamically monitor the accuracy during the machining process.

Benefits of technology

Real-time accuracy monitoring of the mechanical processing process, optimize the processing process, reduce waste rate, and improve processing accuracy and automation level.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120471848A_ABST
    Figure CN120471848A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic monitoring method for machining, and the method comprises the steps: 1, obtaining an original image in a machining process through an industrial camera, carrying out the preprocessing of the original image, and determining the image space coordinates of an internal image point of the image; step 2, carrying out linear transformation, Euler angle transformation and spatial pose transformation on the image space coordinates of the image points in sequence; storing a spatial pose image when the spatial projection position of the XY plane of the three-dimensional design graph is consistent with the imaging position of the original image acquired by the industrial camera; and step 3, based on the improved SIFT-Harris algorithm, carrying out registration on the stored spatial pose image and the original image, and carrying out dynamic monitoring on the registered image and internal elements thereof. And the stored space pose image is registered with the original image, and the machining precision in the machining process is monitored in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a dynamic monitoring method for mechanical processing, and belongs to the technical field of mechanical processing. Background Art

[0002] The continuous innovation and upgrading of modern industrial product design and manufacturing technologies has greatly promoted the rapid development of the modern equipment manufacturing industry, and has also driven the research, development, production, and use of mechanical parts. As the most common, largest, and most widely used processed products in the modern equipment manufacturing industry, the machining accuracy of mechanical parts directly affects the product quality and operating life of modern mechanical equipment.

[0003] Image processing is a common process in mechanical processing. In order to make full use of the original images collected by industrial cameras and to improve the test accuracy and efficiency, it is necessary to use certain image processing algorithms to process the obtained original images accordingly, and then analyze, extract and remove their internal information.

[0004] Machining is a critical process in the manufacturing industry. If an abnormality in the machining state cannot be detected quickly, it will result in huge waste of resources and economic losses. Machining process status monitoring is an important means of ensuring the orderly completion of the machining process and is a key area of research in the field of intelligent manufacturing. Summary of the Invention

[0005] The present invention designs and develops a dynamic monitoring method for mechanical processing, which aligns the monitored image with the original image to achieve real-time monitoring of the machining accuracy during the mechanical processing.

[0006] The technical solution provided by the present invention is:

[0007] A dynamic monitoring method for machining, comprising:

[0008] Step 1: Obtain the original image during the machining process through an industrial camera, pre-process it, and determine the image coordinates of the image points inside the image;

[0009] Step 2: Perform linear transformation, Euler angle transformation, and spatial pose transformation on the image coordinates of the image point in sequence; save the spatial pose image of the 3D design graphic when the XY plane spatial projection position is consistent with the imaging position of the original image captured by the industrial camera;

[0010] Step 3: Based on the improved SIFT-Harris algorithm, the saved spatial pose image is used as the registration image and the original image is used as the image to be registered for registration, including:

[0011] A local vector monitoring window is opened in the registration image and moved in any direction. By observing the changes of the feature point vector in the window, the relationship between the feature point vector value in the window and the preset threshold is judged:

[0012] When the feature point vector value in the window is greater than the preset threshold, the central pixel point in the window is determined as a corner point;

[0013] When the corner point value is greater than the set threshold, the corner point meets the screening conditions and is retained; otherwise, it is removed.

[0014] The mathematical expression formula for determining the corner point function is:

[0015] F(x,y)=detM(x,y,η I ,η i )-ρ[traceM(x,y,η I ,η i )];

[0016] Where ρ is a constant, ranging from 0.04 to 0.06.

[0017] Preferably, in step 1, the preprocessing includes: grayscale processing, filtering processing, binarization processing, image edge detection, and circle contour detection.

[0018] Preferably,

[0019] The grayscale processing uses the average value algorithm to calculate the grayscale value, and the formula is:

[0020]

[0021] Where R(i,j), G(i,j), and B(i,j) represent the values of point (i,j) on the corresponding R, G, and B components respectively;

[0022] The binarization processing based on the maximum inter-class variance method includes:

[0023] Set the initialization threshold to D h , and use it as a comparison object;

[0024] Set the grayscale image after image grayscale processing as I(x,y), and divide the grayscale image into two parts A and B according to the grayscale level;

[0025] Solve the average value of the two partial pixel sets A and B respectively, and the calculation formula is:

[0026]

[0027]

[0028] Where N A 、N B are the total number of pixels in parts A and B respectively;

[0029] The expression of the between-class variance of parts A and B is:

[0030] δ(D h )=N A (D h )N B (D h )*[η A (D h )-η B (D h )] 2 ;

[0031] Where, δ(D h ) is the between-class variance value;

[0032] When δ(D h ) value is the maximum inter-class variance, and its corresponding initial threshold D h is the optimal threshold;

[0033] Otherwise, δ(D h ) traverses to each gray level from 0 to 255, and updates the set initialization threshold D h ;

[0034] Solve the inter-class variance of parts A and B respectively, and make numerical judgments on them until the maximum inter-class variance is found. The corresponding threshold is the optimal threshold;

[0035] Circle contour detection based on Hough transform, including:

[0036] Assume that there is a circular image in the OXY plane, and the set of all points on it is expressed as:

[0037] {(x i ,y i )|i=1,2,3...n};

[0038] Assuming the center of the circle is (a0, b0) and the radius is r0, the mathematical expression corresponding to this circular image is:

[0039] (x-a0) 2 +(y-b0) 2 =r0 2 ;

[0040] On the circular image, each point (x i ,y i ) all correspond to three-dimensional right cones in o-abr space. The expressions of all right cones are:

[0041] (ax i ) 2 +(by i ) 2 =r0 2 ;

[0042] Where a, b, and r are all variables in the parameter space.

[0043] Preferably, the step 2 includes:

[0044] The image-space coordinates of the circular marker point are directly transformed into the object-space coordinates of the corresponding object point through direct linear transformation. After multiple direct linear transformations, the rotation matrix is solved.

[0045] The rotation angle of the three-dimensional design graphic in space around the X, Y, and Z axes of the world coordinate system is calculated based on the Euler angle change of the rotation matrix;

[0046] According to the solved rotation angle, the spatial posture of the 3D design graphic is dynamically transformed in the rotation order of the X, Y, and Z axes, so that the X, Y screen space projection position of the 3D design graphic is consistent with the imaging position of the original image captured by the industrial camera, and the spatial posture image of the 3D design graphic at this time is saved.

[0047] Preferably, the step three includes:

[0048] A local vector monitoring window is opened in the registration image and moved in any direction. By observing the changes of the feature point vector in the window, the relationship between the feature point vector value in the window and the preset threshold is judged:

[0049] When the feature point vector value in the window is greater than the preset threshold, the central pixel point in the window is determined as a corner point;

[0050] When the corner point value is larger than the set threshold, the corner point meets the screening conditions and is retained; otherwise, it is removed.

[0051] Preferably, it also includes:

[0052] Feature point detection and positioning based on SIFT algorithm;

[0053] When (x, y) is the coordinate point on the original image I(x, y) and G(x, y, σ) is the Gaussian kernel function, the spatial function L(x, y, σ) can be expressed by the convolution of the original data of this image and the Gaussian kernel function:

[0054]

[0055] Where σ is the scale space factor;

[0056] Based on the convolution of the DoG operator and the original image I(x,y), the feature points are determined. The mathematical expression is:

[0057] D(x,y,σ)=[G(x,y,kσ)-G(x,y,σ)]*I(x,y)

[0058] Where k is the proportional factor;

[0059] Determine the location and scale values of the feature points that meet the requirements, including:

[0060] Based on the Taylor series quadratic expansion of the scale space D(x, y, σ), the curve fitting is performed on the treated points, and the calculated formula is:

[0061]

[0062] Where X = D(x, y, σ) is the characteristic point, and D is the zero derivative of D(X);

[0063] Determine the 2×2 Hessian matrix and principal curvature of the feature point, the expression is:

[0064]

[0065] Preferably, each feature point selected in the scale space is monitored again based on Harris corner detection, and feature points whose feature vector values are greater than a preset threshold are retained. The attribute expression is:

[0066]

[0067] Where η i is the feature point scale, η I is the convolution scale.

[0068] Preferably, in the SIFT algorithm, each filtered feature point is used as the sampling center, a circular area is selected, and the circular area is divided into 8 directions. Gaussian weighted calculation is performed on each direction, and the results are accumulated in the corresponding direction, generating a total of 64-dimensional feature vectors.

[0069] Preferably, it also includes:

[0070] After obtaining the feature point pairs of two images with overlapping areas, the image feature-based registration algorithm is used to determine the transformation relationship between the two images, which is expressed as:

[0071]

[0072] Where H is the inter-image change matrix, (x', y') and (x, y) are the registration point pairs of the image to be registered I' and the reference image I;

[0073] Find the number of matching point pairs based on the RANSAC algorithm and calculate the distance between the matching point pairs;

[0074] When the distance value is less than the set threshold, the corresponding feature point is defined as an inlier point, and the registration point pairs are repeatedly calculated. When the number of feature points that meet the conditions is the largest, the transformation matrix η can be determined. i To complete the complete matching between the image to be registered I' and the reference image I.

[0075] The beneficial effects of the present invention are as follows: The dynamic monitoring method for mechanical processing provided by the present invention aligns the saved spatial posture image with the original image based on the improved SIFT-Harris algorithm, and dynamically monitors the aligned image and its internal elements. It can adjust the processing process flow of mechanical parts according to the processing accuracy obtained by real-time monitoring, optimize the mechanical additional processing production process, reduce the scrap rate of products, and greatly improve the processing accuracy and automation level of mechanical parts. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] Figure 1 This is a flow chart of the dynamic monitoring method for machining according to the present invention. DETAILED DESCRIPTION

[0077] The present invention will be described in further detail below in conjunction with the accompanying drawings so that those skilled in the art can implement the invention with reference to the description.

[0078] like Figure 1 As shown, the present invention provides a dynamic monitoring method for machining, comprising:

[0079] Step 1: Obtain the original image during the machining process through an industrial camera, pre-process it, and determine the image coordinates of the image points inside the image;

[0080] Step 2: Perform linear transformation, Euler angle transformation, and spatial pose transformation on the image coordinates of the image point in sequence; save the spatial pose image of the 3D design graphic when the XY plane spatial projection position is consistent with the imaging position of the original image captured by the industrial camera;

[0081] The image-space coordinates of the circular marker point are directly transformed into the object-space coordinates of the corresponding object point through direct linear transformation. After multiple direct linear transformations, the rotation matrix is solved.

[0082] The rotation angle of the three-dimensional design graphic in space around the X, Y, and Z axes of the world coordinate system is calculated based on the Euler angle change of the rotation matrix;

[0083] According to the solved rotation angle, the spatial posture of the 3D design graphic is dynamically transformed in the rotation order of the X, Y, and Z axes, so that the X, Y screen space projection position of the 3D design graphic is consistent with the imaging position of the original image captured by the industrial camera, and the spatial posture image of the 3D design graphic at this time is saved.

[0084] Step 3: Based on the improved SIFT-Harris algorithm, the saved spatial pose image is registered with the original image, and the registered image and its internal elements are dynamically monitored.

[0085] A local vector monitoring window is opened in the registration image and moved in any direction. By observing the changes of the feature point vector in the window, the relationship between the feature point vector value in the window and the preset threshold is judged:

[0086] When the feature point vector value in the window is greater than the preset threshold, the central pixel point in the window is determined as a corner point;

[0087] When the corner point value is larger than the set threshold, the corner point meets the screening conditions and is retained; otherwise, it is removed.

[0088] The original images captured by industrial cameras are color images in the RGB color mode. During preprocessing, these three-channel color images are converted to single-channel images through grayscale conversion. After grayscale conversion, the RGB values of each pixel in the RGB color image are uniformly converted to a single value, known as the grayscale value, which still ranges from 0 to 255.

[0089] Grayscale processing uses the average value algorithm to calculate the grayscale value. The formula is:

[0090]

[0091] Where R(i,j), G(i,j), and B(i,j) represent the values of the point (i,j) in the corresponding R, G, and B components respectively.

[0092] In the present invention, as a preference, a wavelet transform maximum filtering algorithm is used to perform filtering and denoising processing on the image.

[0093] After filtering, the filtered image needs to be binarized to effectively distinguish the internal graphics from the background, making the entire image only black and white. At this time, the grayscale value of the pixel is 0 or 255.

[0094] In the present invention, as a preferred embodiment, binarization processing is performed based on the maximum inter-class variance method, including:

[0095] Set the initialization threshold to D h, and use it as a comparison object;

[0096] Set the grayscale image after image grayscale processing as I(x,y), and divide the grayscale image into two parts A and B according to the grayscale level;

[0097] Solve the average value of the two partial pixel sets A and B respectively, and the calculation formula is:

[0098]

[0099] Where N A 、N B are the total number of pixels in parts A and B respectively;

[0100] The expression of the between-class variance of parts A and B is:

[0101] δ(D h )=N A (D h )N B (D h )*[η A (D h )-η B (D h )] 2 ;

[0102] Where, δ(D h ) is the between-class variance value;

[0103] When δ(D h ) value is the maximum inter-class variance, and its corresponding initial threshold D h is the optimal threshold;

[0104] Otherwise, δ(D h ) traverses to each gray level from 0 to 255, and updates the set initialization threshold D h ;

[0105] The inter-class variance of parts A and B is solved respectively, and numerical judgment is performed on them until the maximum inter-class variance is found. The corresponding threshold is the optimal threshold.

[0106] After binarization, the graphics inside the image and its background have a more obvious color distinction. In order to obtain the edge contours of the target image inside the image, it is necessary to extract the edge contours of all graphics inside the image, and then perform circle detection based on the extracted edge contours.

[0107] In the present invention, as a preference, the Canny edge detection algorithm is selected to extract the edge contour of the target image.

[0108] The circular edge contour is extracted from the detected image edge to facilitate the positioning of the center coordinates of the marked point.

[0109] In the invention, as a preferred embodiment, circle contour detection is performed based on Hough transform, including:

[0110] Assume that there is a circular image in the OXY plane, and the set of all points on it is expressed as:

[0111] {(x i ,y i )|i=1,2,3...n};

[0112] Assuming the center of the circle is (a0, b0) and the radius is r0, the mathematical expression corresponding to this circular image is:

[0113] (x-a0) 2 +(y-b0) 2 =r0 2 ;

[0114] On the circular image, each point (x i ,y i ) all correspond to three-dimensional right cones in o-abr space. The expressions of all right cones are:

[0115] (ax i ) 2 +(by i ) 2 =r0 2 ;

[0116] Where a, b, and r are all variables in the parameter space.

[0117] Perform direct linear transformation to transform the image-space coordinates of the image point into the object-space coordinates of the corresponding object point. The reading of the image point in the image-space coordinate system is the image-space coordinate. The formula for direct linear transformation is:

[0118]

[0119] Where (x, y) is the image space coordinate, (X, Y, Z) is the object space coordinate; f is a matrix containing 11 unknown parameters; f a is the rotation matrix of the image coordinate system of the image point relative to the object space coordinate system of the object point. After sorting out the formula, we get the following formula:

[0120]

[0121] After multiple direct linear transformations, the position parameter matrix f and the selection matrix f can be solved. a , the matrix solving process is the calibration process.

[0122] Perform Euler angle transformation, rotate three angles around the world coordinate system X, Y, and Z axes in sequence, and obtain the rotation matrix f through direct linear transformation a After that, f a Then, the rotation angles of the three-dimensional graphics on the X, Y, and Z axes of the spatial coordinate system are calculated through Euler angle transformation.

[0123] The values of each rotation angle are:

[0124]

[0125] Where θ x ,θ y ,θ z They respectively represent the rotation angles of the three-dimensional graphics corresponding to the mechanical parts in space around the X, Y, and Z axes of the world coordinate system.

[0126] When the rotation matrix f is calculated a , and the spatial rotation angle θ of the three-dimensional design graphics of the mechanical parts around the world coordinate system X, Y, and Z axes is obtained through Euler angle transformation x ,θ y ,θ z Finally, to achieve correct registration between the image and the graphic, the 3D design of the mechanical part needs to be dynamically rotated in the order of the X, Y, and Z axes according to the rotation angle. This rotation aligns the X and Y spatial projection positions of the 3D design of the mechanical part with the image imaging position, paving the way for subsequent registration between the image and the graphic.

[0127] When the three-dimensional design graphics of mechanical parts are dynamically transformed in space, the drawn three-dimensional design graphics are first loaded and the rotation axis coordinate system is set; then it is determined whether the three-dimensional design graphics of the mechanical parts need to be rotated around the X axis. If it does not need to be rotated around the X axis, it is directly determined whether it needs to be rotated around the Y axis. After the rotation is completed, it is again determined whether the three-dimensional design graphics of the mechanical parts have completed the rotation angle θ around the X axis. x If θ is not completed x If the angle is rotated, it will rotate around the X axis again at an angle of Δx each time until the angle rotation is completed; when the angle of θ is completed x Then, it is determined whether the three-dimensional design drawing of the mechanical part needs to be rotated around the Y axis. According to the process of rotating around the X axis, the spatial posture rotation is performed around the Y and Z axes in sequence according to the set rotation order. When all the rotation angles θ are x ,θ y ,θ z After all the rotations are completed, the spatial posture rotation process of the three-dimensional design graphics of the mechanical part can be ended.

[0128] Taking the imaging position of the collected image of the machined part as the reference benchmark, the spatial posture of the three-dimensional design graphic of the inspected mechanical part is dynamically rotated and transformed, so that the surfaces with the same features as the image are adjusted to the same shooting angle consistent with the imaging position of the image. At this time, the spatial posture image of the three-dimensional design graphic of the inspected mechanical part is saved, and it is used as the registration image to be registered with the collected image of the mechanical part, realizing image-to-graphic registration to image-to-image registration.

[0129] The SIFT algorithm is used in conjunction with the Harris corner detection algorithm to improve the performance of the registration algorithm.

[0130] A local vector detection window is opened in the registration image and moved in any direction. By observing the changes of the feature point vector in the window, the relationship between the feature point vector value in the window and the preset threshold is judged:

[0131] When the feature point vector value in the window is greater than the preset threshold, the central pixel point in the window is determined as a corner point;

[0132] When the corner point value is larger than the set threshold, the corner point meets the screening conditions and is retained; otherwise, it is removed.

[0133] The screening of the detection window reduces the computational effort in finding feature points, which helps to improve the registration speed and accuracy.

[0134] Feature point detection and positioning based on SIFT algorithm;

[0135] When (x, y) is the coordinate point on the original image I(x, y) and G(x, y, σ) is the Gaussian kernel function, the spatial function L(x, y, σ) can be expressed by the convolution of the original data of this image and the Gaussian kernel function:

[0136]

[0137] Where σ is the scale space factor.

[0138] Based on the convolution of the DoG operator and the original image I(x,y), the feature points are determined. The mathematical expression is:

[0139] D(x,y,σ)=[G(x,y,kσ)-G(x,y,σ)]*I(x,y)

[0140] Where k is the scaling factor.

[0141] Determine the position and scale value of the feature points that meet the requirements, Boakai:

[0142] Based on the Taylor series quadratic expansion of the scale space D(x, y, σ), the curve fitting is performed on the treated points, and the calculated formula is:

[0143]

[0144] Where X = D(x, y, σ) is the characteristic point, and D is the zero derivative of D(X);

[0145] Determine the 2×2 Hessian matrix and principal curvature of the feature point, the expression is:

[0146]

[0147] Based on Harris corner detection, each feature point selected in the scale space is monitored again, and the feature points whose feature vector values are greater than the preset threshold are retained. The attribute expression is:

[0148]

[0149] Where η i is the feature point scale, η I is the convolution scale.

[0150] The mathematical expression formula for determining the corner point function is:

[0151] F(x,y)=detM(x,y,η I ,η i )-ρ[traceM(x,y,η I ,η i )];

[0152] Where ρ is a constant, ranging from 0.04 to 0.06.

[0153] Determine the size of the F(x,y) value of each corner point. When the F(x,y) value is larger than the set threshold, the corner point meets the screening conditions and is retained. Otherwise, it is removed to improve the robustness of feature point registration.

[0154] The SIFT feature descriptor takes a rectangular area as the center of the feature point to generate a 128-dimensional feature vector. In order to optimize the selected area structure, in the present invention, as a preferred method, a circular area is selected. Each screened feature point is used as the sampling center, and a circular area with a diameter of 16 is selected. This circular area is evenly divided into 8 directions. Gaussian weighted calculation is performed on each direction and the results are accumulated in the corresponding direction to generate a 64-dimensional feature vector to reduce the amount of calculation.

[0155] Image registration is performed. After obtaining the feature point pairs of two images with overlapping areas, the image feature-based registration algorithm is used to determine the transformation relationship between the two images. The expression is:

[0156]

[0157] Where H is the inter-image change matrix, (x', y') and (x, y) are the registration point pairs of the image to be registered I' and the reference image I.

[0158] Find the number of matching point pairs based on the RANSAC algorithm and calculate the distance between the matching point pairs;

[0159] When the distance value is less than the set threshold, the corresponding feature point is defined as an inlier point, and the registration point pairs are repeatedly calculated. When the number of feature points that meet the conditions is the largest, the transformation matrix η can be determined. i To complete the complete matching between the image to be registered I' and the reference image I.

[0160] The present invention first pre-processes the original image using grayscale processing, filtering processing, and binarization processing, and determines the center coordinate position of the marking point on the collected mechanical part image through Hough transform circle detection; then adjusts the spatial dynamic posture of the graphic through direct linear transformation and Euler angle transformation, and collects the adjusted graphic spatial posture image; finally, based on the theoretical basis of image-to-image registration, the improved SIFT-Harris stitching algorithm is used to register the collected graphic spatial posture image with the collected mechanical part image using the registration image, thereby realizing the dynamic conversion from image-to-graphic registration to image-to-image registration. The registered image and its internal elements are dynamically monitored, and the processing process flow of the mechanical part can be adjusted according to the processing accuracy obtained by real-time monitoring, thereby optimizing the mechanical additional processing production process, reducing the product scrap rate, and greatly improving the processing accuracy and automation level of the mechanical part.

[0161] Although the embodiments of the present invention have been disclosed above, they are not limited to the applications listed in the description and implementation methods. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and illustrations shown and described herein.

Claims

1. A dynamic monitoring method for machining, characterized in that: include: Step 1: Obtain the original image during the machining process through an industrial camera, pre-process it, and determine the image coordinates of the image points inside the image; Step 2: Perform linear transformation, Euler angle transformation, and spatial pose transformation on the image coordinates of the image point in sequence; save the spatial pose image of the 3D design graphic when the XY plane spatial projection position is consistent with the imaging position of the original image captured by the industrial camera; Step 3: Based on the improved SIFT-Harris algorithm, the saved spatial pose image is used as the registration image and the original image is used as the image to be registered for registration, including: A local vector monitoring window is opened in the registration image and moved in any direction. By observing the changes of the feature point vector in the window, the relationship between the feature point vector value in the window and the preset threshold is judged: When the feature point vector value in the window is greater than the preset threshold, the central pixel point in the window is determined as a corner point; When the corner point value is greater than the set threshold, the corner point meets the screening conditions and is retained; otherwise, it is removed. The mathematical expression formula for determining the corner point function is: F(x,y)=detM(x,y,η I ,or i )-ρ[traceM(x,y,η I ,or i )]; Where ρ is a constant, ranging from 0.04 to 0.

06.

2. The dynamic monitoring method for machining according to claim 1, characterized in that: In the step 1, the preprocessing includes: grayscale processing, filtering processing, binarization processing, image edge detection, and circle contour detection.

3. The dynamic monitoring method for machining according to claim 2, characterized in that: The grayscale processing uses the average value algorithm to calculate the grayscale value, and the formula is: Where R(i,j), G(i,j), and B(i,j) represent the values of point (i,j) on the corresponding R, G, and B components respectively; The binarization processing based on the maximum inter-class variance method includes: Set the initialization threshold to D h , and use it as a comparison object; Set the grayscale image after image grayscale processing as I(x,y), and divide the grayscale image into two parts A and B according to the grayscale level; Solve the average value of the two partial pixel sets A and B respectively, and the calculation formula is: Where N A 、N B are the total number of pixels in parts A and B respectively; The expression of the between-class variance of parts A and B is: δ(D h )=N A (D h )N B (D h )*[or A (D h )-or B (D h )] 2 ; Where, δ(D h ) is the between-class variance value; When δ(D h ) value is the maximum inter-class variance, and its corresponding initial threshold D h is the optimal threshold; Otherwise, δ(D h ) traverses to each gray level from 0 to 255, and updates the set initialization threshold D h ; Solve the inter-class variance of parts A and B respectively, and make numerical judgments on them until the maximum inter-class variance is found. The corresponding threshold is the optimal threshold; Circle contour detection based on Hough transform, including: Assume that there is a circular image in the OXY plane, and the set of all points on it is expressed as: {(x i ,y i )|i=1,2,3...n}; Assuming the center of the circle is (a0, b0) and the radius is r0, the mathematical expression corresponding to this circular image is: (x-a0) 2 +(y-b0) 2 =r0 2 ; On the circular image, each point (x i ,y i ) all correspond to three-dimensional right cones in o-abr space. The expressions of all right cones are: (a-x i ) 2 +(b-y i ) 2 =r0 2 ; Where a, b, and r are all variables in the parameter space.

4. The dynamic monitoring method for machining according to claim 3, characterized in that: The second step includes: The image-space coordinates of the circular marker point are directly transformed into the object-space coordinates of the corresponding object point through direct linear transformation. After multiple direct linear transformations, the rotation matrix is solved. The rotation angle of the three-dimensional design graphic in space around the X, Y, and Z axes of the world coordinate system is calculated based on the Euler angle change of the rotation matrix; According to the solved rotation angle, the spatial posture of the 3D design graphic is dynamically transformed in the rotation order of the X, Y, and Z axes, so that the X, Y screen space projection position of the 3D design graphic is consistent with the imaging position of the original image captured by the industrial camera, and the spatial posture image of the 3D design graphic at this time is saved.

5. The dynamic monitoring method for machining according to claim 4, characterized in that: The step three includes: A local vector monitoring window is opened in the registration image and moved in any direction. By observing the changes of the feature point vector in the window, the relationship between the feature point vector value in the window and the preset threshold is judged: When the feature point vector value in the window is greater than the preset threshold, the central pixel point in the window is determined as a corner point; When the corner point value is larger than the set threshold, the corner point meets the screening conditions and is retained; otherwise, it is removed.

6. The dynamic monitoring method for machining according to claim 5, characterized in that: Also includes: Feature point detection and positioning based on SIFT algorithm; When (x, y) is the coordinate point on the original image I(x, y) and G(x, y, σ) is the Gaussian kernel function, the spatial function L(x, y, σ) can be expressed by the convolution of the original data of this image and the Gaussian kernel function: Where σ is the scale space factor; Based on the convolution of the DoG operator and the original image I(x,y), the feature points are determined. The mathematical expression is: D(x,y,σ)=[G(x,y,kσ)-G(x,y,σ)]*I(x,y) Where k is the proportional factor; Determine the location and scale values of the feature points that meet the requirements, including: Based on the Taylor series quadratic expansion of the scale space D(x, y, σ), the curve fitting is performed on the treated points, and the calculated formula is: Where X = D(x, y, σ) is the characteristic point, and D is the zero derivative of D(X); Determine the 2×2 Hessian matrix and principal curvature of the feature point, the expression is:

7. The dynamic monitoring method for machining according to claim 6, characterized in that: Based on Harris corner detection, each feature point selected in the scale space is monitored again, and the feature points whose feature vector values are greater than the preset threshold are retained. The attribute expression is: Where η i is the feature point scale, η I is the convolution scale.

8. The dynamic monitoring method for machining according to claim 7, characterized in that: In the SIFT algorithm, each selected feature point is used as the sampling center, a circular area is selected, and the circular area is divided into 8 directions. Gaussian weighted calculation is performed on each direction, and the results are accumulated in the corresponding direction, generating a total of 64-dimensional feature vectors.

9. The dynamic monitoring method for machining according to claim 8, characterized in that: Also includes: After obtaining the feature point pairs of two images with overlapping areas, the image feature-based registration algorithm is used to determine the transformation relationship between the two images, which is expressed as: Where H is the inter-image change matrix, (x', y') and (x, y) are the registration point pairs of the image to be registered I' and the reference image I; Find the number of matching point pairs based on the RANSAC algorithm and calculate the distance between the matching point pairs; When the distance value is less than the set threshold, the corresponding feature point is defined as an inlier point, and the registration point pairs are repeatedly calculated. When the number of feature points that meet the conditions is the largest, the transformation matrix η can be determined. i To complete the complete matching between the image to be registered I' and the reference image I.