Search

CN-121999175-A - Numerical control milling machine workpiece three-dimensional modeling method and system

CN121999175ACN 121999175 ACN121999175 ACN 121999175ACN-121999175-A

Abstract

The invention relates to the technical field of image processing, in particular to a three-dimensional modeling method and system for a workpiece of a numerical control milling machine. The method comprises the steps of clamping a workpiece on a numerical control milling machine, controlling the workpiece to rotate at a constant speed and synchronously feed axially, collecting a correction spiral image sequence and a tank bottom image sequence, performing space-time registration on the correction spiral image sequence and the tank bottom image sequence to extract modeling characteristic data of the workpiece, performing conversion from polar coordinates to rectangular coordinates based on the modeling characteristic data of the workpiece, resolving three-dimensional space coordinates and corresponding surface attribute values thereof to generate three-dimensional point cloud data of the workpiece, inputting the three-dimensional point cloud data of the workpiece into three-dimensional modeling software, and performing gridding processing and texture rendering to obtain a three-dimensional digital model of the workpiece. According to the invention, the workpiece is driven to execute self-adaptive tracking spiral motion so as to avoid visual shielding caused by dense threads, thereby realizing high-precision three-dimensional modeling of the small-helix-angle deep groove workpiece.

Inventors

  • ZHOU YONGZHI
  • ZHOU XIAOMIN
  • WANG CHUNHUI
  • ZHAN DEQIANG
  • YANG XIAODONG
  • ZHANG SHENGPING
  • Yi Yexiu
  • HE YUGANG
  • LI QIAO
  • PENG YIBIN

Assignees

  • 江西特种电机股份有限公司

Dates

Publication Date
20260508
Application Date
20260116

Claims (10)

  1. 1. The three-dimensional modeling method for the workpiece of the numerical control milling machine is characterized by comprising the following steps of: step S1, clamping a workpiece on a numerical control milling machine, controlling the workpiece to rotate at a constant speed and synchronously carrying out axial feeding, and acquiring surface images along a spiral unfolding path by an industrial camera to obtain an initial spiral image sequence; S2, calculating the deviation between an actual spiral path and a theoretical path according to the initial spiral image sequence, correcting the linkage control parameters of the numerical control milling machine by using the corresponding deviation to drive the workpiece to execute secondary precession movement, and synchronously acquiring and correcting the spiral image sequence and the groove bottom image sequence in the secondary precession process; s3, acquiring the motion position of the numerical control milling machine in the precession process, and performing space-time registration on the correction spiral image sequence and the groove bottom image sequence to extract modeling characteristic data of the workpiece; S4, converting polar coordinates into rectangular coordinates based on the workpiece modeling characteristic data, resolving three-dimensional space coordinates and corresponding surface attribute values thereof, and generating workpiece three-dimensional point cloud data; And S5, inputting the three-dimensional point cloud data of the workpiece into three-dimensional modeling software, and obtaining a three-dimensional digital model of the workpiece through gridding processing and texture rendering.
  2. 2. The method of three-dimensional modeling of a workpiece in a numerically controlled milling machine according to claim 1, wherein controlling the workpiece to rotate at a constant speed and to feed axially synchronously in step S1 comprises: obtaining a theoretical lead value of a workpiece and the diameter of the workpiece; calculating a theoretical axial feed corresponding to each rotation of the workpiece according to the theoretical lead value; Inputting the theoretical axial feed amount into a linkage control unit of the numerical control milling machine, and generating a control instruction for synchronously moving the rotating shaft and the translation shaft according to a fixed proportion as a first control instruction; and controlling the workpiece to rotate at a constant speed and synchronously axially feed based on the first control instruction.
  3. 3. The method of claim 1, wherein correcting the coordinated control parameters of the numerically controlled milling machine to drive the workpiece to perform the secondary precession motion using the corresponding deviation in step S2 comprises: In each frame of image of the initial spiral image sequence, gray scanning is carried out along the extending direction of the spiral groove, gray peak points are identified, and two adjacent peak points are defined as a screw tooth period; calculating the actual lead angle of each screw tooth period to determine the linkage proportion compensation quantity; The first control command is subjected to control command adjustment through the linkage proportion compensation quantity, and a corrected second control command is obtained; Updating the second control instruction to a linkage control unit of the numerical control milling machine, and driving the workpiece to move according to the corrected track.
  4. 4. The method of three-dimensional modeling of a numerically controlled milling machine workpiece according to claim 1, wherein the step S3 of obtaining the motion position of the numerically controlled milling machine during the precession process and performing the spatiotemporal registration of the correction helix image sequence and the groove bottom image sequence comprises: in the secondary precession process, a double-side line laser is utilized to project the bottom of a spiral groove of a workpiece to synchronously obtain a groove bottom image sequence; Generating a first index comprising a rotation angle and an axial position for each frame of image in the corrected spiral image sequence according to real-time reading fed back by a rotation shaft encoder and a translation shaft encoder of the numerical control milling machine at each frame of image acquisition time, and generating a corresponding second index for each frame of image in the groove bottom image sequence; and matching the spiral image with the first index consistent with the second index with the tank bottom enhanced image to serve as an image pair to be fused.
  5. 5. The method for three-dimensional modeling of a workpiece in a numerically controlled milling machine according to claim 1, wherein in step S3, the motion position of the numerically controlled milling machine in the precession process is obtained, and the correction spiral image sequence and the groove bottom image sequence are spatially-temporally registered, further comprising: Constructing a cylindrical unfolding mapping space of the workpiece, wherein the horizontal axis coordinate of the space is defined as the unfolding length of the rotation phase of the workpiece, and the vertical axis coordinate is defined as the axial feeding position of the workpiece; Extracting a first index in an image pair to be fused, and calculating a texture projection area of each frame of spiral image in a cylindrical unfolding mapping space by combining internal and external calibration parameters of an industrial camera; Aiming at overlapped pixels in the texture projection area, calculating an included angle between the line of sight of the pixel point in imaging and the normal line of the surface of the workpiece, selecting a pixel value with the smallest included angle, and filling the pixel value into a cylindrical unfolding mapping space to form spiral texture distribution data; And identifying the center position of the light bar of the enhanced image at the middle groove bottom of the image to be fused, converting the light bar into a radial depth value, and mapping the radial depth value to a cylindrical unfolding mapping space according to a second index to form spiral depth topological data.
  6. 6. The method according to claim 5, wherein in step S3, the motion position of the numerically controlled milling machine during the precession is obtained, and the corrected spiral image sequence and the groove bottom image sequence are spatially-temporally registered, and further comprising: the spiral depth topological data is subjected to second-order differential processing to solve local curvature extreme points, and curvature extreme points are screened and connected into a line to be fitted to obtain a geometric center line of the tank bottom; Extracting a spiral groove texture characteristic central line in the spiral texture distribution data, wherein the texture characteristic central line is determined based on a minimum value region of texture gray scale or a symmetry center of texture gradient; And intercepting sampling sections along the longitudinal axis of the cylindrical unfolding mapping space according to a preset step length, calculating the transverse distance difference between the geometric center line of the tank bottom and the center line of the texture feature on each sampling section, and counting the average value of the transverse distance differences of all the sampling sections as a phase offset.
  7. 7. The method of three-dimensional modeling of a workpiece in a numerically controlled milling machine according to claim 6, wherein extracting the workpiece modeling feature data in step S3 comprises: performing coordinate offset compensation on the horizontal axis coordinates of the spiral depth topology data in the cylindrical unfolded mapping space according to the phase offset, thereby obtaining registration depth topology data; Expanding the set width to two sides by taking the geometric center line of the groove bottom in the registration depth topology data as a reference to define the effective repair domain of the spiral groove; And traversing the pixel points in the effective repair domain of the spiral groove, detecting coordinate points with empty depth values in the registration depth topology data, and marking the coordinate points as depth vacancy pixel points.
  8. 8. The method of three-dimensional modeling of a workpiece in a numerically controlled milling machine according to claim 7, wherein extracting the workpiece modeling feature data in step S3 further comprises: performing interpolation repair operation on the depth vacancy pixel points, and integrating the interpolation repair operation with effective depth values in the registration depth topology data to obtain complete depth topology data; And correlating the complete depth topology data with texture gray values of corresponding coordinates in the spiral texture distribution data to construct workpiece modeling feature data comprising spatial position, depth geometric information and surface texture information.
  9. 9. The method of three-dimensional modeling of a workpiece in a numerically controlled milling machine according to claim 1, wherein step S4 comprises the steps of: s41, converting polar coordinates into rectangular coordinates based on workpiece modeling characteristic data, and calculating three-dimensional Cartesian space coordinates corresponding to each data point; and S42, extracting surface texture information in the workpiece modeling characteristic data, mapping the surface texture information into surface attribute values corresponding to three-dimensional Cartesian space coordinates, and generating workpiece three-dimensional point cloud data containing geometric positions and surface attributes.
  10. 10. A numerically controlled mill workpiece three-dimensional modeling system for performing the numerically controlled mill workpiece three-dimensional modeling method of claim 1, comprising: The workpiece pre-scanning module is used for clamping a workpiece on a numerical control milling machine, controlling the workpiece to rotate at a constant speed and synchronously perform axial feeding, and acquiring surface images along a spiral expanding path by an industrial camera to obtain an initial spiral image sequence; The image acquisition module is used for calculating the deviation between an actual spiral path and a theoretical path according to the initial spiral image sequence, correcting the linkage control parameter of the numerical control milling machine by utilizing the corresponding deviation so as to drive the workpiece to execute secondary precession movement, and synchronously acquiring and correcting the spiral image sequence and the groove bottom image sequence in the secondary precession process; The feature extraction module is used for acquiring the motion position of the numerical control milling machine in the precession process, and carrying out space-time registration on the correction spiral image sequence and the groove bottom image sequence so as to extract modeling feature data of the workpiece; The point cloud mapping module is used for converting the polar coordinates into rectangular coordinates of the workpiece modeling characteristic data, resolving the three-dimensional space coordinates and the corresponding surface attribute values thereof, and generating workpiece three-dimensional point cloud data; The three-dimensional modeling rendering module is used for inputting the three-dimensional point cloud data of the workpiece into three-dimensional modeling software, and obtaining a three-dimensional digital model of the workpiece through gridding processing and texture rendering.

Description

Numerical control milling machine workpiece three-dimensional modeling method and system Technical Field The invention relates to the technical field of image processing, in particular to a three-dimensional modeling method and system for a workpiece of a numerical control milling machine. Background The three-dimensional modeling technical characteristics of the spiral groove type workpiece (such as a ball screw, a worm and the like) in the numerical control machining field are mainly characterized in that the three-dimensional modeling technical characteristics are on the reduction precision and the integrity of continuous complex curved surfaces, length-diameter ratio structures and high-precision geometric parameters (such as screw pitches and lead angles). In the actual processing and detection process, the workpiece has continuous spiral groove structural characteristics, and is often accompanied by geometric characteristics of large length-diameter ratio and small helix angle (usually less than 15 degrees), and the structural factors cause that the difficult problems of trans-scale movement splicing, deep groove optical shielding, rotation and axial feeding matching and the like must be solved when the workpiece is subjected to three-dimensional reconstruction. However, the traditional three-dimensional modeling method is limited by an optical imaging principle, when a deep groove structure with a small helix angle is processed, an external light source is easily blocked by dense screw teeth, so that the bottom of the spiral groove is insufficient in illumination, large-area missing or excessive noise of groove bottom point cloud data is caused, the section profile cannot be completely reproduced, and the problems of overrun of measurement deviation of accumulated screw pitch errors and reconstruction distortion of the section profile of the spiral groove are caused. Disclosure of Invention Based on the above, the invention provides a three-dimensional modeling method and system for a workpiece of a numerically controlled milling machine, so as to solve at least one of the above technical problems. In order to achieve the purpose, the three-dimensional modeling method for the workpiece of the numerical control milling machine comprises the following steps: step S1, clamping a workpiece on a numerical control milling machine, controlling the workpiece to rotate at a constant speed and synchronously carrying out axial feeding, and acquiring surface images along a spiral unfolding path by an industrial camera to obtain an initial spiral image sequence; S2, calculating the deviation between an actual spiral path and a theoretical path according to the initial spiral image sequence, correcting the linkage control parameters of the numerical control milling machine by using the corresponding deviation to drive the workpiece to execute secondary precession movement, and synchronously acquiring and correcting the spiral image sequence and the groove bottom image sequence in the secondary precession process; s3, acquiring the motion position of the numerical control milling machine in the precession process, and performing space-time registration on the correction spiral image sequence and the groove bottom image sequence to extract modeling characteristic data of the workpiece; S4, converting polar coordinates into rectangular coordinates based on the workpiece modeling characteristic data, resolving three-dimensional space coordinates and corresponding surface attribute values thereof, and generating workpiece three-dimensional point cloud data; And S5, inputting the three-dimensional point cloud data of the workpiece into three-dimensional modeling software, and obtaining a three-dimensional digital model of the workpiece through gridding processing and texture rendering. The invention also provides a three-dimensional modeling system of the workpiece of the numerical control milling machine, which executes the three-dimensional modeling method of the workpiece of the numerical control milling machine, and comprises the following steps: The workpiece pre-scanning module is used for clamping a workpiece on a numerical control milling machine, controlling the workpiece to rotate at a constant speed and synchronously perform axial feeding, and acquiring surface images along a spiral expanding path by an industrial camera to obtain an initial spiral image sequence; The image acquisition module is used for calculating the deviation between an actual spiral path and a theoretical path according to the initial spiral image sequence, correcting the linkage control parameter of the numerical control milling machine by utilizing the corresponding deviation so as to drive the workpiece to execute secondary precession movement, and synchronously acquiring and correcting the spiral image sequence and the groove bottom image sequence in the secondary precession process; The feature extraction module is used for acquirin