Precision control system, method and medium for multi-specification drill production machine tools
By adopting accurate control systems with real-time detection, balance correction, fitting compensation, tool angle segmentation and real-time control modules on multi-spec drill bit production machine tools, the problem of low production control accuracy in the existing technology is solved, and higher accuracy and real-time feedback are achieved.
Patent Information
- Application Number
- CN202410528255.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-04-29
AI Technical Summary
The existing multi-spec drill bit production machine control system has positioning errors and measurement accuracy errors due to mechanical looseness or wear of the sensor, thereby reducing the accuracy of production control.
A precise control system including real-time detection module, balance correction module, fitting compensation module, tool angle subdivision module and real-time control module are adopted. The system performs initial calibration through the vision camera, performs calibration phase correction and visual balance correction, performs expansion light compensation and sub-pixel profile fitting, detects tool angle and tool clearance, and performs real-time fine-tuning control.
It improves the accuracy of multi-spec drill bit production machine tools, reduces positioning errors and measurement accuracy errors, and realizes accurate detection of tool clearance and real-time processing feedback.
Smart Images

Figure CN118466390B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision technology, and in particular to a precision control system, method and medium for a multi-specification drill production machine tool. Background Art
[0002] Multi-specification drill bits usually refer to drill bits with different diameters, lengths or other characteristics. These drill bits can be used for different types of drilling operations. Multi-specification drill bits are generally processed on production machine tools due to their complex and varied models.
[0003] The control systems of existing multi-specification drill production machine tools are mostly based on traditional sensor CNC systems, such as using encoders, angle sensors or displacement sensors to measure and control various parameters during machine tool processing. However, in actual applications, the sensors may cause positioning errors or measurement accuracy errors due to mechanical looseness or wear, which leads to low accuracy in machine tool production control. Summary of the invention
[0004] The present invention provides a precise control system, method and medium for a multi-specification drill bit production machine tool, the main purpose of which is to solve the problem of low precision in machine tool production control.
[0005] To achieve the above-mentioned purpose, the present invention provides a precision control system for a multi-specification drill production machine tool, the system comprising a real-time detection module, a balance correction module, a fitting compensation module, a tool angle subdivision module and a real-time control module, wherein:
[0006] The real-time detection module is used to perform initial calibration on the visual camera using a preset calibration plate, obtain initial camera parameters, and obtain a real-time machine tool image of the production machine tool taken by the visual camera;
[0007] The balance correction module is used to perform calibration phase correction and visual balance correction on the real-time machine tool image using the initial camera parameters to obtain a corrected machine tool image;
[0008] The fitting compensation module is used to perform expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image;
[0009] The tool angle subdivision module is used to perform tool and drill calibration detection on the standard machine tool image to obtain a calibrated machine tool image, and perform tool angle subdivision detection on the calibrated machine tool image to obtain a tool angle;
[0010] The real-time control module is used to perform step tool setting detection on the calibration machine tool image to obtain the tool setting gap, and perform real-time fine-tuning control on the production machine tool according to the tool setting gap and the tool angle.
[0011] Optionally, the real-time detection module performs initial calibration on the visual camera using a preset calibration plate to obtain initial camera parameters, including:
[0012] Obtain a calibration image set of a preset calibration plate captured by a visual camera;
[0013] Performing corner feature detection on the calibration image set to obtain a calibration corner feature set;
[0014] Acquire the corner point coordinate parameters of the calibration plate, and perform spatial coordinate calibration on the calibration corner point feature set according to the corner point coordinate parameters to obtain a corner point feature coordinate set;
[0015] Performing homography mapping on the corner point feature coordinate set to obtain a corner point homography matrix set;
[0016] Performing parameter decomposition and least squares optimization on the corner point homography matrix set to obtain camera intrinsic parameters;
[0017] Performing linear algebra coordinate matching and singular value decomposition operations on the corner point feature coordinate set according to the camera intrinsic parameters to obtain camera extrinsic parameters;
[0018] Initial camera parameters are generated according to the camera intrinsic parameters and the camera extrinsic parameters.
[0019] Optionally, the balance correction module performs calibration phase correction and visual balance correction on the real-time machine tool image using the initial camera parameters to obtain a corrected machine tool image, including:
[0020] Extracting camera intrinsic parameters and camera extrinsic parameters from the initial camera parameters;
[0021] Performing radial image distance correction on the camera internal parameter to obtain a corrected internal parameter;
[0022] Performing tangential phase correction on the real-time machine tool image using the correction internal reference to obtain a primary correction image;
[0023] Performing axial positioning on the primary correction image according to the camera extrinsic parameters to obtain an axial intersection point;
[0024] Pixels in the primary corrected image are selected one by one as target primary pixels, and the target primary pixels are coordinate-balanced according to the correction intrinsic parameters, the axial intersection points, and the camera extrinsic parameters using the following homogeneous balancing algorithm to obtain target corrected pixels:
[0025]
[0026]
[0027]
[0028]
[0029]
[0030]
[0031]
[0032]
[0033]
[0034] in,
[0035]
[0036] Wherein, x2 is the horizontal coordinate of the target correction pixel in the world coordinate system, y2 is the vertical coordinate of the target correction pixel in the world coordinate system, x1 is the horizontal coordinate of the target primary pixel, x is the horizontal coordinate of the target real-time pixel, j1 is the horizontal axis focal length in the correction intrinsic parameter, j2 is the vertical axis focal length in the correction intrinsic parameter, S is the rotation matrix in the camera extrinsic parameter, T is the translation vector in the camera extrinsic parameter, c1 is the horizontal coordinate of the axial intersection point, and c2 is the vertical coordinate of the axial intersection point;
[0037] Pixel splicing is performed on target correction pixels corresponding to all target primary pixels in the primary correction image to obtain a correction machine tool image.
[0038] Optionally, the fitting compensation module performs expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image, including:
[0039] Performing histogram illumination estimation on the corrected machine tool image to obtain image illumination information;
[0040] Performing a lighting equalization operation on the corrected machine tool image according to the image lighting information to obtain a compensated machine tool image;
[0041] Performing an image opening operation on the compensated machine tool image to obtain a smoothed machine tool image;
[0042] Using the smoothed machine tool image to perform pixel difference calculation and edge threshold extraction operation on the compensated machine tool image to obtain a primary machine tool profile;
[0043] Extracting curvature features of the primary machine tool profile to obtain profile curvature features;
[0044] Performing normal vector extreme value screening on the contour curvature feature to obtain a contour normal vector;
[0045] Performing sub-pixel fitting on the primary machine tool profile according to the profile curvature feature and the profile normal vector to obtain a standard machine tool profile;
[0046] The corrected machine tool image is updated to a standard machine tool image using the standard machine tool profile.
[0047] Optionally, the fitting compensation module performs sub-pixel fitting on the primary machine tool profile according to the profile curvature feature and the profile normal vector to obtain a standard machine tool profile, including:
[0048] Selecting pixel points in the primary machine tool contour one by one as target contour pixels, and using the normal vector corresponding to the target contour pixel in the contour normal vector as the target pixel normal vector;
[0049] The following sub-pixel deviation algorithm is used to perform sub-pixel operations on the target contour pixel according to the target pixel normal vector and the contour curvature feature to obtain primary contour sub-pixels:
[0050]
[0051]
[0052] Wherein, x4 is the horizontal coordinate of the primary contour subpixel, x3 is the horizontal coordinate of the target contour pixel, and e x is the lateral component of the target pixel normal vector, e y is the longitudinal component of the target pixel normal vector, f' x is the first-order lateral partial derivative of the contour curvature feature to the target contour pixel, f' y is the first-order longitudinal partial derivative of the target contour pixel in the contour curvature feature, f” xx is the second-order lateral partial derivative of the target contour pixel in the contour curvature feature, f” xy The second-order mixed partial derivative of the target contour pixel in the contour curvature feature, f” yy is the second-order longitudinal partial derivative of the target contour pixel in the contour curvature feature, y4 is the ordinate of the primary contour sub-pixel, and y3 is the ordinate of the target contour pixel;
[0053] Aggregating primary contour sub-pixels of all target contour pixels in the primary machine tool contour into a primary contour sub-pixel group;
[0054] Performing edge threshold screening on the primary contour sub-pixel group to obtain a standard contour sub-pixel group;
[0055] The standard contour sub-pixel group is pixel-joined to obtain a standard machine tool contour.
[0056] Optionally, the tool angle subdivision module performs tool angle subdivision detection on the calibrated machine tool image to obtain the tool angle, including:
[0057] Performing tool segmentation on the calibrated machine tool image to obtain a tool block;
[0058] Performing geometric feature analysis on the tool block to obtain tool geometric features;
[0059] Positioning the cutting edge of the cutting tool block according to the cutting tool geometric features to obtain a cutting tool block group;
[0060] Performing region growing segmentation and curve profile fitting on the tool edge block group to obtain a fitted edge profile group;
[0061] The slope angle analysis is performed on the fitting blade profile group to obtain the tool angle.
[0062] Optionally, the real-time control module performs step tool setting detection on the calibrated machine tool image to obtain the tool setting clearance, including:
[0063] Performing tool-drill segmentation on the calibrated machine tool image to obtain a tool block and a drill block;
[0064] Performing region growing segmentation and tool curve fitting on the tool block to obtain a fitted tool contour;
[0065] Performing step edge extraction and drill bit curve fitting on the drill bit block to obtain a fitted drill bit profile;
[0066] Performing vertical projection on the fitted tool profile to obtain a tool profile projection;
[0067] Performing vertical projection on the fitted drill bit profile to obtain a drill bit profile projection;
[0068] The distance between the tool contour projection and the drill bit contour projection is measured to obtain a tool clearance.
[0069] Optionally, the real-time control module performs real-time fine-tuning control on the production machine tool according to the tool clearance and the tool angle, including:
[0070] Acquiring CNC tool setting data and CNC tool offset data of the production machine tool;
[0071] Extracting drill bit position coordinates and tool coordinate origin from the CNC tool setting data;
[0072] Using the tool clearance and the tool coordinate origin to perform a reference offset update on the drill position coordinates to obtain a real-time drill position;
[0073] Calculating the angle difference of the numerical control tool deviation data using the tool angle to obtain the tool angle offset;
[0074] The tool angle offset is used to perform servo rotation correction on the production machine tool, and the real-time drill position is used to perform workpiece displacement correction on the production machine tool.
[0075] In order to solve the above problems, the present invention also provides a method for accurately controlling a multi-specification drill bit production machine tool, the method comprising:
[0076] Performing an initial calibration on the visual camera using a preset calibration plate to obtain initial camera parameters, and acquiring a real-time machine tool image of the production machine tool taken by the visual camera;
[0077] Using the initial camera parameters, calibrate the real-time machine tool image for phase correction and visual balance correction to obtain a corrected machine tool image;
[0078] Performing expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image;
[0079] Performing tool and drill calibration detection on the standard machine tool image to obtain a calibrated machine tool image, and performing tool angle subdivision detection on the calibrated machine tool image to obtain a tool angle;
[0080] A step tool setting detection is performed on the calibrated machine tool image to obtain a tool setting gap, and real-time fine-tuning control is performed on the production machine tool according to the tool setting gap and the tool angle.
[0081] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned precise control method of a multi-specification drill production machine tool.
[0082] The present invention uses a preset calibration plate to perform initial calibration on the visual camera, and can obtain the camera intrinsic parameters and camera extrinsic parameters of the visual camera, so as to facilitate the correction of subsequent real-time machine tool images, improve the accuracy of subsequent position calculations, and facilitate the calculation of various position parameters of the production machine tool in the real-time machine tool image. By using the balance correction module to perform calibration phase correction and visual balance correction, the lens distortion and visual balance error of the visual camera can be eliminated, the measurement accuracy can be improved, and the world coordinate system transformation of the production machine tool in the correction machine tool image can be realized, so as to facilitate subsequent distance measurement. By performing expansion illumination compensation and sub-pixel contour fitting on the correction machine tool image, image blur caused by uneven illumination or reflection can be reduced, and the details of the contour part of the production machine tool in the correction machine tool image can be improved, thereby improving the accuracy of subsequent control.
[0083] By performing tool and drill calibration detection, the positions of the processing tools and drill bits of the production machine tools can be identified and calibrated. By performing tool angle subdivision detection, the angles of each cutting edge of the processing tool can be extracted according to the positioning of the world coordinate system, thereby facilitating the subsequent precise control of the machine tool. By performing step tool setting detection, the tool setting clearance can be obtained, and the edge profile of the processing tool and drill bit can be further refined to achieve precise detection of the tool setting clearance. By performing real-time fine-tuning control, real-time processing feedback can be achieved, thereby improving the accuracy of machine tool control. Therefore, the precise control system, method and medium of the multi-specification drill bit production machine tool proposed in the present invention can solve the problem of low accuracy when performing machine tool production control. BRIEF DESCRIPTION OF THE DRAWINGS
[0084] Figure 1 A functional module diagram of a precision control system for a multi-specification drill bit production machine tool provided by an embodiment of the present invention;
[0085] Figure 2 A flowchart of calibrating initial camera parameters provided by an embodiment of the present invention;
[0086] Figure 3 A flow chart for generating a correction machine tool image provided by an embodiment of the present invention;
[0087] Figure 4 A schematic flow chart of a method for accurately controlling a multi-specification drill bit production machine tool provided by an embodiment of the present invention;
[0088] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION
[0089] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0090] The embodiment of the present application provides a precision control system for a multi-specification drill bit production machine tool. The execution subject of the precision control system of the multi-specification drill bit production machine tool includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the system provided by the embodiment of the present application. In other words, the precision control system of the multi-specification drill bit production machine tool can be executed by software or hardware installed on a terminal device or a server device. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms.
[0091] like Figure 1 1 is a functional module diagram of a precision control system for a multi-specification drill bit production machine tool provided by an embodiment of the present invention.
[0092] The precision control system 100 for the multi-specification drill production machine tool of the present invention can be installed in an electronic device. According to the functions to be implemented, the precision control system 100 for the multi-specification drill production machine tool can include a real-time detection module 101, a balance correction module 102, a fitting compensation module 103, a tool angle subdivision module 104 and a real-time control module 105. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0093] In this embodiment, the functions of each module / unit are as follows:
[0094] The real-time detection module 101 is used to perform initial calibration on the visual camera using a preset calibration plate, obtain initial camera parameters, and acquire the real-time machine tool image of the production machine tool taken by the visual camera.
[0095] In the embodiment of the present invention, the calibration plate refers to a specially designed plane plate used for camera calibration. The calibration plate is covered with feature points or feature marks with known sizes and positions. These feature points or marks can be used to calibrate the intrinsic and extrinsic parameters of the camera, as well as the transformation relationship between the camera and the world coordinate system. The visual camera can be an industrial camera; for example, Basler, IDS Imaging Development Systems or Teledyne DALSA, etc.
[0096] In detail, the initial camera parameters refer to the camera intrinsic parameters and camera extrinsic parameters of the visual camera, the camera intrinsic parameters include the focal length, principal point position, tangential distortion parameters and radial distortion parameters of the visual camera, and the camera extrinsic parameters include the position and posture of the camera in the world coordinate system, such as translation vector, quaternion, rotation matrix and translation vector, etc.; the production machine tool refers to a machine tool for producing drill bits of various specifications, and the real-time machine tool image is an image obtained by real-time shooting of the production machine tool by the visual camera.
[0097] In the embodiment of the present invention, refer to Figure 2 As shown, the real-time detection module 101 performs initial calibration on the visual camera using a preset calibration plate to obtain initial camera parameters, including:
[0098] S21, obtaining a calibration image set of a preset calibration plate captured by a visual camera;
[0099] S22, performing corner feature detection on the calibration image set to obtain a calibration corner feature set;
[0100] S23, obtaining the corner point coordinate parameters of the calibration plate, and performing spatial coordinate calibration on the calibration corner point feature set according to the corner point coordinate parameters to obtain a corner point feature coordinate set;
[0101] S24, performing homography mapping on the corner point feature coordinate set to obtain a corner point homography matrix set;
[0102] S25, performing parameter decomposition and least squares optimization on the corner point homography matrix set to obtain camera intrinsic parameters;
[0103] S26, performing linear coordinate matching and singular value decomposition operations on the corner point feature coordinate set according to the camera intrinsic parameters to obtain camera extrinsic parameters;
[0104] S27. Generate initial camera parameters according to the camera intrinsic parameters and the camera extrinsic parameters.
[0105] In detail, each calibration image in the calibration image set is an image obtained by photographing the calibration plate by the visual camera at different positions and angles, and the calibration image includes an image of the entire calibration plate.
[0106] Specifically, corner feature detection can be performed using methods such as Harris corner detection, Shi-Tomasi corner detection or FAST corner detection. Each calibration corner feature in the calibration corner feature set corresponds to a feature point at an obvious position such as a corner or edge of a calibration image in the standard image set and the corresponding pixel coordinates.
[0107] In detail, the corner point coordinate parameters refer to the coordinate parameters of the corresponding corner points on the calibration plate in the world coordinate system. The spatial coordinate calibration refers to determining the position coordinates of the corner points corresponding to each calibration corner point feature in the calibration corner point feature set in the world coordinate system. The coordinate calibration can be performed using a mapping method.
[0108] Specifically, the homography mapping refers to calculating the homography matrix corresponding to the corner point feature coordinate set using the homography relationship, and collecting the corresponding homography matrices as corner point homography matrices into a corner point homography matrix set, wherein the corner point homography matrix describes the mapping relationship between the corner point features of the world coordinate system to the corner point features of the pixel coordinate system, and is a representation of the camera intrinsic parameters of the visual camera.
[0109] In detail, the singular value decomposition method can be used for parameter decomposition, the least squares optimization refers to the use of the least squares method for parameter optimization, the EPnP method can be used for linear coordinate matching, the linear coordinate matching refers to generating an algebraic equation between the corner feature coordinates of the visual camera and the posture relationship of the visual camera based on the relationship between the camera intrinsic parameters and the corner feature coordinate set, and the singular value decomposition operation refers to the use of the singular value decomposition method for parameter decomposition.
[0110] In an embodiment of the present invention, the real-time detection module 101 can obtain the camera intrinsic parameters and camera extrinsic parameters of the visual camera by performing initial calibration on the visual camera using a preset calibration plate, thereby facilitating the correction of subsequent real-time machine tool images, improving the accuracy of subsequent position calculations, and facilitating the calculation of various position parameters of the production machine tools in the real-time machine tool images.
[0111] The balance correction module 102 is used to perform calibration phase correction and visual balance correction on the real-time machine tool image using the initial camera parameters to obtain a corrected machine tool image.
[0112] In the embodiment of the present invention, the real-time machine tool image will be deformed due to the curvature of the lens of the visual camera, so it is necessary to perform calibration phase correction on it, and the plane where the production machine tool is located may not coincide with the plane where the calibration plate is located, so it is necessary to perform visual balance correction on the real-time machine tool image, and the corrected machine tool image refers to the real-time machine tool image after eliminating the mirror curvature error and the visual plane balance error.
[0113] In the embodiment of the present invention, refer to Figure 3 As shown, the balance correction module 102 performs calibration phase correction and visual balance correction on the real-time machine tool image using the initial camera parameters to obtain a corrected machine tool image, including:
[0114] S31, extracting camera intrinsic parameters and camera extrinsic parameters from the initial camera parameters;
[0115] S32, performing radial image distance correction on the camera internal parameter to obtain a corrected internal parameter;
[0116] S33, performing tangential phase correction on the real-time machine tool image using the correction internal reference to obtain a primary correction image;
[0117] S34, performing homogeneous coordinate system balancing on the primary calibration image according to the calibration intrinsic parameters and the camera extrinsic parameters to obtain a calibrated machine tool image.
[0118] In detail, the performing radial image distance correction on the camera internal parameter to obtain the corrected internal parameter includes:
[0119] Extracting radial distortion parameters and initial image distance from the camera intrinsic parameters;
[0120] Performing radial image distance correction on the initial image distance using the radial distortion parameter to obtain a corrected image distance;
[0121] The corrected image distance is used to update the initial image distance in the camera intrinsic parameter to obtain the corrected intrinsic parameter.
[0122] Specifically, the corrected image distance is calculated using the following radial distortion correction algorithm:
[0123] r1=r(1+k1r 2 +k2r 4 )
[0124] Wherein, r1 is the corrected image distance, r is the initial image distance, and k1 and k2 are the radial distortion parameters.
[0125] Specifically, the non-ideal shape of the lens of the visual image distance will cause the positional relationship between the pixels near the center of the image and the pixels at the edge of the image to change. The radial distortion correction algorithm can modify and correct the image distance according to the radial distortion parameters, so that the pixel position near the center of the image is adjusted, thereby achieving distortion correction.
[0126] Specifically, the balance correction module 102 performs tangential phase correction on the real-time machine tool image using the correction internal parameter to obtain a primary correction image, including:
[0127] Extracting tangential distortion parameters and corrected image distance from the corrected internal parameters;
[0128] Selecting pixels in the real-time machine tool image one by one as target real-time pixels, and performing tangential phase correction on the target real-time pixels using the tangential distortion parameter and the corrected image distance to obtain target primary pixels;
[0129] Pixel splicing is performed on target primary pixels corresponding to all target real-time pixels in the real-time machine tool image to obtain a primary corrected image.
[0130] Specifically, the target primary pixel is calculated using the following tangential distortion correction algorithm:
[0131]
[0132]
[0133] Among them, x1 is the horizontal coordinate of the target primary pixel, x is the horizontal coordinate of the target real-time pixel, p1 and p2 are the tangential distortion parameters, y is the vertical coordinate of the target real-time pixel, r1 is the corrected image distance, and y1 is the vertical coordinate of the target primary pixel.
[0134] In detail, the offset of the lens installation position and angle of the visual camera may cause the straight lines in the real-time machine tool image captured to bend or distort in a direction parallel to the edge of the image. The tangential distortion correction algorithm can adjust the position of the pixel points according to the tangential distortion parameters and the correction image distance, thereby reducing or eliminating the tangential distortion in the image.
[0135] In the embodiment of the present invention, the balancing and correction module 102 performs homogeneous coordinate system balancing on the primary correction image according to the correction intrinsic parameter and the camera extrinsic parameter to obtain a correction machine tool image, including:
[0136] Performing axial positioning on the primary correction image according to the camera extrinsic parameters to obtain an axial intersection point;
[0137] Selecting pixels in the primary corrected image one by one as target primary pixels, and performing coordinate system balancing on the target primary pixels using the correction intrinsic parameters, the axial intersection points, and the camera extrinsic parameters to obtain target corrected pixels;
[0138] Pixel splicing is performed on target correction pixels corresponding to all target primary pixels in the primary correction image to obtain a correction machine tool image.
[0139] In detail, the target correction pixel is calculated using the following homogenization balance algorithm:
[0140]
[0141]
[0142]
[0143]
[0144]
[0145]
[0146]
[0147]
[0148]
[0149] in,
[0150]
[0151] Among them, x2 is the horizontal coordinate of the target correction pixel in the world coordinate system, y2 is the vertical coordinate of the target correction pixel in the world coordinate system, x1 is the horizontal coordinate of the target primary pixel, x is the horizontal coordinate of the target real-time pixel, j1 is the horizontal axis focal length in the correction intrinsic parameter, j2 is the vertical axis focal length in the correction intrinsic parameter, S is the rotation matrix in the camera extrinsic parameter, T is the translation vector in the camera extrinsic parameter, c1 is the horizontal coordinate of the axial intersection point, and c2 is the vertical coordinate of the axial intersection point.
[0152] Specifically, axial positioning can be performed according to the translation vector and quaternion in the camera extrinsic parameters. The axial positioning refers to calculating the coordinate position of the intersection of the optical axis of the visual camera and the production machine tool in the primary correction image. The axial intersection point is the pixel point corresponding to the optical axis of the visual camera and the corner point of the production machine tool in the primary correction image. The rotation matrix is a matrix that describes the rotation relationship of the camera coordinate system relative to the world coordinate system. The translation vector is a vector that describes the translation amount of the camera relative to the origin of the world coordinate system, where t1, t2 and t3 are the translation amounts of the horizontal axis, vertical axis and longitudinal axis respectively.
[0153] In detail, when the plane where the production machine tool is located does not coincide with the plane where the calibration plate of the visual camera is located, the corrected primary correction image will be deformed relative to the real object, and there is a problem of inconsistency between the pixel coordinate system and the world coordinate system. The homogenized balancing algorithm can correct the offset of the production machine tool and update the coordinate system to the world coordinate system of the plane where the production machine tool is located, thereby facilitating subsequent distance measurement.
[0154] In an embodiment of the present invention, by using the balance correction module to perform calibration phase correction and visual balance correction, the lens distortion and visual balance error of the visual camera can be eliminated, the measurement accuracy can be improved, and the world coordinate system transformation of the production machine tool in the correction machine tool image can be realized, thereby facilitating subsequent distance measurement.
[0155] The fitting compensation module 103 is used to perform expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image.
[0156] Specifically, the details of the calibrated machine tool image are poor, and the edges may be blurred due to reflections and other phenomena. In this case, the accuracy of tool angle analysis or tool gap detection is low. Therefore, sub-pixel contour fitting is required to achieve image refinement and contour positioning, and to reduce errors caused by reflections and other phenomena through expansion illumination compensation.
[0157] In the embodiment of the present invention, the fitting compensation module 103 performs expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image, including:
[0158] Performing histogram illumination estimation on the corrected machine tool image to obtain image illumination information;
[0159] Performing a lighting equalization operation on the corrected machine tool image according to the image lighting information to obtain a compensated machine tool image;
[0160] Performing an image opening operation on the compensated machine tool image to obtain a smoothed machine tool image;
[0161] Using the smoothed machine tool image to perform pixel difference calculation and edge threshold extraction operation on the compensated machine tool image to obtain a primary machine tool profile;
[0162] Extracting curvature features of the primary machine tool profile to obtain profile curvature features;
[0163] Performing normal vector extreme value screening on the contour curvature feature to obtain a contour normal vector;
[0164] Performing sub-pixel fitting on the primary machine tool profile according to the profile curvature feature and the profile normal vector to obtain a standard machine tool profile;
[0165] The corrected machine tool image is updated to a standard machine tool image using the standard machine tool profile.
[0166] In detail, the histogram illumination estimation refers to analyzing the brightness and color information in the image using the image histogram method to estimate the illumination conditions of the image, wherein the image illumination information includes information such as illumination intensity, illumination distribution, and illumination direction, and the illumination equalization refers to equalizing the illumination and brightness of the correction machine tool image using the histogram equalization or gamma correction method.
[0167] Specifically, the opening operation refers to performing erosion and dilation operations on the image in sequence, and the pixel difference operation refers to performing grayscale value difference calculation on corresponding pixel points in the compensated machine tool image and the smoothed machine tool image point by point.
[0168] Specifically, the Hessian matrix can be used to extract the contour curvature feature, which includes the partial derivative data of each pixel point in the primary machine tool contour. The normal vector extreme value screening refers to taking the feature with the largest eigenvalue in the curvature features of each pixel point in the primary machine tool contour as the normal vector of the pixel point, and aggregating the normal vectors of all pixel points in the primary machine tool contour into the machine tool contour feature.
[0169] In detail, the fitting compensation module 103 performs sub-pixel fitting on the primary machine tool profile according to the profile curvature feature and the profile normal vector to obtain a standard machine tool profile, including:
[0170] Selecting pixel points in the primary machine tool contour one by one as target contour pixels, and using the normal vector corresponding to the target contour pixel in the contour normal vector as the target pixel normal vector;
[0171] Performing sub-pixel operations on the target contour pixel using the target pixel normal vector and the contour curvature feature to obtain primary contour sub-pixels;
[0172] Aggregating primary contour sub-pixels of all target contour pixels in the primary machine tool contour into a primary contour sub-pixel group;
[0173] Performing edge threshold screening on the primary contour sub-pixel group to obtain a standard contour sub-pixel group;
[0174] The standard contour sub-pixel group is pixel-joined to obtain a standard machine tool contour.
[0175] Specifically, the primary contour sub-pixel is calculated using the following sub-pixel deviation algorithm:
[0176]
[0177]
[0178] Wherein, x4 is the horizontal coordinate of the primary contour subpixel, x3 is the horizontal coordinate of the target contour pixel, and e x is the lateral component of the target pixel normal vector, e y is the longitudinal component of the target pixel normal vector, f' x is the first-order lateral partial derivative of the contour curvature feature to the target contour pixel, f' y is the first-order longitudinal partial derivative of the target contour pixel in the contour curvature feature, f” xx is the second-order lateral partial derivative of the target contour pixel in the contour curvature feature, f” xy The second-order mixed partial derivative of the target contour pixel in the contour curvature feature, f”yy is the second-order longitudinal partial derivative of the target contour pixel in the contour curvature feature, y4 is the ordinate of the primary contour sub-pixel, and y3 is the ordinate of the target contour pixel.
[0179] In detail, the sub-pixel deviation value algorithm can realize sub-pixel extreme point analysis according to the local morphological characteristics of each pixel point in the primary machine tool contour, thereby improving the accuracy of machine tool positioning. The edge threshold screening refers to determining one by one whether the primary contour sub-pixels in the primary contour sub-pixel group are within the sub-pixel threshold area of the corresponding target contour pixel. If so, the primary contour sub-pixel is added as a standard contour sub-pixel to the standard contour sub-pixel group.
[0180] In an embodiment of the present invention, the fitting compensation module 103 can reduce image blur caused by uneven lighting or reflection and improve the details of the production machine tool contour part in the correction machine tool image by performing expansion lighting compensation and sub-pixel contour fitting on the correction machine tool image, thereby improving the accuracy of subsequent control.
[0181] The tool angle subdivision module 104 is used to perform tool and drill calibration detection on the standard machine tool image to obtain a calibrated machine tool image, and perform tool angle subdivision detection on the calibrated machine tool image to obtain a tool angle.
[0182] Specifically, in order to achieve precise machining control of machine tools, it is necessary to understand the rotation angles of each cutting edge of the machining tool in real time, so the tool angle needs to be calculated. The tool and drill calibration detection refers to detecting the tool and drill bit in the standard machine tool image, and calibrating the contours of the detected tool and drill bit to obtain the tool contour and drill bit contour. The trained convolutional neural network model or YOLOv5 model can be used for tool and drill calibration detection.
[0183] In detail, the tool angle refers to the angle of each cutting edge angle of the machining tool of the production machine tool relative to the plane where the production machine tool is located.
[0184] In the embodiment of the present invention, the tool angle subdivision module 104 performs tool angle subdivision detection on the calibrated machine tool image to obtain the tool angle, including:
[0185] Performing tool segmentation on the calibrated machine tool image to obtain a tool block;
[0186] Performing geometric feature analysis on the tool block to obtain tool geometric features;
[0187] Positioning the cutting edge of the cutting tool block according to the cutting tool geometric features to obtain a cutting tool block group;
[0188] Performing region growing segmentation and curve profile fitting on the tool edge block group to obtain a fitted edge profile group;
[0189] The slope angle analysis is performed on the fitting blade profile group to obtain the tool angle.
[0190] In detail, the tool segmentation refers to segmenting the calibration machine tool image according to the tool contour obtained by the tool-drill calibration detection, and the tool block is an image of the tool part in the calibration machine tool image.
[0191] Specifically, the geometric feature analysis refers to extracting features such as sharp corners or edges of the machine tool tool block using methods such as curvature feature detection, and the tool geometric features include features such as edge slopes and angles of the tool block.
[0192] Specifically, the blade positioning refers to detecting the position data of the blades such as the main and secondary cutting edges corresponding to the tool block according to the local protrusion or local depression phenomenon of the tool geometric characteristics, and performing image cropping according to the position data to obtain the tool blade block, and all the tool blade blocks are gathered into a tool blade block group. The region growing segmentation refers to using the region growing method to segment the blade bevel of each tool blade block in the tool blade block group, so as to facilitate the detection of the tool blade angle. The curve contour fitting method can be a polynomial fitting method or a Bezier curve fitting method.
[0193] In detail, the slope angle analysis refers to calculating the corresponding tool angle according to the slope of each fitting blade profile in the fitting blade profile group or the angle between the blades, and the tool angle includes the angle between the main and secondary cutting edges relative to the machine tool plane.
[0194] In the embodiment of the present invention, the tool angle subdivision module 104 can identify and calibrate the positions of the machining tools and drill bits of the production machine tools by performing tool and drill calibration detection. By performing tool angle subdivision detection, the angles of each cutting edge of the machining tool can be extracted according to the positioning of the world coordinate system, thereby facilitating subsequent precise control of the machine tool.
[0195] The real-time control module 105 is used to perform step tool setting detection on the calibration machine tool image to obtain a tool setting gap, and perform real-time fine-tuning control on the production machine tool according to the tool setting gap and the tool angle.
[0196] In detail, in order to achieve precise machining control of the machine tool, it is necessary to understand the position distance between the machining tool and the drill bit being machined in real time, so it is necessary to calculate the tool clearance, which refers to the relative position distance between the machining tool and the drill bit being machined.
[0197] In the embodiment of the present invention, the real-time control module 105 performs step tool setting detection on the calibrated machine tool image to obtain the tool setting gap, including:
[0198] Performing tool-drill segmentation on the calibrated machine tool image to obtain a tool block and a drill block;
[0199] Performing region growing segmentation and tool curve fitting on the tool block to obtain a fitted tool contour;
[0200] Performing step edge extraction and drill bit curve fitting on the drill bit block to obtain a fitted drill bit profile;
[0201] Performing vertical projection on the fitted tool profile to obtain a tool profile projection;
[0202] Performing vertical projection on the fitted drill bit profile to obtain a drill bit profile projection;
[0203] The distance between the tool contour projection and the drill bit contour projection is measured to obtain a tool clearance.
[0204] Specifically, the step edge extraction refers to finding the change point of the grayscale change of the drill bit block using the first-order or second-order derivative method, and using it as the primary drill bit contour. The step edge extraction can further refine the edge contour, thereby better fitting the complex and changeable drill bit contours of drill bits of multiple specifications.
[0205] In detail, the drill curve fitting and the tool curve fitting method can be a polynomial fitting method or a Bezier curve fitting method, and the vertical projection refers to projecting the fitted tool contour or the fitted drill contour to the corresponding axis vector or axis plane of the world coordinate system. The vertical projection can achieve contour dimensionality reduction, thereby more conveniently calculating the tool clearance.
[0206] Specifically, the real-time control module 105 performs real-time fine-tuning control on the production machine tool according to the tool clearance and the tool angle, including:
[0207] Acquiring CNC tool setting data and CNC tool offset data of the production machine tool;
[0208] Extracting drill bit position coordinates and tool coordinate origin from the CNC tool setting data;
[0209] Using the tool clearance and the tool coordinate origin to perform a reference offset update on the drill position coordinates to obtain a real-time drill position;
[0210] Calculating the angle difference of the numerical control tool deviation data using the tool angle to obtain the tool angle offset;
[0211] The tool angle offset is used to perform servo rotation correction on the production machine tool, and the real-time drill position is used to perform workpiece displacement correction on the production machine tool.
[0212] In detail, the CNC tool setting data refers to the real-time tool setting clearance related data recorded in the CNC system of the production machine tool, including drill position coordinates and tool coordinate origin, wherein the drill position coordinates refer to the CNC position coordinates of the drill to be processed determined by the CNC system, and the tool coordinate origin refers to the origin position coordinates of the processing tool in the CNC system.
[0213] Specifically, the reference offset update refers to recalculating the real-time position of the drill to be processed based on the position of the tool coordinate origin and the tool clearance. Since the processing tool and the drill are aligned, the real-time drill position can be obtained by simply adding the tool clearance to the axial basis of the tool coordinate origin.
[0214] In detail, the tool angle offset refers to the offset angle of each cutting edge angle in the tool angle and each cutting edge angle in the CNC blade data, the servo rotation correction refers to the rotation of the machining tool at a fixed angle using the servo, and the workpiece displacement correction refers to the use of the real-time drill position to update the drill position in the CNC system.
[0215] In the embodiment of the present invention, by utilizing the real-time control module 105 to perform step tool setting detection and obtain the tool setting clearance, the edge profile of the machining tool and the drill bit can be further refined to achieve accurate detection of the tool setting clearance. By performing real-time fine-tuning control, real-time machining feedback can be achieved, thereby improving the accuracy of machine tool control.
[0216] The present invention uses a preset calibration plate to perform initial calibration on the visual camera, and can obtain the camera intrinsic parameters and camera extrinsic parameters of the visual camera, so as to facilitate the correction of subsequent real-time machine tool images, improve the accuracy of subsequent position calculations, and facilitate the calculation of various position parameters of the production machine tool in the real-time machine tool image. By using the balance correction module to perform calibration phase correction and visual balance correction, the lens distortion and visual balance error of the visual camera can be eliminated, the measurement accuracy can be improved, and the world coordinate system transformation of the production machine tool in the correction machine tool image can be realized, so as to facilitate subsequent distance measurement. By performing expansion illumination compensation and sub-pixel contour fitting on the correction machine tool image, image blur caused by uneven illumination or reflection can be reduced, and the details of the contour part of the production machine tool in the correction machine tool image can be improved, thereby improving the accuracy of subsequent control.
[0217] By performing tool-drill calibration detection, the positions of the processing tools and drill bits of the production machine tools can be identified and calibrated. By performing tool angle subdivision detection, the angles of each cutting edge of the processing tool can be extracted according to the positioning of the world coordinate system, thereby facilitating the subsequent precise control of the machine tool. By performing step tool setting detection, the tool setting clearance can be obtained, and the edge profile of the processing tool and drill bit can be further refined to achieve precise detection of the tool setting clearance. By performing real-time fine-tuning control, real-time processing feedback can be achieved, thereby improving the accuracy of machine tool control. Therefore, the precise control system for multi-specification drill bit production machine tools proposed by the present invention can solve the problem of low accuracy when performing machine tool production control.
[0218] Reference Figure 4 FIG. 1 is a flow chart of a method for accurately controlling a multi-specification drill bit production machine tool provided by an embodiment of the present invention. In this embodiment, the method for accurately controlling a multi-specification drill bit production machine tool includes:
[0219] S1. Performing an initial calibration on a visual camera using a preset calibration plate to obtain initial camera parameters, and acquiring a real-time machine tool image of the production machine tool taken by the visual camera;
[0220] S2, using the initial camera parameters to perform calibration phase correction and visual balance correction on the real-time machine tool image to obtain a corrected machine tool image;
[0221] S3, used to perform expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image;
[0222] S4, performing tool and drill calibration detection on the standard machine tool image to obtain a calibrated machine tool image, performing tool angle subdivision detection on the calibrated machine tool image to obtain a tool angle;
[0223] S5. Perform step tool setting detection on the calibrated machine tool image to obtain a tool setting gap, and perform real-time fine-tuning control on the production machine tool according to the tool setting gap and the tool angle.
[0224] In detail, the precise control method for the multi-specification drill production machine tool described in the embodiment of the present invention is used in the same manner as described above. Figure 1 The same technical means are used as the precise control system of the multi-specification drill production machine tool described in, and can produce the same technical effects, so I will not go into details here.
[0225] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0226] Performing an initial calibration on the visual camera using a preset calibration plate to obtain initial camera parameters, and acquiring a real-time machine tool image of the production machine tool taken by the visual camera;
[0227] Using the initial camera parameters, calibrate the real-time machine tool image for phase correction and visual balance correction to obtain a corrected machine tool image;
[0228] Used to perform expansion illumination compensation and sub-pixel contour fitting on the calibrated machine tool image to obtain a standard machine tool image;
[0229] Used to perform tool and drill calibration detection on the standard machine tool image to obtain a calibrated machine tool image, and perform tool angle subdivision detection on the calibrated machine tool image to obtain a tool angle;
[0230] A step tool setting detection is performed on the calibrated machine tool image to obtain a tool setting gap, and real-time fine-tuning control is performed on the production machine tool according to the tool setting gap and the tool angle.
[0231] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and systems can be implemented in other ways. For example, the system embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0232] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0233] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0234] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0235] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.
[0236] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, system, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0237] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or systems stated in the system embodiment can also be implemented by one unit or system through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any specific order.
[0238] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A precision control system for a multi-specification drill production machine tool, characterized in that: The system includes a real-time detection module, a balance correction module, a fitting compensation module, a knife angle subdivision module and a real-time control module, wherein: The real-time detection module is used to perform initial calibration on the visual camera using a preset calibration plate, obtain initial camera parameters, and obtain a real-time machine tool image of the production machine tool taken by the visual camera; The balance correction module is used to perform calibration phase correction and visual balance correction on the real-time machine tool image using the initial camera parameters to obtain a corrected machine tool image; The fitting compensation module is used to perform expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image; The tool angle subdivision module is used to perform tool and drill calibration detection on the standard machine tool image to obtain a calibrated machine tool image, and perform tool angle subdivision detection on the calibrated machine tool image to obtain a tool angle; The real-time control module is used to perform step tool setting detection on the calibration machine tool image to obtain the tool setting gap, and perform real-time fine-tuning control on the production machine tool according to the tool setting gap and the tool angle. The real-time control module performs real-time fine-tuning control on the production machine tool according to the tool setting gap and the tool angle, including: acquiring CNC tool setting data and CNC tool offset data of the production machine tool; extracting drill position coordinates and tool coordinate origin from the CNC tool setting data; performing a reference offset update on the drill position coordinates using the tool setting gap and the tool coordinate origin to obtain a real-time drill position; performing an angle difference calculation on the CNC tool offset data using the tool angle to obtain a tool angle offset; performing servo rotation correction on the production machine tool using the tool angle offset, and performing workpiece displacement correction on the production machine tool using the real-time drill position.
2. The precision control system for a multi-specification drill bit production machine tool as claimed in claim 1, characterized in that: The real-time detection module performs initial calibration on the visual camera using a preset calibration plate to obtain initial camera parameters, including: Obtain a calibration image set of a preset calibration plate captured by a visual camera; Performing corner feature detection on the calibration image set to obtain a calibration corner feature set; Acquire the corner point coordinate parameters of the calibration plate, and perform spatial coordinate calibration on the calibration corner point feature set according to the corner point coordinate parameters to obtain a corner point feature coordinate set; Performing homography mapping on the corner point feature coordinate set to obtain a corner point homography matrix set; Performing parameter decomposition and least squares optimization on the corner point homography matrix set to obtain camera intrinsic parameters; Performing linear algebra coordinate matching and singular value decomposition operations on the corner point feature coordinate set according to the camera intrinsic parameters to obtain camera extrinsic parameters; Initial camera parameters are generated according to the camera intrinsic parameters and the camera extrinsic parameters.
3. The precision control system for a multi-specification drill bit production machine tool as claimed in claim 1, characterized in that: The balance correction module performs calibration phase correction and visual balance correction on the real-time machine tool image using the initial camera parameters to obtain a corrected machine tool image, including: Extracting camera intrinsic parameters and camera extrinsic parameters from the initial camera parameters; Performing radial image distance correction on the camera internal parameter to obtain a corrected internal parameter; Performing tangential phase correction on the real-time machine tool image using the correction internal reference to obtain a primary correction image; Performing axial positioning on the primary correction image according to the camera extrinsic parameters to obtain an axial intersection point; Selecting pixels in the primary corrected image one by one as target primary pixels, performing coordinate system balancing on the target primary pixels according to the correction intrinsic parameters, the axial intersection points and the camera extrinsic parameters, to obtain target corrected pixels; Pixel splicing is performed on target correction pixels corresponding to all target primary pixels in the primary correction image to obtain a correction machine tool image.
4. The precision control system for a multi-specification drill bit production machine tool as claimed in claim 1, characterized in that: The fitting compensation module performs expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image, including: Performing histogram illumination estimation on the corrected machine tool image to obtain image illumination information; Performing a lighting equalization operation on the corrected machine tool image according to the image lighting information to obtain a compensated machine tool image; Performing an image opening operation on the compensated machine tool image to obtain a smoothed machine tool image; Using the smoothed machine tool image to perform pixel difference calculation and edge threshold extraction operation on the compensated machine tool image to obtain a primary machine tool profile; Extracting curvature features of the primary machine tool profile to obtain profile curvature features; Performing normal vector extreme value screening on the contour curvature feature to obtain a contour normal vector; Performing sub-pixel fitting on the primary machine tool profile according to the profile curvature feature and the profile normal vector to obtain a standard machine tool profile; The corrected machine tool image is updated to a standard machine tool image using the standard machine tool profile.
5. The precision control system for a multi-specification drill bit production machine tool as claimed in claim 4, characterized in that: The fitting compensation module performs sub-pixel fitting on the primary machine tool profile according to the profile curvature feature and the profile normal vector to obtain a standard machine tool profile, including: Selecting pixel points in the primary machine tool contour one by one as target contour pixels, and using the normal vector corresponding to the target contour pixel in the contour normal vector as the target pixel normal vector; The following sub-pixel deviation algorithm is used to perform sub-pixel operations on the target contour pixel according to the target pixel normal vector and the contour curvature feature to obtain primary contour sub-pixels: Wherein, x4 is the horizontal coordinate of the primary contour subpixel, x3 is the horizontal coordinate of the target contour pixel, and e x is the lateral component of the target pixel normal vector, e y is the longitudinal component of the target pixel normal vector, f ′ x is the first-order lateral partial derivative of the contour curvature feature with respect to the target contour pixel, f ′ y is the first-order longitudinal partial derivative of the target contour pixel in the contour curvature feature, f ′ x ′ x is the second-order lateral partial derivative of the target contour pixel in the contour curvature feature, f ′ x ′ y The second-order mixed partial derivative of the target contour pixel in the contour curvature feature, f ′ y ′ y is the second-order longitudinal partial derivative of the target contour pixel in the contour curvature feature, y4 is the ordinate of the primary contour sub-pixel, and y3 is the ordinate of the target contour pixel; Aggregating primary contour sub-pixels of all target contour pixels in the primary machine tool contour into a primary contour sub-pixel group; Performing edge threshold screening on the primary contour sub-pixel group to obtain a standard contour sub-pixel group; The standard contour sub-pixel group is pixel-joined to obtain a standard machine tool contour.
6. The precision control system for a multi-specification drill bit production machine tool according to claim 1, characterized in that: The tool angle subdivision module performs tool angle subdivision detection on the calibrated machine tool image to obtain the tool angle, including: Performing tool segmentation on the calibrated machine tool image to obtain a tool block; Performing geometric feature analysis on the tool block to obtain tool geometric features; Positioning the cutting edge of the cutting tool block according to the cutting tool geometric features to obtain a cutting tool block group; Performing region growing segmentation and curve profile fitting on the tool edge block group to obtain a fitted edge profile group; The slope angle analysis is performed on the fitting blade profile group to obtain the tool angle.
7. The precision control system for a multi-specification drill bit production machine tool as claimed in claim 1, characterized in that: The real-time control module performs step tool setting detection on the calibrated machine tool image to obtain the tool setting clearance, including: Performing tool-drill segmentation on the calibrated machine tool image to obtain a tool block and a drill block; Performing region growing segmentation and tool curve fitting on the tool block to obtain a fitted tool contour; Performing step edge extraction and drill bit curve fitting on the drill bit block to obtain a fitted drill bit profile; Performing vertical projection on the fitted tool profile to obtain a tool profile projection; Performing vertical projection on the fitted drill bit profile to obtain a drill bit profile projection; The distance between the tool contour projection and the drill bit contour projection is measured to obtain a tool clearance.
8. A precise control method for a multi-specification drill bit production machine tool, characterized in that: The method comprises: Performing an initial calibration on the visual camera using a preset calibration plate to obtain initial camera parameters, and acquiring a real-time machine tool image of the production machine tool taken by the visual camera; Using the initial camera parameters, calibrate the real-time machine tool image for phase correction and visual balance correction to obtain a corrected machine tool image; Performing expansion illumination compensation and sub-pixel contour fitting on the corrected machine tool image to obtain a standard machine tool image; Performing tool and drill calibration detection on the standard machine tool image to obtain a calibrated machine tool image, and performing tool angle subdivision detection on the calibrated machine tool image to obtain a tool angle; Perform step tool setting detection on the calibration machine tool image to obtain a tool setting gap, and perform real-time fine-tuning control on the production machine tool according to the tool setting gap and the tool angle, wherein the real-time fine-tuning control on the production machine tool according to the tool setting gap and the tool angle includes: acquiring CNC tool setting data and CNC tool offset data of the production machine tool; extracting drill position coordinates and tool coordinate origin from the CNC tool setting data; performing a reference offset update on the drill position coordinates using the tool setting gap and the tool coordinate origin to obtain a real-time drill position; performing an angle difference calculation on the CNC tool offset data using the tool angle to obtain a tool angle offset; performing servo rotation correction on the production machine tool using the tool angle offset, and performing workpiece displacement correction on the production machine tool using the real-time drill position.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by the processor, the precise control method for a multi-specification drill bit production machine tool as described in claim 8 is implemented.
Citation Information
Patent Citations
Position correction device
CN105382629A
Machine tool setting method based on two-point gap
CN116880353A
Camera parameter calibration method and device, terminal equipment and storage medium
CN117576223A