Method for detecting workpiece discrete profile anomaly of numerical control machine based on machine vision

By establishing a three-dimensional field of view and discrete contour algorithm on CNC machine tools, three-dimensional anomalies of CNC machine tool workpieces can be detected in real time, solving the problem of the inability to detect and locate anomalies in real time in the existing technology, and improving the detection efficiency and accuracy of the machining process.

CN120259973BActive Publication Date: 2025-11-07HUANGGANG POLYTECHNIC COLLEGE +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510365757.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-11-07
Estimated Expiration
2045-03-26

AI Technical Summary

Technical Problem

Existing technologies cannot detect three-dimensional anomalies in CNC machine tool workpieces in real time during the machining process, nor can they quickly locate the location of the anomaly. As a result, machining errors can only be checked afterward, which is inefficient and cannot be corrected in a timely manner.

Method used

A machine vision-based 3D field-of-view detection method is adopted. Multiple image acquisition devices are used to acquire workpiece images in the XYZ axis directions, which are compared with simulation videos. Discrete contour algorithms are used to analyze abnormal processing trajectories, and abnormal parts are detected and located in real time.

Benefits of technology

It enables rapid detection and location of abnormal parts during processing, improves the real-time detection efficiency of the processing process, and can promptly correct program or equipment errors, reducing scrapped workpieces.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120259973B_ABST
    Figure CN120259973B_ABST
Patent Text Reader

Abstract

The application relates to a machine vision-based workpiece discrete contour abnormality detection method of a numerical control machine tool, a plurality of high-definition camera positions are arranged in a machining space of the machine tool, real-time trigger collection of images is carried out, machining simulation videos are matched, discrete motion trajectories are analyzed frame by frame, and abnormal machining distribution can be efficiently found out, and the problem that existing technologies only know time periods of abnormality occurrence and cannot specifically and quickly find out space-time distribution of abnormality occurrence is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a workpiece anomaly detection method for a numerical control machine tool, in particular to a workpiece discrete profile anomaly detection method for a numerical control machine tool based on machine vision, and belongs to the field of machine vision detection. BACKGROUND

[0002] Machine vision trains to recognize the anomaly of a workpiece through an image-based profile algorithm. The existing method generally finds the anomaly of the center position of the profile. This method can only determine whether the profile center deviates from the normal position from one perspective, but cannot determine whether the entire workpiece deviates.

[0003] If it is necessary to confirm the position of the entire workpiece, at least two perspectives can solve the problem. However, the problem is that the center position finding is a complex calculation, and secondly, the workpiece anomaly detection does not include workpiece shape anomaly detection in any processing process, thereby lacking the basis for exploring the reasons for the scrap workpiece. Some processing processes are generally checked after the program to find out the reasons caused by parameter setting errors, which is very inefficient. If real-time detection is performed during processing, the processing can be stopped immediately when an error occurs, thereby checking the error in the program. Thirdly, the existing technology can only know the time when the anomaly occurs, and cannot determine the reason, that is, the processing distribution (three-dimensional) anomaly, because there is a time lag effect between the processing process and the calculation process. When an error occurs, it can only be determined after a certain calculation time, at which time the machine tool cannot quickly find the accurate position of the error.

[0004] However, time lag is not of concern because once the anomaly occurs, the workpiece is defined as scrap at that moment, and time lag cannot eliminate the result of scrap, so the key is how to quickly know the processing position of the anomaly, that is, the processing distribution. For numerical control processing, errors usually occur on a continuous processing track, so only the discrete acquisition of the processing track compared with the normal track can determine the cause of the anomaly.

[0005] Finally, the error track may not be caused by program errors, but by errors of multiple factors such as tools, positioning, fixtures, and workpiece raw materials. The detection of discrete profiles also helps to study the period when the anomaly occurs, thereby analyzing the specific cause of the error, such as the anomaly caused by the above-mentioned multiple factors, which can be found in the early, middle, and late stages of processing. Under the premise of excluding program errors, the specific cause can be efficiently analyzed. SUMMARY

[0006] In view of the above problems of the prior art, the present application is designed from the following aspects: first, the establishment of a three-dimensional field of view for detecting the image of the workpiece under the three-dimensional field of view, second, comparing the image with the simulated image of the workpiece in the standard program for detection, third, using a discrete contour algorithm for detection to find the error machining track for targeted program error checking.

[0007] Based on the above considerations, the present application provides a machine vision-based numerical control machine tool workpiece discrete contour anomaly detection method, comprising the following steps:

[0008] S1 establishes a three-dimensional rectangular coordinate system O-XYZ in the machine tool machining space, and sets up multiple image acquisition devices in at least the XYZ three-axis direction, establishes a workpiece machining simulation video, and makes the frame field of view of the simulation video consistent with the image field of view of the image acquired by the image acquisition device (that is, set how many image acquisition devices, and correspondingly make how many angle simulation videos). That is, under the same scale, the image contours of any same object at the same position under O-XYZ in the field of view coincide.

[0009] S2 After initialization of the fixture position, a group of fixture initial images are acquired by the multiple image acquisition devices, and the corresponding simulation fixture initial frame in the machining simulation video is compared. If the images coincide, the workpiece to be processed is loaded, otherwise the fixture is corrected and / or repaired, or the fixture is replaced;

[0010] S3 During the machining process, every preset time, each image acquisition device is triggered to acquire a group of current images, and the corresponding simulation workpiece-to-be-processed frame in the machining simulation video is compared. If the discrete contours of the images coincide, no operation is performed, and the machining process continues according to the program. Otherwise, the machining is stopped, and the discrete contours of the current image group, as well as the discrete contours of at least one group of current images before and after the current image group, if any, are compared with the corresponding simulation workpiece-to-be-processed frame in the machining simulation video, and the cause of the anomaly is analyzed.

[0011] The method for comparing the discrete contours with the corresponding simulation workpiece-to-be-processed frame in the machining simulation video in S3 is as follows:

[0012] S3-1 uses an edge algorithm to find the current contour of the workpiece to be processed in each group of acquired images, and acquires the coordinates of the corresponding tool in O-XYZ (that is, the coordinates of a predetermined point on the tool). According to this, the corresponding position of the corresponding coordinate point (that is, a predetermined point on the tool) in the image where each current contour is located is marked. If the corresponding position is not visible in the image field of view, it is also marked.

[0013] S3-2 intercepts a plurality of frames of a preset time before and after the current frame in the simulated video, obtains the motion trajectory of the labeled coordinate point, and forms a simulated discrete motion trajectory of at least two segments before and after the current frame;

[0014] S3-3, similarly to step S3-2, obtains a plurality of corresponding real discrete motion trajectories in each group of collected images, compares the simulated discrete motion trajectory with the real discrete motion trajectory frame by frame, and if the interval is greater than a threshold, it is identified as not coinciding, and the corresponding frame time and the corresponding abnormal coordinate point position and / or abnormal real discrete motion trajectory are obtained.

[0015] It should be understood that if the preset time is very short, a plurality of groups of current images will be accumulated for queuing processing and comparison analysis. Therefore, in order to reduce the cost, when a processor with mediocre processing speed is used, the processing is still continuing before the comparison result comes out, at this time, at least one group of current images after the group of current images that do not coincide are needed to be checked, in order to exclude occasional abnormalities in the walking process, such as slight walking lag or advance (relative to the simulated frame) caused by the instantaneous change of tool damping due to uneven material texture, or slight walking fluctuation caused by emergency power connection due to power failure, especially in ultra-fine processing, thereby assisting in detecting abnormalities caused by unqualified raw materials of the workpiece to be processed and emergencies.

[0016] Preferably, further according to step S3-3, more abnormal coordinate point positions and / or abnormal real discrete motion trajectories are found, and a three-dimensional abnormal processing distribution map is made.

[0017] Optionally, if the discrete contours of the images do not coincide, the processing is still continued for a preset time and then stopped, and according to step S3-3, all abnormal coordinate point positions and / or abnormal real discrete motion trajectories from at least one preset time period before the current to the stopping time are found.

[0018] Optionally, the analysis of the causes of the abnormality includes that when the abnormal coordinate point positions and / or abnormal real discrete motion trajectories are less than 5, it is an accidental abnormality, including material surface composition abnormality and power failure starting emergency power supply; when the abnormal coordinate point positions and / or abnormal real discrete motion trajectories are not less than 5, it includes program error, tool wear, and clamp clamping looseness.

[0019] Advantages

[0020] Comparing the simulated processing motion with the real image, if the three-dimensional processing distribution of the abnormal points in the motion trajectory is not found, the corresponding abnormal period can be quickly found, and the abnormal backtracking research including the program can be efficiently carried out. BRIEF DESCRIPTION OF DRAWINGS

[0021] Figure 1Position layout diagram of multi-view field vision system in numerical control machine tool,

[0022] Figure 2A A scene diagram when the milling cutter is about to process one side of the workpiece loaded to the initial position of the clamp state,

[0023] Figure 2B The acquisition image diagram of the workpiece processed after being shot by the C1 machine position group in Figure 1

[0024] Figure 2C The frame diagram of the processing simulation video under the corresponding C5 machine position group, Figure 2B

[0025] Figure 3 The real and simulation discrete trajectories corresponding respectively in Figure 2B and Figure 2C DETAILED DESCRIPTION

[0026] As shown in Figure 1 , five positions of the face machine position group C1-C3 (small rectangular area) and the angle machine position group C4, C5, which are normal to each other, are arranged in the processing space in the door of the numerical control machine tool, and a high-definition industrial camera is used to shoot the real-time processing video of the workpiece to be processed (Fig. 2) in the processing space. A three-dimensional orthogonal coordinate system O-XYZ is constructed in the processing space, which is the corner of the simulation workpiece to be processed in Figure 2C .

[0027] Figure 2A The initial state of the clamp clamping the workpiece to be processed on the base is given. The milling cutter forms a quarter cylindrical surface processing shape on one side of the workpiece ( Figure 2B ). A frame of the simulation video under the corresponding C5 machine position group is shown in Figure 2C . When the quarter cylindrical surface processing is completed, a simulation processing trajectory P is formed. In the acquisition image Figure 2B (C1 machine position group shooting), a real processing trajectory Q (at this time) can still be seen.

[0028] During specific processing, after the clamp position is initialized, the C1-C2 high-definition industrial camera acquires a set of clamp initial images, and compares the corresponding simulation clamp initial frame in the processing simulation video. For two sets of acquisition images normal to each other, it can be judged whether the clamp is in place. If the images coincide, the workpiece to be processed is loaded, otherwise the clamp is corrected;

[0029] ​​​During processing, S3 synchronously triggers each high-definition industrial camera to acquire a set of current images every 0.2-1 seconds and compares them with the corresponding simulated workpiece frames in the processing simulation video. If the discrete contours of the images overlap, no operation is performed, and processing continues according to the program; otherwise, processing stops, and the discrete contours of the current set of images, as well as at least one set of current images before and, if present, after this set, are checked and compared with the corresponding simulated workpiece frames in the processing simulation video. The causes of anomalies are analyzed.

[0030] The specific method for comparing the discrete contour with the corresponding simulated workpiece frame in the machining simulation video in S3 is as follows:

[0031] S3-1 uses an edge algorithm, such as Figure 3 As shown, with Figure 2B For example, in a set of acquired images, find the current contour of the workpiece to be processed (including the outer contour of Q), and acquire the corresponding tool coordinates in O-XYZ (see...). Figure 2A (Preset points on the milling cutter head), based on which the corresponding coordinates of a set of points in the image containing the current contour are marked, in Figure 2B Even if the corresponding position is not visible in the image field of view, the actual processing trajectory Q is still marked.

[0032] S3-2 extracts multiple frames before and after the current frame of the simulation video at a preset time, obtains the motion trajectory of the marked coordinate points, i.e. the simulation processing trajectory P, and forms four segments of simulation discrete motion trajectory P' before and after the current frame.

[0033] S3-3 Following step S3-2, in a set of acquired images, Figure 2B Similarly, multiple corresponding real discrete motion trajectories Q' are obtained, thereby enabling... Figure 3 Taking the coordinate points indicated in the video as an example, they represent the preset point positions on the milling cutter in a corresponding frame of the simulation video. Multiple coordinate points are formed within a time of 0.2-1s, and they are connected to form a curve segment, so that the real machining trajectory Q and the simulated machining trajectory P respectively form discrete real discrete motion trajectories Q' and simulated discrete motion trajectories P'.

[0034] The simulated discrete motion trajectory is compared frame by frame with the real discrete motion trajectory. If the distance is greater than a threshold, such as... Figure 3 If d' is in the middle, it is identified as a non-coincident point; otherwise, it is a normal point. Figure 3 The spacing d in the image is used to obtain the corresponding frame time, the corresponding abnormal coordinate point position, and the actual discrete motion trajectory of the abnormality.

[0035] For S3-2, further illustrated, when the milling cutter to the figure abnormal point is an example, and do not stop machine processing, but the abnormal point as the current time real motion point position, then before and after each discrete four curve segment, together form the real discrete motion trajectory Q'; the corresponding simulation discrete motion trajectory is P'. Similarly, in Figure 3 Real discrete motion trajectory Q' there are other 3 abnormal points, will all four abnormal points into curve segment, formed the trajectory motion abnormal processing distribution, because the abnormal points less than 5, all four quarter cylinder overall processing abnormal appear in Figure 2C The last milling cutter will complete the stage, that is, the last arc milling when the occasional abnormal. It can be the actual material surface composition of abnormal, power outage start emergency power. In actual processing experience, we found that often is the material surface of impurities caused, affect the machining precision. This shows that the quality of raw materials on the high requirements of super fine processing.

Claims

1. A machine vision-based method for detecting abnormal discrete profile of a workpiece in a numerical control machine tool, characterized in that, comprising the following steps: S1. Establishing a three-dimensional orthogonal coordinate system O-XYZ in the machining space of the machine tool, and setting multiple image acquisition devices in at least three XYZ axis directions, establishing a workpiece machining simulation video, and making the frame field of view of the simulation video consistent with the image field of view of the images acquired by the image acquisition devices; S2. After initializing the fixture position, the multiple image acquisition devices acquire a set of fixture initial images, and compare the corresponding simulation fixture initial frames in the machining simulation video. If the images coincide, the machining of the workpiece to be processed is started. Otherwise, the fixture is corrected and / or repaired, or replaced; S3. During the machining process, every preset time, each image acquisition device is triggered to acquire a set of current images, and the corresponding simulation workpiece-to-be-processed frames in the machining simulation video are compared. If the discrete profiles of the images coincide, no operation is performed, and the machining continues according to the program. Otherwise, the machining is stopped, and the discrete profiles of the current image set, the discrete profiles of at least one set of images before and after the current image set, if any, are compared with the corresponding simulation workpiece-to-be-processed frames in the machining simulation video, and the causes of the abnormality are analyzed, wherein, The method for comparing the discrete profiles in S3 with the corresponding simulation workpiece-to-be-processed frames in the machining simulation video is as follows: S3-1. Using an edge algorithm to find the current profile of the workpiece to be processed in each set of acquired images, and acquiring the coordinates of the corresponding tool in O-XYZ. Based on this, the corresponding positions of the corresponding coordinate points in the images where each current profile is located are labeled. If the corresponding position is not visible in the image field of view, it is also labeled; S3-2. Multiple frames before and after the current frame in the simulation video are intercepted to obtain the motion trajectories of the labeled coordinate points, forming at least two segments of simulation discrete motion trajectories before and after the current frame; S3-3. Similarly to step S3-2, in each set of acquired images, multiple corresponding real discrete motion trajectories are obtained. The simulation discrete motion trajectories are compared with the real discrete motion trajectories frame by frame. If the distance is greater than a threshold, it is identified as not coinciding, and the corresponding frame time, the corresponding abnormal coordinate point position, and the abnormal real discrete motion trajectory are obtained. Further according to step S3-3, more abnormal coordinate point positions and abnormal real discrete motion trajectories are found out, and a three-dimensional abnormal machining distribution map is made.

2. The method of claim 1, wherein, If the discrete profiles of the images do not coincide, the machining is still continued for a preset time and then stopped. According to step S3-3, all abnormal coordinate point positions and abnormal real discrete motion trajectories from the current, at least one preset time period before, and until the stop are found out.

3. The method of claim 2, wherein, The analysis of the causes of the abnormality includes that when the number of abnormal coordinate point positions is less than 5, it is an accidental abnormality, including material surface composition abnormality, power failure, and emergency power start; and when the number of abnormal coordinate point positions is not less than 5, it includes program error, tool wear, and fixture clamping looseness.

4. The method of claim 3, wherein, ​

Citation Information

Patent Citations

  • Stretch-bending process model correction method based on workpiece three-dimension scanning

    CN103412978A

  • Cutting tool detection method for numerical control equipment

    CN107730490A