A machine vision-based workpiece self-positioning method and system for a polishing machine

By using a machine vision system and improved image processing algorithms, efficient, non-contact, and high-precision positioning of workpieces on polishing machine tools has been achieved, solving the problems of low efficiency and unstable accuracy of manual operation in existing technologies. It is suitable for high-precision positioning of workpieces of any size.

CN119115763BActive Publication Date: 2026-03-27NAT UNIV OF DEFENSE TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing workpiece positioning methods for polishing machine tools rely on manual operation, which is inefficient and has unstable accuracy. Traditional contact probe measurement poses a risk of surface damage and makes it difficult to achieve high-precision positioning.

Method used

A machine vision system is used for workpiece self-positioning. By calibrating the conversion relationship between pixel coordinates and machine tool coordinates, the workpiece image is acquired and the edge coordinates are detected. Combined with the servo motion control of CNC machine tool, non-contact high-precision positioning is achieved. A telecentric lens with low distortion and an improved image processing algorithm are used for edge detection and positioning.

Benefits of technology

It achieves efficient, non-contact, high-precision positioning of workpieces, reduces human intervention, improves positioning stability and efficiency, is suitable for high-precision positioning of workpieces of any size, and avoids surface damage caused by contact measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119115763B_ABST
    Figure CN119115763B_ABST
Patent Text Reader

Abstract

The application discloses a polishing machine workpiece self-positioning method and system based on machine vision, and the method comprises the following steps: S1, calibrating the machine vision system to solve the conversion relationship between the pixel coordinates and the machine tool coordinates; S2, acquiring the workpiece image collected by the machine vision system and the machine tool coordinates corresponding to the machine vision system, and detecting the pixel coordinates of the workpiece edge according to the workpiece image; S3, obtaining the machine tool coordinates of the workpiece and the machine tool coordinates of the workpiece center according to the pixel coordinates of the workpiece edge, the machine tool coordinates corresponding to the machine vision system and the conversion relationship between the pixel coordinates and the machine tool coordinates. The application has the advantages of non-contact, high positioning accuracy and high efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application mainly relates to the technical field of machine tool workpiece positioning, and particularly relates to a polishing machine tool workpiece self-positioning method and system based on machine vision. BACKGROUND

[0002] With the rapid development of optical design and optical processing technology, precision optical elements play a vital role in various fields such as aerospace, military, industry and civil, and higher requirements are put forward for optical processing capability. The computer controlled optical processing technology (CCOS) proposed in the last century is based on high-precision measurement technology and computer control technology, and uses quantitative detection and quantitative processing instead of manual processing, so that the processing process can quantitatively develop in a deterministic direction. At present, small grinding head polishing, jet polishing and magnetorheological polishing based on CCOS have been widely used in optical element processing.

[0003] The premise of realizing fixed-point and quantitative processing is that the workpiece has high positioning accuracy on the polishing machine tool. At present, the workpiece is still clamped by using the traditional manual tool setting method, and the worker uses a dial gauge or a micrometer and a clamp to realize the positioning of the workpiece. The manual clamping operation is tedious and inefficient, and is greatly affected by human factors, so the accuracy and stability are difficult to guarantee, which finally leads to a decrease in the convergence rate of surface error.

[0004] Patent application CN105252376A discloses a workpiece self-positioning method for a high-precision polishing machine tool. The method uses a contact probe to measure one coordinate point at a time, and obtains a set of measurement points through multiple measurements. Finally, the positioning of the workpiece surface on the machine tool is realized through an algorithm. The data acquisition efficiency of this method is low, and the positioning accuracy depends on the number of measurement points. The more measurement points, the higher the positioning accuracy, but the longer the time consumption. Moreover, the contact probe will cause a certain degree of surface damage when it contacts the optical element, which affects the optical performance of the workpiece. SUMMARY

[0005] In view of the technical problems existing in the prior art, the present application provides a polishing machine tool workpiece self-positioning method and system based on machine vision, which is non-contact and has high positioning efficiency.

[0006] To solve the above technical problems, the technical scheme provided by the present application is as follows:

[0007] A polishing machine tool workpiece self-positioning method based on machine vision, comprising the following steps:

[0008] S1, calibrate the machine vision system to solve the conversion relationship between the pixel coordinates and the machine tool coordinates;

[0009] S2, acquire the workpiece image collected by the machine vision system and the machine tool coordinates corresponding to the machine vision system, and detect the pixel coordinates of the workpiece edge according to the workpiece image;

[0010] S3, obtain the machine tool coordinates of the workpiece and the machine tool coordinates of the workpiece center according to the pixel coordinates of the workpiece edge, the machine tool coordinates corresponding to the machine vision system, and the conversion relationship between the pixel coordinates and the machine tool coordinates.

[0011] Preferably, the specific process of step S2 is as follows:

[0012] S201, acquire the workpiece image and convert it into a gray-scale image;

[0013] S202, eliminate the noise in the image;

[0014] S203, calculate the optimal segmentation threshold value of the background and the workpiece, complete the image binarization, and obtain a binary image;

[0015] S204, dilate and erode the binary image, and obtain the initial edge of the workpiece by subtracting the dilated image from the eroded image;

[0016] S205, segment the image after noise removal into a plurality of small images along the initial edge of the workpiece, detect the workpiece edge of each small image, and splice the workpiece edges of the small images to obtain the workpiece edge of the whole image;

[0017] S206, perform first-order difference on the workpiece edge of the whole image, and eliminate the points with sudden slope changes;

[0018] S207, perform sub-pixel workpiece edge detection in the original gray-scale image using an interpolation method according to the workpiece edge coordinates and gradient direction of the whole image, and fit the discrete points into a continuous workpiece edge using a polynomial fitting method to obtain the pixel coordinates of the workpiece edge.

[0019] Preferably, in step S203, a peak-finding algorithm is used to determine the peak valley between the two peaks in the gray-scale histogram, and the gray-scale value of the peak valley is the optimal segmentation threshold value for segmenting the background and the workpiece.

[0020] Preferably, in step S205, the improved Canny algorithm is used to detect the workpiece edge of each small image; wherein the improved Canny algorithm extends the local suppression along the gradient direction to global suppression along the gradient direction to finally obtain a single discontinuous edge.

[0021] Preferably, in step S3, for a circular workpiece, the four-point method is used to obtain the center coordinates according to the edge coordinates; and for a rectangular workpiece, the corner point coordinates are obtained according to the edge coordinates, and the intersection of the diagonal lines is the center of the rectangle.

[0022] Preferably, the specific process of step S1 is as follows:

[0023] S101, using a dial indicator to position a circular workpiece in a machine tool, the machine tool mechanical coordinate point of the center of the circular workpiece is marked as (x1, y1), the center of the image is regarded as the center of the contact probe, the center coordinates of the circular workpiece are measured using a four-point method and are marked as (x2, y2), and the difference between the two is obtained ; then the coordinates of the camera on the machine tool are: mechanical coordinates of the numerical control system + ;

[0024] S102, place the calibration plate on the machine tool, take a picture, detect the centers of the nine circles on the calibration plate, and record the pixel coordinates (u1, v1), (u2, v2)…(u9, v9); mark the current camera coordinates as (X Mc , Y Mc );

[0025] S103, detect the centers of the circles on the calibration plate in real time, move the camera to make the image principal point coincide with the centers of the circles on the calibration plate respectively, the coordinates of the camera on the machine tool are the mechanical coordinates of the centers of the circles on the calibration plate, and the center coordinates of the nine circles are obtained and are marked as (X M1 , Y M1 ), (X M2 , Y M2 )…(X M9 , Y M9 );

[0026] S104, according to the measurement data and formula (1), the undetermined parameters a, b, c, d, e, f can be solved using the least square method, wherein formula (1) is the conversion relationship from the pixel coordinates to the machine tool coordinates, and is specifically as follows:

[0027] (1)

[0028] In the formula, X M , Y M are the machine tool coordinates of the edge of the workpiece, a, b, c, d, e, f are the to-be-calibrated parameters, u, v are the pixel coordinates of the edge of the workpiece, u0, v0 are the image center coordinates, and X Mc , Y Mc are the coordinates of the camera on the machine tool.

[0029] The application further discloses a polishing machine workpiece self-positioning system based on machine vision, which comprises a control unit, an industrial camera, a clamp mounting plate, a lens clamp, a point light source and a telecentric lens.

[0030] The application further discloses a computer program product comprising a computer program, which executes the steps of the method when run by a processor.

[0031] The application further discloses a computer readable storage medium, which stores a computer program, which executes the steps of the method when run by a processor.

[0032] The application further discloses a polishing machine workpiece self-positioning system based on machine vision, which comprises a control unit, an industrial camera, a clamp mounting plate, a lens clamp, a point light source and a telecentric lens.

[0033] Compared with the prior art, the application has the following advantages:

[0034] In the image acquisition process, the application relies on the servo motion control vision system of the numerical control machine tool to acquire a plurality of images along the workpiece edge and records the current machine tool coordinates; according to the position coordinates and images of the acquired images, the machine tool coordinates corresponding to the workpiece edge in each image can be calculated, so that the super field high-precision measurement is realized, and the high-precision positioning of workpieces of any size is applicable; the above-mentioned machine tool workpiece self-positioning method can realize non-contact positioning, and has high precision and high efficiency.

[0035] The application selects a telecentric lens with small distortion, and the working distance reaches 220 mm, so that no interference phenomenon occurs in the non-contact measurement, processing and positioning process, and the installation is simple and no additional device is needed; the vision system and the numerical control system of the machine tool communicate with each other, so that automatic image acquisition, workpiece center point calculation and workpiece offset setting can be realized, human intervention is reduced, and the stability of workpiece positioning is improved; the vision technology is applied to the polishing machine, image acquisition is carried out based on the feedback of the numerical control machine tool, the limitation of the camera field of view can be broken through, and high-precision positioning of workpieces of any size can be realized; the image processing technology is used for workpiece edge coordinate detection, compared with the traditional contact type measuring head and the micrometer, a plurality of point data can be acquired at one time, and the stability and efficiency of workpiece positioning are improved. BRIEF DESCRIPTION OF DRAWINGS

[0036] Figure 1 is the installation structure diagram of the polishing machine workpiece self-positioning system of the present application in specific application.

[0037] Figure 2 is the principle diagram of the workpiece positioning method of the polishing machine workpiece self-positioning system of the present application in the embodiment.

[0038] Figure 3 is the flow chart of the workpiece positioning method of the polishing machine workpiece self-positioning system of the present application in the embodiment.

[0039] Figure 4 is the image processing flow chart in the workpiece positioning method of the polishing machine workpiece self-positioning system of the present application.

[0040] Figure 5 is the original image diagram collected by the present application.

[0041] Figure 6 is the gray scale histogram of the original image in the present application.

[0042] Figure 7 is the edge image diagram detected in the present application.

[0043] Figure 8 is the process diagram of obtaining the mechanical coordinates of the calibration plate in the present application.

[0044] Figure 9 is the binary image obtained by the OSTU threshold value and the triangular threshold value method in the prior art; (a) is the binary image obtained by the OSTU threshold value; (b) is the binary image obtained by the triangular threshold value method.

[0045] Figure 10 is the binary image obtained by the automatic simple threshold value method used in the present application.

[0046] Figure 11 is the processing result diagram before and after the improvement of the Canny algorithm of the present application; (a) is the detection result diagram of the improved Canny algorithm; (b) is the detection result diagram of the Canny algorithm.

[0047] Legend: 1, A-axis support beam; 2, industrial camera; 3, mounting plate; 4, lens clamp; 5, point light source; 6, telecentric lens. DETAILED DESCRIPTION

[0048] The present application is further described below in combination with the drawings and specific embodiments of the present application.

[0049] As shown in the drawings, Figure 1 the polishing machine workpiece self-positioning method based on machine vision of the embodiment of the present application comprises the steps of:

[0050] S1, after determining the image acquisition mode and installation position, calibrate the machine vision system (camera and lens). The purpose of calibration is to solve the conversion relationship between the pixel coordinates in the image and the machine tool coordinates;

[0051] S2, obtain the workpiece image collected by the machine vision system and the machine tool coordinates corresponding to the machine vision system, and detect the pixel coordinates of the workpiece edge according to the workpiece image; specifically, first, perform morphological closing operation to eliminate noise, then calculate the best segmentation threshold of each picture according to the simple threshold method and perform binaryzation, then use the morphological algorithm to obtain the workpiece edge of the binary image; use the improved Canny algorithm along the extracted edge to perform edge detection on the original image, which can obtain a single workpiece edge; perform first-order difference on the workpiece edge to remove outlier noise and obtain a point set, use interpolation algorithm to extract the edge sub-pixel coordinates in the original image according to the known point set and its gradient direction, and finally obtain a complete workpiece edge through polynomial fitting.

[0052] S3, according to the pixel coordinates of the workpiece edge, the machine tool coordinates corresponding to the machine vision system and the conversion relationship between the pixel coordinates and the machine tool coordinates, obtain the machine tool coordinates of the workpiece and the machine tool coordinates of the workpiece center.

[0053] In the image acquisition process, the present application relies on the servo motion control vision system of the numerical control machine tool to collect a plurality of images along the workpiece edge and record the current machine tool coordinates; according to the position coordinates and images of the collected images, the machine tool coordinates corresponding to the workpiece edge in each picture can be solved, thereby realizing super field high-precision measurement and being suitable for high-precision positioning of workpieces of any size; the above machine tool workpiece self-positioning method can realize non-contact positioning, has high precision and high efficiency.

[0054] In order to better understand the above technical solutions, the above technical solutions will be described in detail in combination with the drawings in the specification and specific embodiments.

[0055] The mechanical structure of the present application is shown in Figure 1 The mechanical structure of the present application is shown in

[0056] As shown in Figure 2As shown, the machine vision-based workpiece self-positioning method of the polishing machine tool embodiment of the present application acquires the image of the part edge of the workpiece according to the size of the workpiece in the image acquisition process, and records the current machine tool coordinates, and the pixel coordinates of the workpiece edge are obtained through image processing after the image is transmitted to the industrial computer. The machine tool coordinates of the workpiece can be calculated by using the parameters obtained through calibration and the recorded machine tool coordinates, and the machine tool coordinates of the center of the workpiece can be calculated according to the edge coordinates. Through the above workpiece self-positioning method, high-precision positioning of workpieces of any size can be achieved.

[0057] As shown in the above machine vision-based workpiece self-positioning method of the polishing machine tool, the specific steps are as follows: Figure 3

[0058] S1, after the positioning system is installed on the machine tool, the camera and lens need to be calibrated for the first time. The calibration is not required when the angle of the machine tool A axis is kept constant.

[0059] The accuracy of calibration greatly affects the positioning accuracy of the workpiece. The present application improves the nine-point calibration method, derives from the telecentric imaging model, introduces the machine tool coordinates of the camera into the calibration process, and finally obtains the conversion relationship from the pixel coordinates to the machine tool coordinates. Six unknown parameters can be solved by using the least square method through nine known coordinate points, and the conversion relationship from the pixel coordinates to the machine tool coordinates is shown in formula 1:

[0060] (1)

[0061] In the formula, X M , Y M are the machine tool coordinates of the workpiece edge, a, b, c, d, e, f are the parameters to be calibrated, u, v are the pixel coordinates of the workpiece edge, u0, v0 are the image center coordinates, X Mc , Y Mc are the coordinates of the camera on the machine tool.

[0062] The specific calibration process is as follows:

[0063] S101, use a dial gauge to position a circular workpiece in the machine tool, and the machine tool coordinate point of the center of the circular workpiece is marked as (x1, y1). The image center is regarded as the center of the contact probe, and the four-point method is used to measure the center coordinates of the circular workpiece, which are marked as (x2, y2). The difference between the two is obtained ; then the coordinates of the camera on the machine tool are: .

[0064] ​S102, place the calibration board on the machine tool, take a picture, detect the centers of the nine circles on the calibration board, and record their pixel coordinates (u1, v1), (u2, v2)…(u9, v9); mark the current camera coordinates as (X Mc , Y Mc ).

[0065] S103, detect the centers of the circles on the calibration board in real time, move the camera to make the image principal point and the centers of the circles on the calibration board coincide, as shown in Figure 8 , the coordinates of the camera on the machine tool are the mechanical coordinates of the centers of the circles on the calibration board, this method is simple and fast, and is suitable for hand-eye calibration of a numerical control machine tool vision system, and can achieve pixel-level positioning accuracy (5um in this embodiment), the mechanical coordinates of the nine circle centers are marked as (X M1 , Y M1 ), (X M2 , Y M2 )…(X M9 , Y M9 ).

[0066] S104, according to the measured data and formula (1), the undetermined parameters a, b, c, d, e, f can be solved by using the least square method.

[0067] S2, by inputting the shape and size of the workpiece, the image acquisition can be automatically completed. After the image is transmitted to the industrial computer, the processing flow is as shown in Figure 4 .

[0068] S201, obtain the workpiece image and convert it into a gray-scale image;

[0069] S202, use morphological closing operation to eliminate noise in the original image; wherein the edge information in the image is not damaged by filtering processing through the closing operation;

[0070] S203, use the peak seeking algorithm to calculate the best segmentation threshold, and use the simple threshold method to complete image binarization;

[0071] As shown in Figure 5 , the original image collected by the machine vision system has noise but a large difference in gray value between the background and the workpiece, and the corresponding gray histogram is as shown in Figure 6 . It can be seen that there are two peaks in the gray histogram. The existing gray segmentation threshold method mainly includes iterative method, OSTU threshold, triangular threshold segmentation and simple threshold segmentation. The iterative method has low calculation efficiency and is not suitable for scenes where the foreground and background have large differences, so it is not suitable for this example. OSTU threshold and triangular threshold segmentation are widely used in the field of image processing as mature automatic threshold segmentation methods, and the segmentation results of the two are as shown in Figure 9 . It can be seen that there is still a lot of noise.

[0072] The gray scale histogram of the image is analyzed, two obvious peaks meet the application condition of simple threshold segmentation, but at present the threshold value is obtained by manually judging the valley gray scale value, which has the disadvantages of low automation degree and unstable results. In view of this problem, the peak seeking algorithm is introduced into the image processing process, the valley gray scale value between the two peak values in the gray scale histogram is sought, that is, the best threshold value for segmenting the background and the workpiece, and the result is shown in Figure 10 The picture quality is obviously higher than that of the OSTU threshold value and the triangular threshold segmentation result.

[0073] S204, the binary image is dilated and eroded, and the difference between the dilated image and the eroded image can obtain the workpiece edge;

[0074] S205, the workpiece edge in the whole image is segmented into several small images with a resolution of 200*200 along the workpiece edge, and the improved Canny algorithm is used to detect the edge, and finally a discontinuous single edge is obtained.

[0075] Specifically, in the above steps, the workpiece edge part in the whole image is segmented into several small images according to the coarse positioning edge, and the edge of each small image is searched, which not only improves the operation speed but also suppresses most of the noise in the image;

[0076] At the same time, since the size of the segmented image is small and there is a single edge in each image, the existing Canny algorithm is optimized as follows:

[0077] a, improve the non-maximum suppression process, expand the local suppression along the gradient direction to the global suppression along the gradient direction, and finally obtain a single discontinuous edge;

[0078] b, cancel the double threshold value, and no longer need to manually adjust the upper and lower threshold values, and the universality of the algorithm is stronger.

[0079] As shown in Figure 11 , it can be seen from the comparison between the edge graph detected by the original Canny algorithm and the edge graph detected by the improved Canny algorithm that the edge detected by the improved Canny algorithm has better effect.

[0080] S206, since each collected image is a part of the edge of the workpiece, the slope of the edge in the image is constant (rectangular) or changes gently (circular), the obtained edge is subjected to first-order difference, and the point with sudden change of slope is the noise point, which is removed.

[0081] S207, subpixel edge detection is performed in the original image by using interpolation method from the edge coordinates and gradient direction, and the discrete points are fitted into a continuous edge by using polynomial fitting method, as shown in Figure 7 .

[0082] S3, according to the detected workpiece edge pixel coordinates, it can be converted into machine tool coordinates by formula (1).

[0083] For a circular workpiece, the center coordinates can be obtained by using a four-point method according to the edge coordinates; for a rectangular workpiece, the corner point coordinates are obtained according to the edge coordinates, and the intersection of the diagonal lines is the center of the rectangle.

[0084] After calibration, a repetitive experiment is carried out, and the experimental results are shown in Table 1. The repeatability in the X direction is 1.3 um, and the repeatability in the Y direction is 5.5 um. When the center is manually counted, the accuracy is often required to be within 20 um, so the positioning system can meet the actual processing requirements.

[0085]

[0086] The embodiment of the application further discloses a polishing machine tool workpiece self-positioning system based on machine vision, which comprises a control unit, an industrial camera 2, a clamp mounting plate 3, a lens clamp 4, a point light source 5 and a telecentric lens 6; the clamp mounting plate 4 is installed on the A-axis support beam 1, the lens clamp 4 is installed on the clamp mounting plate 3, and the lens clamp 4 and the telecentric lens 6 are connected through interference fit; the control unit is connected with the industrial camera 2 and a machine tool servo motion mechanism, and is used for executing the steps of the method as described above according to the picture shot by the industrial camera 2 and the coordinate information of the machine tool servo motion mechanism to obtain the machine tool coordinates of the workpiece and the machine tool coordinates of the workpiece center.

[0087] The embodiment of the application selects a telecentric lens with small distortion, and the working distance reaches 220 mm. In the non-contact measurement, processing and positioning process, there is no interference phenomenon, and the installation is simple and no additional device is needed. The vision system and the numerical control system of the machine tool communicate with each other, can realize automatic image acquisition, workpiece center point calculation and workpiece offset setting, reduce the intervention of human factors, and improve the stability of workpiece positioning. The vision technology is applied to the polishing machine tool, the image acquisition is carried out based on the feedback of the numerical control machine tool, the limitation of the camera field of view can be broken through, and high-precision positioning of workpieces of any size can be realized. The image processing technology is used for workpiece edge coordinate detection, compared with the traditional contact type measuring head and the dial gauge, the data of multiple points can be collected at a time, and the stability and efficiency of workpiece positioning are improved.

[0088] The embodiment of the application further discloses a computer program product, comprising a computer program, which executes the steps of the method as described above when being run by a processor.

[0089] The embodiment of the application further discloses a computer readable storage medium, which stores a computer program, and the computer program executes the steps of the method as described above when being run by a processor.

[0090] The embodiment of the present application also discloses a workpiece self-positioning system of a polishing machine based on machine vision, which comprises a memory and a processor connected with each other, the memory stores a computer program, and the computer program performs the steps of the above method when run by the processor.

[0091] The medium and the system of the present application correspond to the above method and have the advantages of the above method.

[0092] The present application realizes all or part of the processes of the above-mentioned embodiment methods, and can also be completed by computer program instruction related hardware. The computer program can be stored in a computer readable storage medium, and the computer program can realize the steps of the above-mentioned method embodiment when executed by a processor. The computer program includes computer program code, which can be in the form of source code, object code, executable files or some intermediate forms, etc. The computer readable storage medium includes any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. The memory is used to store computer programs and / or modules, and the processor realizes various functions by running or executing the computer programs and / or modules stored in the memory and calling the data stored in the memory. The memory can include high-speed random access memory and can also include non-volatile memory such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one magnetic disk storage device, flash memory device or other volatile solid-state memory device, etc.

[0093] The above is only the preferred embodiment of the present application, and the protection scope of the present application is not limited to the above-mentioned embodiment. Any technical solution falling within the idea of the present application belongs to the protection scope of the present application. It should be noted that some improvements and decorations without departing from the principle of the present application are considered as the protection scope of the present application.

Claims

1. A workpiece self-positioning method for a polishing machine tool based on machine vision, characterized in that, Including the following steps: S1. Calibrate the machine vision system and calculate the transformation relationship between pixel coordinates and machine tool coordinates; S2. Obtain the workpiece image collected by the machine vision system and the corresponding machine tool coordinates of the machine vision system, and detect the pixel coordinates of the workpiece edge based on the workpiece image. S3. Based on the pixel coordinates of the workpiece edge, the corresponding machine tool coordinates of the machine vision system, and the conversion relationship between pixel coordinates and machine tool coordinates, obtain the machine tool coordinates of the workpiece and the machine tool coordinates of the workpiece center. The specific process of step S1 is as follows: S101. Use a dial indicator to locate a circular workpiece in the machine tool. Record the machine tool coordinates of the center of the circular workpiece as (x1, y1). Consider the image center as the center of the contact probe, and use the four-point method to measure the center coordinates of the circular workpiece as (x2, y2). The difference between the two is... The camera's coordinates on the machine tool are: the mechanical coordinates of the CNC system + ; S102. Place the calibration board on the machine tool, take a picture, detect the centers of the nine circles on the calibration board, and record their pixel coordinates (u1, v1), (u2, v2)...(u9, v9); record the current camera coordinates as (X... Mc Y Mc ); S103. Real-time detection of the center of each circle on the calibration plate; moving the camera until the principal image point coincides with the center of each circle on the calibration plate; the coordinates of the camera on the machine tool are the mechanical coordinates of the centers of the circles on the calibration plate; obtaining the center coordinates of the nine circles, denoted as (X... M1 Y M1 ), (X) M2 Y M2 )...(X) M9 Y M9 ); S104. Based on the measurement data and equation (1), the undetermined parameters a, b, c, d, e, and f can be solved using the least squares method. Equation (1) represents the transformation relationship from pixel coordinates to machine tool coordinates, specifically: (1) In the formula, X M Y M Let X be the machine tool coordinates of the workpiece edge, a, b, c, d, e, f be the parameters to be calibrated, u and v be the pixel coordinates of the workpiece edge, u0 and v0 be the coordinates of the image center, and X be the coordinates of the image center. Mc Y Mc Here are the coordinates of the camera on the machine tool.

2. The workpiece self-positioning method for polishing machine tools based on machine vision according to claim 1, characterized in that, The specific process of step S2 is as follows: S201. Acquire the workpiece image and convert it to grayscale; S202. Eliminate noise in the image; S203. Calculate the optimal segmentation threshold between the background and the workpiece, complete image binarization, and obtain a binary image. S204. Dilate and erode the binary image, and obtain the initial edge of the workpiece by subtracting the dilated image and the erode image. S205. Divide the denoised image into several small images along the initial edge of the workpiece, detect the workpiece edge of each small image, and stitch the workpiece edges of each small image together to obtain the workpiece edge of the whole image. S206. Perform first-order difference on the workpiece edges of the entire image to remove points with abrupt changes in slope. S207. Based on the workpiece edge coordinates and gradient direction of the entire image, sub-pixel workpiece edge detection is performed in the original grayscale image using interpolation, and the discrete points are fitted into a continuous workpiece edge using polynomial fitting to obtain the workpiece edge pixel coordinates.

3. The workpiece self-positioning method for polishing machine tools based on machine vision according to claim 2, characterized in that, In step S203, a peak-finding algorithm is used to determine the peak and valley between two peaks in the gray-level histogram. The gray-level value of the peak and valley is the optimal segmentation threshold for separating the background and the workpiece.

4. The workpiece self-positioning method for polishing machine tools based on machine vision according to claim 2, characterized in that, In step S205, the workpiece edge of each small image is detected by the improved Canny algorithm; wherein the improved Canny algorithm improves the nonmaximum suppression process, extending the local suppression along the gradient direction to the global suppression along the gradient direction, so as to finally obtain a single discontinuous edge.

5. A workpiece self-positioning system for a polishing machine tool based on machine vision, characterized in that, The system includes a control unit, an industrial camera (2), a fixture mounting plate (3), a lens fixture (4), a point light source (5), and a telecentric lens (6). The fixture mounting plate (3) is mounted on the A-axis support beam (1), and the lens fixture (4) is mounted on the fixture mounting plate (3). The lens fixture (4) and the telecentric lens (6) are connected by an interference fit. The control unit is connected to the industrial camera (2) and the machine tool servo motion mechanism, and is used to execute the steps of the method described in any one of claims 1-4 to obtain the machine tool coordinates of the workpiece and the machine tool center coordinates based on the images captured by the industrial camera (2) and the coordinate information of the machine tool servo motion mechanism.

6. A computer program product, comprising a computer program, characterized in that, The computer program is executed by the processor to perform the steps of the method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when run by a processor, performs the steps of the method as described in any one of claims 1-4.

8. A machine vision-based workpiece self-positioning system for a polishing machine tool, comprising an interconnected memory and a processor, wherein the memory stores a computer program, characterized in that, The computer program, when run by a processor, performs the steps of the method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Workpiece self-locating device for high-precision polishing machine tool and machining method

    CN105252376A

  • Machine tool vision positioning method and system and machine tool

    CN107942949A

  • Robot calibration method and system, robot and storage medium

    WO2018214147A1