Turning tool wear defect detection method based on three-dimensional image processing
Three-dimensional image processing with a structured light system and RANSAC plane fitting addresses the limitations of two-dimensional methods by accurately quantifying turning tool wear, enhancing automation and reducing measurement errors.
Patent Information
- Application Number
- CN202310784503.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2024-12-31
AI Technical Summary
Existing two-dimensional image processing methods for turning tool wear detection fail to extract three-dimensional features of wear areas, lacking depth information and specific quantitative results.
A method utilizing three-dimensional image processing with a structured light imaging system, including a CCD camera and DLP industrial projector, to segment and fit planes on turning tool point clouds, using RANSAC plane fitting and standard gauge blocks for accurate wear depth measurement.
Enables high-accuracy, automated, and cost-effective detection of turning tool wear with minimal human interference, achieving measurement errors less than 0.05mm and providing precise wear depth data for timely tool replacement.
Smart Images

Figure CN119228711A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of machine vision detection, in particular to a method for visually detecting the wear state of a turning tool of a machining center. Background Art
[0002] In the field of machine vision, 3D imaging technology is widely used in various fields such as artificial intelligence, industrial inspection, vehicle autonomous driving technology, biomedicine, etc. 3D imaging technology can not only sense the existence of objects but also the distance of objects. Applying it in the field of tool wear can not only locate the spatial information of the wear area but also quantify the depth of wear.
[0003] In the early days, the wear detection of turning tools only detected a single signal, and the feature extraction was completed by applying different theories and methods to the collected signals, and finally the wear state of the turning tool was determined. The traditional replacement strategy of turning tools is to rely on manual experience to make decisions, and to replace the available turning tools according to time, which is dominated by subjective factors. Therefore, effective calculation of the wear amount of the tool can not only improve the utilization rate of the tool but also reduce the tool cost and time cost. In recent years, many methods for the detection of turning tool wear have mostly adopted two-dimensional image processing, and can only analyze the state of turning tool wear from the two-dimensional image according to the shape and size of the wear area. The wear defect information obtained in this way is relatively single and lacks the depth information of turning tool wear, and also lacks the specific quantitative results of turning tool wear.
[0004] Therefore, in order to detect the specific value of turning tool wear, the existing technology needs to propose a wear degree detection method based on three-dimensional image processing, combined with a structured light imaging system composed of a CCD camera and an industrial projector. Compared with other methods, this method is easy to operate and has relatively low cost. It can detect the specific wear depth of the turning tool and has high measurement accuracy. Summary of the invention
[0005] In view of the shortcomings of the prior art mentioned above, the purpose of the present invention is to provide a turning tool wear defect detection method based on three-dimensional image processing, which is used to solve the problem in the prior art that the two-dimensional image processing obtained in the current turning tool wear detection cannot extract the three-dimensional features of the turning tool wear area.
[0006] To achieve the above-mentioned purpose and other related purposes, the present invention provides a turning tool wear defect detection method based on three-dimensional image processing to extract three-dimensional feature information of the turning tool wear area, segment the acquired three-dimensional point cloud information to separate the gasket point cloud and the tool head part point cloud in the turning tool, and then perform least squares fitting plane processing on the gasket point cloud, solve the maximum distance between the fitted plane and the tool head part point cloud and use a standard gauge block to convert the actual physical distance, finally obtain the maximum actual wear of the tool head, and provide data reference for workers to replace the tool head.
[0007] The present invention is achieved through the following technical solutions.
[0008] A method for detecting wear defects of turning tools based on three-dimensional image processing comprises: a visual detection device, a computer, an image acquisition card, a CCD camera, an optical lens, and a DLP industrial projector; the image acquisition card is connected to the computer and the CCD camera through a signal transmission cable, the CCD camera is equipped with an optical lens, the CCD camera and the DLP projector are fixed on the visual detection device, and the optical axis of the CCD camera maintains a certain angle with the projection plane of the DLP projector.
[0009] S1: Build the surface structured light system on the machine tool so that the tool head is within the field of view of the CCD camera and complete the camera calibration experiment of the system.
[0010] S2: Project the grating stripes onto the surface of the turning tool, obtain the three-dimensional coordinates of each pixel point in the turning tool surface image and each point, and obtain the turning tool point cloud information.
[0011] S3: Perform the first segmentation on the obtained turning tool point cloud information, and only retain the turning tool surface point cloud information.
[0012] S4: Perform equal secondary segmentation processing on the turning tool point cloud.
[0013] S5: Combine the gasket point cloud with the formula to obtain parameters to fit the plane and test the accuracy, and provide a standard reference for converting the system point cloud information into quantifiable numerical information.
[0014] S6: After obtaining the plane fitting equation of the gasket, the tool head point cloud is segmented and the maximum distance is solved with the fitted plane to obtain the maximum distance between the wear area point cloud and the triangular gasket point cloud fitting plane.
[0015] S7: Calculate the point cloud distance between the two standard gauge blocks.
[0016] S8: Obtain the actual ratio, that is, the conversion ratio between the point cloud distance and the actual physical distance.
[0017] S9: After obtaining the actual scale, we perform plane fitting on the triangular gasket point cloud, and then calculate the distance between all points on the blade wear area point cloud and the plane fitted by the triangular gasket point cloud to find the maximum distance and maximum wear depth information.
[0018] Prior to this, the surface structured light system is built on the machine tool so that the tool head is within the field of view of the CCD camera, and the camera calibration experiment is completed. Specifically, the Zhang Zhengyou calibration method is used to obtain the camera's distortion parameter matrix and the camera's rotation and translation matrices. Then the grating fringe pattern is projected onto the surface of the calibration plate through a projector. After obtaining the corner point coordinates and phase information of the calibration plate, the calibration of the entire structured light system is completed by solving the conversion relationship between the phase information and the height information.
[0019] Priority definition: Get twelve grating images with different phases at three different frequencies
[0020]
[0021] Prioritize the definition,
[0022]
[0023] After deformation, we can know:
[0024] a1X+a2Y+a3Z+a4-a5ΦX-a6ΦY-a7ΦZ-a8Φ=0
[0025] Through the following equation:
[0026]
[0027] Among them, X, Y, and Z are the coordinates of the pixel point in the camera coordinate system, and Φ is the phase value of the pixel point.
[0028] Prior to this, the grating stripes are projected onto the surface of the turning tool, and the three-dimensional coordinates of each point corresponding to each pixel in the turning tool surface image are obtained to obtain the turning tool point cloud information. Specifically, the absolute phase image is obtained by solving the three wrapped phase images and combined with the calibrated system parameters to obtain the three-dimensional coordinates of each point corresponding to each pixel in the image to obtain the turning tool point cloud information.
[0029] Preferably, the obtained turning tool point cloud information is segmented for the first time, and only the turning tool surface point cloud information is retained. Specifically, after obtaining the point cloud information, the background point cloud and the turning tool point cloud are segmented to remove the background noise caused by the structured light imaging system.
[0030] Preferably, the turning tool point cloud is subjected to secondary segmentation processing, specifically: segmenting the point cloud of the blade wear area, the point cloud of the triangular gasket, and the point cloud of the rest of the turning tool.
[0031] Prioritize, fit the gasket point cloud to the plane and test the accuracy, and provide a standard reference for the system point cloud information to convert quantifiable numerical information. Specifically: after obtaining the triangular gasket point cloud, adopt the RANSAC plane fitting algorithm, select tool heads with different degrees of wear for comparative experiments to test the accuracy of this method.
[0032] Prior to this, the RANSAC plane fitting algorithm estimates the parameters of the mathematical model from a set of observed data containing outliers in an iterative manner. It randomly extracts three points from the point cloud data for a plane fitting, and then calculates the plane that fits the plane with the largest number of samples as the fitting plane. The RANSAC plane fitting algorithm has the following steps:
[0033] Preferably, three points are randomly selected and the model parameters are calculated according to the plane equation Ax+By+Cz+D=0.
[0034] Prioritize, use the remaining points to calculate the distance to the plane equation, compare the distance with the set threshold, if it is less than, the point is an interior point, otherwise it is an exterior point, and count the number of interior points under the parameter model.
[0035] Continue to perform the above two steps. If the number of inliers in the current model is greater than the maximum number of inliers that have been saved, change the new model parameters and keep the model parameters that always have the largest number of inliers.
[0036] Repeat the above three steps and iterate continuously until the iteration threshold is reached, find the model parameters with the largest number of inliers, and finally use the inliers to estimate the model parameters again to obtain the final model parameters.
[0037] Preferably, an infinite number of iterations is set at the beginning. Each time the model parameter estimate is updated, the current inlier ratio is used as p to estimate the number of iterations, or a maximum number of iterations is set, but it may not always be possible to reach the optimal solution.
[0038] First, after obtaining the plane fitting equation of the gasket, the tool head point cloud is segmented and the maximum distance is solved with the fitted plane to obtain the maximum distance between the wear area point cloud and the triangular gasket point cloud fitting plane. The specific formula used is:
[0039]
[0040] Preferably, the point cloud distance between the two standard gauge blocks is obtained by using two standard gauge blocks as follows: in order to reduce the measurement error of the standard gauge blocks caused by other factors, the two gauge blocks are stacked and placed, and then their upper surface plane fitting parameters are obtained respectively, and finally the heights of the two fitting planes are obtained.
[0041] Preferably, the actual ratio, i.e., the conversion ratio between the point cloud distance and the actual physical distance, is obtained by measuring the physical height of the gauge block with a vernier caliper, performing multiple fitting processes on the upper surfaces of the two gauge blocks, and obtaining the final gauge block height difference through the average of multiple distances to convert the ratio.
[0042] First, obtain an estimated wear depth:
[0043]
[0044] H is the estimated wear depth, H L is the height of the gauge block, d max is the maximum value from the defect area point cloud to the triangular pad fitting plane, and h is the distance from the gauge block point cloud fitting plane to the calibration plate plane.
[0045] Prior to obtaining the actual proportion, the triangular gasket point cloud is plane-fitted, and then the distance between all points on the point cloud of the blade wear area and the plane fitted by the triangular gasket point cloud is solved to find the maximum distance and maximum wear depth information. Specifically, the distance from the tool head point cloud with known wear information to the gasket fitting plane is solved, and the maximum distance is obtained according to statistics. This step is repeated to process the three acquired objects, and it is concluded that the error between the estimated wear amount obtained by this method and the actual measured wear amount is small, and it can be applied to actual production and processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a schematic diagram of the surface structured light three-dimensional measurement system device of the present invention.
[0047] Figure 2 This is an experimental flow chart of the turning tool wear defect detection method based on three-dimensional image processing of the present invention.
[0048] Figure 3 These are three pictures of the cutter head with different degrees of wear taken by the CCD camera of the present invention.
[0049] Figure 4 It is the projection grating image of the present invention.
[0050] Figure 5 These are the processed and unprocessed point cloud images of the present invention.
[0051] Figure 6 This is the standard gauge block diagram used in the present invention.
[0052] Figure 7 This is the point cloud distance distribution diagram of the present invention.
[0053] Component number description
[0054] Figure 1 :1-tool head; 2-camera; 3-projector; 4-machine tool; 5-camera; 6-fitting plane; 7-tool head; 8-triangular gasket; 9-projector. DETAILED DESCRIPTION
[0055] The following describes the embodiments of the present invention through specific examples, and those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention.
[0056] Step 1: Define and obtain twelve grating images with different phases at three different frequencies, and then use the eight-parameter method to obtain the world coordinates of the corner point coordinates (u, v) on the calibration plate and the phase value of the point. Since the corner point is on the surface of the calibration plate, the world coordinate system is established on the surface of the calibration plate, so the z coordinate of the point on the calibration plate can be regarded as 0. We can convert the pixel coordinates into camera coordinates and then calculate the values of a1-a8 through the rotation, translation matrix and phase value we obtained in advance to complete the calibration of the structured light system. As shown in Table 1, the a1-a8 calibration parameter values for 3D reconstruction of this experimental system are shown.
[0057] Table 1 3D reconstruction a1-a8 calibration parameter values
[0058]
[0059] like Figure 1 As shown, in this step, the machine tool 4 is used as a supporting platform, and the surface structured light system is built on the machine tool 4. The tool heads 1, 7 and the triangular gasket 8 are fixed parallel to the machine tool for detection. The CCD camera 5 vertically shoots the tool heads 1, 7, and the projector 3 is tilted at a certain angle according to the position of the camera 5 to project onto the surface of the tool heads 1, 7, so as to facilitate the subsequent comparison of the parallelism of the triangular gasket 8 of the tool heads 1, 7 and the tool heads 1, 7 and the maximum distance comparison of the point cloud.
[0060] Step 2: The specific process of this experiment is as follows Figure 2 As shown in the figure, after completing the calibration of the structured light system, select Figure 3 As shown in the figure, a new standard tool head and a tool head with known wear information are used for comparison test. 12 grating images with different phases are projected on the surface of the turning tool. The wrapped phase image at the corresponding frequency is obtained by solving the grating images with the same frequency but different phases. Then, the absolute phase image is obtained by solving the three wrapped phase images and the three-dimensional coordinates of each pixel corresponding to each point in the image are obtained by combining the calibrated system parameters. Figure 4 Shown is the projection grating diagram composed of experimental results.
[0061] Step 3: Use the CloudCompare module to visualize the point cloud, which can more intuitively display the appearance of the 3D point cloud. Since the structured light imaging system will image the background noise together, the background point cloud and the turning tool point cloud are first separated.
[0062] Step 4: Perform secondary segmentation on the turning tool point cloud to segment the triangular gasket and the tool head. Figure 5 As shown, the point cloud in (a) is a complete point cloud including the background and the single-view turning tool wear surface point cloud. The point cloud shown in (b) is a cut of the point cloud in (a), retaining only the point cloud information of the turning tool surface. In (c), we divide the point cloud in (b) again, setting the point cloud of the blade wear area as the blue point cloud module, the point cloud of the triangular gasket as the green point cloud module, and the point cloud of the rest of the turning tool as the red point cloud module. Figure 5 1 indicates that the blue point cloud module is the point cloud of the blade wear area; 2 indicates that the green point cloud module is the point cloud of the triangular gasket; 3 indicates that the red point cloud module is the point cloud of the rest of the turning tool.
[0063] Step 5: Select three tool heads with different degrees of wear for comparative experiments to test the accuracy of this method. For a new standard tool head and a worn tool head with known defect size, after obtaining the triangular gasket point cloud, a RANSAC plane fitting algorithm is adopted to randomly extract three points from the point cloud data for a plane fitting, and then the plane that conforms to the maximum number of samples of the plane is calculated as the fitting plane. As shown in Table 2, the plane fitting parameters of the point cloud of the tool head gasket with three different degrees of wear are shown.
[0064] Table 2 Plane fitting parameters
[0065]
[0066] Step 6: After obtaining the plane fitting equation of the gasket, split the tool head point cloud and solve the maximum distance with the fitted plane to finally determine the maximum distance.
[0067] Step 7: In order to reduce the measurement error of the standard gauge block caused by other factors, the two gauge blocks are placed on top of each other, and then the fitting parameters of their upper surface planes are calculated respectively, and finally the heights of the two fitting planes are calculated. The physical height of the gauge block is measured to be 9.08mm by calibrating the caliper, and then the upper surfaces of the two gauge blocks are fitted multiple times, and the final gauge block height difference is calculated by the average of multiple distances. Figure 6 As shown, 1 and 2 represent the horizontal point cloud of the same block; 3 represents the background point cloud; and 4 represents the vertical point cloud of the block.
[0068] Step 8: Get the conversion ratio between point cloud distance and actual physical distance.
[0069] Step 9: After obtaining the actual ratio, Figure 7 As shown, we Figure 3The distance from the defective tool head point cloud to the gasket fitting plane is solved by the point cloud shown in (c). The green point cloud in the figure is plane-fitted, and then the distance between all points on the blue point cloud and the plane fitted by the green point cloud is solved to find the maximum distance of 0.0188mm and the maximum wear depth information to be obtained. As shown in Table 3, the error between the estimated wear amount and the actual measured wear amount of the tool heads with three different wear degrees obtained through the above steps is small and can be applied to actual production and processing.
[0070] Table 3 Wear of turning tool
[0071]
[0072] Please refer to the attached drawings. It should be noted that the illustrations provided in this embodiment are only used to illustrate the basic concept of the present invention in a schematic manner, and the drawings only show the components related to the present invention rather than the number, shape and size of the components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0073] The present invention provides a lane wear defect detection method based on 3D image processing. The method uses Python language and open3D as development platforms, uses a CCD camera and a projector to acquire 3D information of a turning tool based on a 3D image processing technical method, mines the original data through point cloud segmentation and point cloud plane fitting, compares the parallelism of a triangular gasket of a tool head and the tool head, compares the maximum distance between the plane fitted by the triangular gasket of the tool head and the point cloud set of the tool head, and then compares the height information through a standard gauge block, and finally converts the estimated wear amount of the turning tool into the actual wear amount.
[0074] In summary, the present invention provides a lane wear defect detection method based on three-dimensional image processing, which has the following beneficial effects:
[0075] 1. Use a high-resolution CCD camera to replace the human eye to obtain image information, and use the computer to quickly process the image and data to calculate the three-dimensional data information of the object being measured. It has the advantages of non-contact, high speed, and high degree of automation;
[0076] 2. In the quantification of the wear area of the turning tool, this method can obtain the specific wear value of the turning tool head with high accuracy and low economic cost. The error of the system is less than 0.05mm, which can meet the actual production needs.
[0077] 3. It has the advantages of small human interference factors, high repeated positioning accuracy, high automation efficiency, etc. It can also realize automatic measurement of tool parameters.
[0078] Therefore, the present invention effectively overcomes various shortcomings in the prior art and has high industrial utilization value.
[0079] The above embodiments are merely illustrative of the principles and effects of the present invention, and are not intended to limit the present invention. Anyone familiar with the art may modify or alter the above embodiments without departing from the spirit and scope of the present invention. Therefore, all equivalent modifications or alterations made by a person of ordinary skill in the art without departing from the spirit and technical concept disclosed by the present invention shall still be covered by the claims of the present invention.
Claims
1. A turning tool wear defect detection method based on three-dimensional image processing, characterized in that: The turning tool wear detection method at least comprises: S1: Build the surface structured light system on the machine tool so that the tool head is within the field of view of the CCD camera and complete the camera calibration experiment of the system; S2: Project the grating stripes onto the surface of the turning tool, obtain the three-dimensional coordinates of each pixel point in the turning tool surface image, and obtain the turning tool point cloud information; S3: performing a first segmentation on the obtained turning tool point cloud information, and only retaining the turning tool surface point cloud information; S4: performing secondary segmentation processing on the surface point cloud information of the turning tool; S5: Combine the gasket point cloud with the formula to obtain parameters to fit the plane and test the accuracy, and provide a standard reference for converting the system point cloud information into quantifiable numerical information; S6: After obtaining the plane fitting equation of the gasket point cloud, the turning tool head point cloud is segmented and the maximum distance is solved with the fitted plane to obtain the maximum distance between the wear area point cloud and the triangular gasket point cloud fitting plane; S7: obtaining the point cloud distance between the two standard gauge blocks through the two standard gauge blocks; S8: Obtaining the actual ratio, i.e., the conversion ratio between the point cloud distance and the actual physical distance; S9: After obtaining the actual ratio, the triangular gasket point cloud is subjected to plane fitting processing, and then the distance between all points on the blade wear area point cloud and the plane fitted by the triangular gasket point cloud is solved to find the maximum distance and maximum wear depth information.
2. The turning tool wear defect detection method based on three-dimensional image processing according to claim 1 is characterized in that: In the step S1, twelve grating images with different phases at three different frequencies are defined, and then the world coordinates of the point are obtained by combining the coordinates of the corner point on the calibration plate and the phase value of the point with the eight-parameter method. Since the corner point is on the surface of the calibration plate, the world coordinate system is established on the surface of the calibration plate, so the z coordinate of the point on the calibration plate can be regarded as 0. The pixel coordinates are converted into camera coordinates, and then the rotation, translation matrix and phase value are obtained in advance to calculate the values of a1-a8 to complete the calibration of the structured light system.
3. The turning tool wear defect detection method based on three-dimensional image processing according to claim 1 is characterized in that: In step S2, three tool heads of different degrees, including a new standard tool head and a tool head with known wear information, are selected for comparative testing, and 12 grating images with different phases are projected onto the surface of the turning tool. The wrapped phase image at the corresponding frequency is obtained by solving the grating images of the same frequency but different phases, and then the absolute phase image is solved by the three wrapped phase images, and the three-dimensional coordinates of each pixel corresponding to each point in the image are obtained by combining the calibrated system parameters.
4. The turning tool wear defect detection method based on three-dimensional image processing according to claim 1 is characterized in that: In step S3, the CloudCompare module is used to visualize the point cloud, and after obtaining the point cloud information, the background point cloud and the turning tool point cloud are segmented to remove the background noise caused by the structured light imaging system.
5. The method for detecting tool wear defects based on three-dimensional image processing according to claim 1, characterized in that: In the step S4, the turning tool point cloud is subjected to secondary segmentation processing to segment the point cloud of the blade wear area, the point cloud of the triangular gasket, and the point cloud of the rest of the turning tool.
6. The turning tool wear defect detection method based on three-dimensional image processing according to claim 1 is characterized in that: In step S5, after obtaining the point cloud of the triangular gasket, a RANSAC plane fitting algorithm is adopted, and three tool heads with different degrees of wear are selected for comparative experiments to test the accuracy of this method. Three points are randomly selected from the point cloud data for a plane fitting, and then the plane that meets the largest number of samples of the plane is deduced as the fitting plane.
7. The turning tool wear defect detection method based on three-dimensional image processing according to claim 1 is characterized in that: In step S7, in order to reduce the measurement error of the standard gauge block caused by other factors, the two standard gauge blocks are stacked and placed, and then the upper surface plane fitting parameters of the two standard gauge blocks are respectively obtained, and finally the height of the fitting plane of the two standard gauge blocks is obtained, and the physical height of the gauge block is measured by calibrating the caliper to be 9.08 mm, and then the upper surfaces of the two standard gauge blocks are fitted multiple times, and the final gauge block height difference is obtained by the average of multiple distances.
8. The turning tool wear defect detection method based on three-dimensional image processing according to claim 1 is characterized in that: In step S8, the physical height of the gauge block is measured by a vernier caliper, and the upper surfaces of the two gauge blocks are subjected to multiple fitting processes respectively, and the final gauge block height difference is calculated by the average of multiple distances, so as to convert the ratio.
9. The turning tool wear defect detection method based on three-dimensional image processing according to claim 1, characterized in that: In step S9, the distance from the tool head point cloud with known wear information to the gasket fitting plane is solved. According to statistics, the maximum distance is 0.0188 mm. This step is repeated to process the three acquired objects to obtain the maximum wear depth information.
Citation Information
Cited By
Electronic grating quality inspection evaluation method based on digital twinborn model
CN120008470A
