Curved surface laser engraving method based on camera module and active light spot projection and related equipment
By using a camera module and active light spot projection, a three-dimensional image pair of the workpiece is acquired and a high-density point cloud data is constructed. This solves the problems of large error, low efficiency and insufficient accuracy in the acquisition of curvature information in the existing technology, and realizes efficient and accurate curved surface laser engraving.
Patent Information
- Application Number
- CN202511732856.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-24
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies suffer from large errors, low efficiency, and insufficient precision when acquiring curvature information of workpiece surfaces, especially in laser engraving of non-flat or free-form materials, making it difficult to meet the requirements for fine texture processing.
By using a camera module and active light spot projection, a stereoscopic image pair of the workpiece is obtained by projecting an active light spot and simultaneously capturing images with a camera. Parallax matching is then performed to generate high-density point cloud data, constructing a three-dimensional model of the workpiece surface, and mapping the two-dimensional design pattern onto the three-dimensional model to generate a laser engraving trajectory.
It achieves non-contact, high-efficiency sampling, improves sampling point density and engraving precision, avoids the influence of material color and reflectivity, simplifies the sampling process, and improves overall efficiency and accuracy.
Smart Images

Figure CN121551848A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of laser processing equipment and computer vision technology, and in particular to a curved surface laser engraving method and related equipment based on a camera module and active spot projection. Background Technology
[0002] In recent years, with the rise of personalized customization and flexible manufacturing, laser engraving has rapidly expanded from traditional flat marking to the processing of reliefs, textures, and logos on complex curved surfaces such as shoe uppers, automotive interiors, craft gifts, and consumer electronics casings.
[0003] When laser engraving on non-flat or free-form materials, it is necessary to first obtain the curvature information of the workpiece surface, and then adjust the laser focus and motion path in real time.
[0004] There are two main existing methods for obtaining curvature information of workpiece surfaces: The first approach involves using distance sensors (such as laser rangefinders or triangulation) to sample multiple points on the workpiece, followed by surface fitting to obtain the curvature information of the workpiece surface. This approach has the following drawbacks: ① It is greatly affected by material color and reflectivity; dark or highly reflective surfaces of the workpiece can lead to errors in the final fitted curvature information; ② It requires a three-stage process of offline sampling, fitting, and processing, resulting in low overall efficiency; ③ The sampling points are relatively sparse, which limits the fitting accuracy, making it difficult to meet the requirements of fine texture processing.
[0005] The second approach involves using a mechanical probe to perform multi-point contact sampling on the workpiece, followed by surface fitting to obtain the curvature information of the workpiece surface. This approach has the following drawbacks: ① It easily leaves indentations on soft materials during sampling; ② The mechanical probe contacts the workpiece surface point by point during sampling, resulting in low sampling efficiency; ③ The sampling points are relatively sparse, thus limiting the fitting accuracy; ④ Mechanical sampling requires contact with the workpiece, which is limited by the Z-axis travel and surface undulations, leading to interference problems. Summary of the Invention
[0006] The purpose of this application is to provide a curved surface laser engraving method and related equipment based on a camera module and active light spot projection, so as to at least solve the problems mentioned in the background art.
[0007] In a first aspect, this application provides a method for curved surface laser engraving based on a camera module and active spot projection. The method includes: controlling an active spot projection module to project an active spot onto the surface of a workpiece placed on the processing table of a laser engraving machine, and simultaneously controlling a camera module to capture images to obtain a pair of stereoscopic images of the workpiece; performing parallax matching processing on the stereoscopic image pair of the workpiece to obtain high-density point cloud data of the workpiece surface; constructing a three-dimensional model of the workpiece surface based on the high-density point cloud data; mapping a two-dimensional design pattern onto the three-dimensional model of the workpiece surface to generate a laser engraving trajectory including surface height compensation; and controlling the laser engraving machine to perform curved surface laser engraving on the workpiece according to the laser engraving trajectory.
[0008] In some embodiments, before controlling the active spot projection module to project an active spot onto the workpiece surface placed on the processing table of the laser engraving machine, and simultaneously controlling the camera module to capture a stereoscopic image of the workpiece, the method further includes: controlling the camera module to capture a calibration image, the calibration image including a calibration plate placed at the center of the laser engraving machine; calculating the camera intrinsic parameter matrix of the camera module based on the calibration image; and calculating the extrinsic parameter transformation matrix between the camera coordinate system of the camera module and the three-dimensional coordinate system of the laser engraving machine based on the camera intrinsic parameter matrix.
[0009] In some embodiments, while controlling the active spot projection module to project an active spot onto the workpiece surface placed on the processing table of the laser engraving machine, and simultaneously controlling the camera module to capture images, the grayscale distribution of the image currently captured by the camera module is analyzed; based on the deviation between the grayscale distribution and the preset target range, the brightness adjustment amount and the exposure time adjustment amount are calculated; the projection brightness of the active spot projection module is adjusted according to the brightness adjustment amount, and the exposure parameters of the camera module are adjusted according to the exposure time adjustment amount, so that the grayscale distribution of the image captured by the camera module falls into the preset target range.
[0010] In some embodiments, the stereoscopic image pairs of the workpiece include multiple stereoscopic image pairs corresponding to different viewpoints; controlling the active spot projection module to project an active spot onto the workpiece surface placed on the processing table of the laser engraving machine, and simultaneously controlling the camera module to capture images to obtain stereoscopic image pairs of the workpiece, includes: controlling the laser engraving machine to adjust the workpiece pose multiple times, or controlling the active spot projection module to project active spots at multiple angles on the workpiece surface to obtain multiple stereoscopic image pairs. Parallax matching processing is performed on the stereoscopic image pairs of the workpiece to obtain high-density point cloud data of the workpiece surface, including: performing parallax matching processing on each stereoscopic image pair in the multiple stereoscopic image pairs to obtain multiple sets of local point cloud data; calculating a confidence weight for each set of local point cloud data in the multiple sets of local point cloud data, uniformly transforming all local point cloud data to the same coordinate system, and then weighted fusing all local point cloud data according to the confidence weight of each set of local point cloud data to obtain high-density point cloud data of the workpiece surface.
[0011] In some embodiments, mapping a two-dimensional design pattern onto a three-dimensional model of a workpiece surface to generate a laser engraving trajectory including surface height compensation includes: mapping the two-dimensional design pattern onto the three-dimensional model of the workpiece surface to generate an initial laser engraving trajectory; calculating the principal curvature of each point on the three-dimensional model of the workpiece surface and marking regions where the absolute value of the principal curvature is greater than a preset threshold as high curvature regions; marking path points in the high curvature regions of the initial laser engraving trajectory as target path points; for each target path point, detecting whether the distance between the target path point and its adjacent path points is greater than the minimum subdivision step size, and if so, inserting subdivision points between the target path point and its adjacent path points and projecting them back onto the surface, such that the distance between the target path point and its adjacent path points is less than or equal to the minimum subdivision step size.
[0012] In some embodiments, the active light spot is a laser speckle, a structured light pattern, a DLP stripe, or a random dot matrix projection pattern; the camera module includes at least two cameras.
[0013] In some embodiments, the active spot projection module and the camera module are disposed on the top of the laser engraving machine, and the field of view of the camera module covers the entire engraving area of the laser engraving machine.
[0014] In a second aspect, this application provides a laser processing device, which includes a camera module, an active spot projection module, a laser engraving machine, and a control unit; the control unit is used to execute the curved surface laser engraving method based on the camera module and active spot projection provided in any embodiment of the first aspect.
[0015] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the curved surface laser engraving method based on a camera module and active light spot projection provided in any embodiment of the first aspect.
[0016] Fourthly, this application provides a computer device including one or more processors, a memory, and one or more computer programs. The processors and the memory are connected via a bus. The one or more computer programs are stored in the memory and configured to be executed by one or more processors. When the processors execute the computer programs, they implement the curved surface laser engraving method based on camera module and active light spot projection provided in any embodiment of the first aspect.
[0017] In this application, the control unit of the laser processing equipment can control the active spot projection module to project an active spot onto the surface of the workpiece placed on the processing table of the laser engraving machine, and simultaneously control the camera module to capture images, obtaining a pair of stereoscopic images of the workpiece. Then, parallax matching processing is performed on the stereoscopic image pair to obtain high-density point cloud data of the workpiece surface, and a three-dimensional model of the workpiece surface is constructed based on the high-density point cloud data. Next, a two-dimensional design pattern is mapped onto the three-dimensional model of the workpiece surface to generate a laser engraving trajectory including surface height compensation. Finally, the laser engraving machine is controlled to perform curved surface laser engraving on the workpiece based on the laser engraving trajectory. This application collects the surface information of the workpiece in a non-contact manner, leaving no indentations on the workpiece surface. By controlling the active spot projection module and the camera module to work collaboratively, a single active spot projection and capture can cover the entire surface, eliminating the need for offline workpiece handling. Sampling operations are more convenient, and compared to point-by-point sampling, sampling efficiency is higher. Moreover, this sampling method has a higher sampling point density, which helps improve the final engraving accuracy. Furthermore, this sampling method is less affected by the material color and reflectivity, ensuring the accuracy of the sampling results. Attached Figure Description
[0018] Figure 1 This is a flowchart of a curved surface laser engraving method based on a camera module and active light spot projection, according to an embodiment of this application. Figure 2 This is an internal structural diagram of the laser processing equipment provided in the embodiments of this application; Figure 3 This is a structural block diagram of the computer device provided in the embodiments of this application. Detailed Implementation
[0019] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0020] To illustrate the technical solution described in this application, specific embodiments are provided below.
[0021] Firstly, this application provides a curved surface laser engraving method based on a camera module and active light spot projection, the steps of which can be found in [reference needed]. Figure 1 The following will use the application of this method to the control unit of a laser processing equipment as an example to illustrate the various steps included in this method.
[0022] S101. Control the active light spot projection module to project an active light spot onto the surface of the workpiece placed on the processing table of the laser engraving machine, and simultaneously control the camera module to take pictures to obtain a three-dimensional image of the workpiece.
[0023] Laser processing equipment is a complete device capable of laser engraving curved surfaces. It includes at least a camera module, an active beam projection module, a laser engraving machine, a control unit, and a matching motion mechanism. The control unit is connected to the camera module, the active beam projection module, and the laser engraving machine.
[0024] An active light spot projection module is a light source component, such as a laser, capable of projecting active light spots. An active light spot refers to a light spot with a specific geometric arrangement projected onto the workpiece surface; the active light spot can be laser speckle or a structured light pattern. To enhance visual matching, DLP (Digital Light Processing) stripes or various random dot matrix projection patterns can also be selected as the active light spot. Actively projecting light spots onto the workpiece enhances the visual characteristics of the workpiece surface, thereby improving visual matching accuracy.
[0025] A camera module is a vision system in laser processing equipment, used to simultaneously acquire images of the workpiece containing the active light spot while the active light spot projection module projects the light spot onto the workpiece surface. The camera module can be a binocular camera module (consisting of two cameras arranged in a stereoscopic vision geometry). Furthermore, a TOF (Time-of-Flight) camera or an increased number of cameras can be added to the binocular camera module to form a multi-view vision system, thereby improving the sampling accuracy of workpiece surface information.
[0026] A laser engraving machine is a CNC machining device that uses a laser beam as a processing tool. By controlling the focusing position and energy density of the laser on the workpiece surface, it achieves non-contact engraving, marking, or cutting. A laser engraving machine consists at least of a laser, laser head, processing platform, control system, cooling system, optical path system, and safety protection devices. It can perform high-precision permanent processing on flat or curved surfaces along a predetermined trajectory. The processing platform, also known as a laser engraving platform, is a multi-axis motion mechanism, such as a three-axis XYZ platform, or a five-axis platform with XYZ and rotary axes (such as A and B axes). A five-axis platform adds an A and B rotary axis to a three-axis platform, enabling the engraving of 360° rotating surfaces and providing greater capability for engraving complex curved surfaces.
[0027] The camera module can be mounted on the top cover of the laser engraving machine or on a fixed support bracket outside the frame-type engraving machine. The camera module's field of view needs to cover the entire engraving area of the laser engraving machine, thus forming a comprehensive overhead view system. The active beam projection module is also mounted on the top of the laser engraving machine (such as the top cover) and works in conjunction with the camera module.
[0028] When processing a workpiece, the user first needs to place the workpiece on the processing platform, and then press the processing button to trigger the curved surface laser engraving command. Upon receiving the curved surface laser engraving command, the control unit controls the active spot projection module to project an active spot onto the workpiece surface, and simultaneously controls the camera module to capture images, obtaining a three-dimensional image of the workpiece.
[0029] For example, assuming the camera module is a binocular camera module, when time t=0 milliseconds, the control unit sends a signal to the active spot projection module to indicate the start of spot projection, and the active spot projection module immediately projects the first 11×11 dot matrix pattern (the wavelength can be 532 nanometers, and the power of a single point can be 1 milliwatt). When time t=0.1 milliseconds, the control unit sends a shooting command to the binocular camera module, and the left and right cameras of the binocular camera module start exposure simultaneously, with an exposure time of, for example, 3 milliseconds.
[0030] When time t=3.1 milliseconds, the control unit sends a signal to the active spot projection module to turn off spot projection. The active spot projection module stops projecting the spot to prevent overexposure, and each camera of the binocular camera module completes the shooting when the exposure ends.
[0031] When time t=4 milliseconds, the binocular camera module transmits the images captured by each camera to the control unit. The control unit timestamps the received images and merges the images and their timestamps into a stereo image pair.
[0032] S102. Perform parallax matching processing on the stereo image of the workpiece to obtain high-density point cloud data of the workpiece surface.
[0033] The control unit uses a preset disparity matching algorithm (such as a local stereo matching algorithm or a global stereo matching algorithm) to perform disparity matching processing on the stereo image pairs of the workpiece, thereby generating high-density point cloud data of the workpiece surface.
[0034] The stereoscopic image pair includes the left and right views of the workpiece. The main operational procedures for parallax matching include: Denoising and contrast enhancement are performed on the left and right views to improve the accuracy and robustness of subsequent matching. By using block matching or semi-global block matching algorithms, the region most similar to the current pixel block in the left view is searched on the epipolar line of the right view to obtain a disparity map of the same size as the right view. The gray value of each pixel in the disparity map represents the disparity of that point (specifically, the closer the distance, the larger the disparity and the higher the brightness; the farther the distance, the smaller the disparity and the lower the brightness). The disparity map can be optimized by using left-right consistency checks to eliminate erroneous matches caused by occlusion, and by using subpixel interpolation to improve the accuracy of depth measurement, thereby filling the gaps in the failed matches. Median filtering, weighted least squares filtering, and other methods can also be used to filter the disparity map to smooth the data and preserve the edges. Based on the pre-calculated camera parameters (including the intrinsic parameters, extrinsic parameters, and distortion coefficients of each camera), each pixel and its disparity value in the optimized disparity map are converted into three-dimensional coordinates in a three-dimensional coordinate system (usually the coordinate system of the left camera) using triangulation formulas. Each three-dimensional coordinate corresponds to a three-dimensional point, and the set of all three-dimensional points constitutes high-density point cloud data that can describe the surface of the workpiece.
[0035] S103. Construct a three-dimensional model of the workpiece surface based on high-density point cloud data.
[0036] The high-density point cloud data of the workpiece is discrete and lacks topological relationships. This step is used to convert the high-density point cloud data into a continuous 3D model with geometric topological relationships.
[0037] The high-density point cloud data can be preprocessed first. Preprocessing can include denoising (such as removing outliers and noise points caused by measurement errors), filtering, and normal estimation. Then, a surface reconstruction algorithm (such as Poisson reconstruction) is used to generate a 3D model of the workpiece surface based on the preprocessed high-density point cloud data.
[0038] S104. Map the two-dimensional design pattern onto the three-dimensional model of the workpiece surface to generate a laser engraving trajectory that includes surface height compensation.
[0039] A 2D design pattern refers to the pattern to be engraved. Users can upload the 2D design pattern to the control unit in advance. The control unit can find the corresponding point on the 3D model of the workpiece surface for each pixel of the 2D design pattern according to its UV mapping relationship, and read the 3D coordinates of that point (especially the Z-axis height), thereby converting the traditional 2D machining path into a 3D machining path, ensuring that the laser focus always falls precisely on the undulating surface. The UV mapping relationship refers to the mapping relationship from a 2D plane to 3D space.
[0040] Specifically, the control unit can establish a one-to-one correspondence between each point on the three-dimensional surface of the workpiece surface three-dimensional model and each pixel on the two-dimensional design pattern. Then, for each effective pixel (or point on the vector path) on the two-dimensional design pattern, the corresponding point on the workpiece surface three-dimensional model is found through its UV coordinates, the three-dimensional coordinates of the point are obtained, and the Z-axis coordinate of the three-dimensional coordinates of the point is used as the height compensation value. Finally, a laser engraving trajectory is generated according to the three-dimensional coordinates corresponding to each effective pixel on the two-dimensional design pattern.
[0041] S105. Control the laser engraving machine to perform curved surface laser engraving on the workpiece according to the laser engraving trajectory.
[0042] The control unit can convert the laser engraving trajectory into a format that the laser engraving machine's control system can recognize, such as a custom-formatted 3D G-code path file. The control unit sends the 3D G-code path file to the laser engraving machine, and the laser engraving machine's control system will control the synchronous movement of the laser head's XYZ axes according to the 3D G-code path file, while maintaining a constant focal length to achieve precise curved surface engraving.
[0043] In the above embodiments of this application, the control unit of the laser processing equipment can control the active spot projection module to project an active spot onto the surface of the workpiece placed on the processing table of the laser engraving machine, and simultaneously control the camera module to capture images, obtaining a pair of stereoscopic images of the workpiece. Then, parallax matching processing is performed on the stereoscopic image pair to obtain high-density point cloud data of the workpiece surface, and a three-dimensional model of the workpiece surface is constructed based on the high-density point cloud data. Then, a two-dimensional design pattern is mapped onto the three-dimensional model of the workpiece surface to generate a laser engraving trajectory including surface height compensation. Finally, the laser engraving machine is controlled to perform surface laser engraving on the workpiece based on the laser engraving trajectory. This application collects the surface information of the workpiece in a non-contact manner, without leaving indentations on the workpiece surface. By controlling the active spot projection module and the camera module to work collaboratively, a single active spot projection and capture can cover the entire surface, eliminating the need for offline workpiece handling. The sampling operation is more convenient, and compared to point-by-point sampling, the sampling efficiency is higher. Moreover, this sampling method has a higher sampling point density, which helps improve the final engraving accuracy. In addition, this sampling method is less affected by the material color and reflectivity, ensuring the accuracy of the sampling results.
[0044] In some embodiments, before controlling the active spot projection module to project an active spot onto the workpiece surface placed on the processing table of the laser engraving machine, and simultaneously controlling the camera module to capture a stereoscopic image of the workpiece, the method further includes: controlling the camera module to capture a calibration image, the calibration image including a calibration plate placed at the center of the laser engraving machine; calculating the camera intrinsic parameter matrix of the camera module based on the calibration image; and calculating the extrinsic parameter transformation matrix between the camera coordinate system of the camera module and the three-dimensional coordinate system of the laser engraving machine based on the camera intrinsic parameter matrix.
[0045] When using laser processing equipment for the first time, it is necessary to calibrate the intrinsic and extrinsic parameters of each camera in the camera module. Calibration requires a calibration board (such as a checkerboard). The user places the calibration board at the center of the laser engraving machine (such as the center of the processing table), and then controls each camera in the camera module to capture images containing the calibration board, i.e., calibration images. Multiple images containing the calibration board can be captured from different angles, distances, and positions as candidate calibration images. Images meeting preset conditions are then selected as the final calibration images. These preset conditions may include the completeness of the calibration board in the image exceeding a preset percentage threshold and the number of poses (such as tilt or rotation) of the calibration board exceeding a preset number threshold. The higher the completeness and the more diverse the poses of the calibration board in the image, the more accurate the intrinsic parameter calibration results will be.
[0046] The camera intrinsic parameter matrix includes the intrinsic parameter matrix and distortion coefficients. The intrinsic parameter calibration process may include: The calibration algorithm automatically detects the feature points of the calibration board (such as the inner corner points of the chessboard or the center of the circle) in each calibration image using a preset calibration algorithm (such as the findChessboardCorners or findCirclesGrid functions in OpenCV). The calibration algorithm will assign the coordinates of each feature point in the image pixel coordinate system, such as (u, v). Next, for each detected image corner point, assign its three-dimensional coordinates in the calibration board's world coordinate system, such as (X, Y, Z). Typically, the plane of the calibration board can be set to Z=0. In this case, the world coordinates of each corner point are (X, Y, 0). For example, assuming the calibration board is a 10 mm wide checkerboard, the first corner point in the upper left corner can be (0,0,0), and the next one can be (10,0,0). Finally, the coordinates (u, v) of all corner points in all calibration images and their corresponding 3D coordinates (X, Y, Z) are input into the calibration algorithm. The calibration algorithm calculates an optimal set of intrinsic parameter matrices and distortion coefficients through optimization (such as maximum likelihood estimation) to minimize its reprojection error (i.e., the difference between the calculated 3D points reprojected onto the image and the actual detected corner point coordinates). The intrinsic parameter matrix can be a 3×3 matrix containing the focal length (fx, fy) and the principal point coordinates (c_x, c_y).
[0047] The extrinsic transformation matrix includes the rotation matrix and the translation vector. The extrinsic calibration process may include: Use a point on the calibration plate (e.g., the first corner point in the lower left corner) as the origin of the world coordinate system. At this point, the calibration plate plane is used as the Z=0 plane, and the X and Y axes are aligned with the grid lines of the calibration plate. Thus, the world coordinates (X, Y, 0) of all the corner points previously used for intrinsic parameter calibration are defined in the laser engraving machine coordinate system. Select one calibration image from all calibration images, with the calibration plate flat and parallel to the center of the machining table, as the target calibration image (it can be one or more images); Finally, using a pre-defined algorithm, such as the `solvePnP` or `solvePnPRansac` function in OpenCV, iterative calculations are performed based on the world coordinates (X, Y, Z) of a set of points on the calibration board in the target calibration image, the corresponding two-dimensional pixel coordinates (u, v) of these points in the target calibration image, and the camera intrinsic parameter matrix, to calculate the optimal rotation matrix and translation vector. The optimal rotation matrix and translation vector minimize the error between the two-dimensional coordinates obtained by projecting the three-dimensional coordinates (X, Y, Z) in the world coordinate system using the following formula and the detected points (u, v) in the target calibration image.
[0048] s * [u; v; 1] = K * [R | T]* [X; Y; Z; 1]; s represents the preset scale factor; K represents the intrinsic parameter matrix; D represents the distortion coefficient; R represents the rotation matrix; and T represents the translation vector.
[0049] In some embodiments, while controlling the active spot projection module to project an active spot onto the workpiece surface placed on the processing table of the laser engraving machine, and simultaneously controlling the camera module to capture images, the grayscale distribution of the image currently captured by the camera module is analyzed; based on the deviation between the grayscale distribution and the preset target range, the brightness adjustment amount and the exposure time adjustment amount are calculated; the projection brightness of the active spot projection module is adjusted according to the brightness adjustment amount, and the exposure parameters of the camera module are adjusted according to the exposure time adjustment amount, so that the grayscale distribution of the image captured by the camera module falls into the preset target range.
[0050] This embodiment can achieve adaptive control of the camera's exposure time and the brightness of the active light spot. Specifically, it can adjust the projection brightness of the active light spot and the camera's exposure time in real time according to the different characteristics and reflection of the workpiece material, thereby improving the accuracy of parallax matching.
[0051] In some embodiments, the stereoscopic image pairs of the workpiece include multiple stereoscopic image pairs corresponding to different viewpoints. Accordingly, controlling the active spot projection module to project an active spot onto the workpiece surface placed on the processing table of the laser engraving machine, and simultaneously controlling the camera module to capture images, to obtain stereoscopic image pairs of the workpiece, includes: controlling the laser engraving machine to adjust the workpiece pose multiple times, or controlling the active spot projection module to project active spots at multiple angles on the workpiece surface to obtain multiple stereoscopic image pairs. Accordingly, parallax matching processing is performed on the stereoscopic image pairs of the workpiece to obtain high-density point cloud data of the workpiece surface, including: performing parallax matching processing on each stereoscopic image pair in the multiple stereoscopic image pairs to obtain multiple sets of local point cloud data; calculating a confidence weight for each set of local point cloud data in the multiple sets of local point cloud data; uniformly transforming all local point cloud data to the same coordinate system; and then weighted fusing all local point cloud data according to the confidence weight of each set of local point cloud data to obtain high-density point cloud data of the workpiece surface.
[0052] This embodiment can utilize image data from multiple perspectives for fusion, thereby improving the stability and accuracy of the final generated high-density point cloud data.
[0053] In some embodiments, mapping a two-dimensional design pattern onto a three-dimensional model of a workpiece surface to generate a laser engraving trajectory including surface height compensation includes: mapping the two-dimensional design pattern onto the three-dimensional model of the workpiece surface to generate an initial laser engraving trajectory; calculating the principal curvature of each point on the three-dimensional model of the workpiece surface and marking regions where the absolute value of the principal curvature is greater than a preset threshold as high curvature regions; marking path points in the high curvature regions of the initial laser engraving trajectory as target path points; for each target path point, detecting whether the distance between the target path point and its adjacent path points is greater than the minimum subdivision step size, and if so, inserting subdivision points between the target path point and its adjacent path points and projecting them back onto the surface, such that the distance between the target path point and its adjacent path points is less than or equal to the minimum subdivision step size.
[0054] This embodiment can achieve curvature-driven path optimization. Specifically, it can automatically subdivide the carving path in high curvature areas to avoid the loss of surface features, thereby improving the carving detail and accuracy.
[0055] Secondly, this application provides a laser processing device, such as... Figure 2 As shown, the laser processing equipment includes a camera module, an active spot projection module, a laser engraving machine, and a control unit; the control unit is used to execute the curved surface laser engraving method based on the camera module and active spot projection provided in any embodiment of the first aspect.
[0056] The laser processing equipment provided in this application and the curved surface laser engraving method based on camera module and active light spot projection provided in the first aspect of this application belong to the same inventive concept. The specific implementation process is detailed in the full text of the specification, especially the various embodiments provided in the first aspect, which will not be repeated here.
[0057] Thirdly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the curved surface laser engraving method based on a camera module and active light spot projection provided in any embodiment of the first aspect.
[0058] Fourthly, this application provides a computer device, Figure 3The diagram shows a specific structural block diagram of a computer device. This computer device includes one or more processors 101, a memory 102, and one or more computer programs. The processors 101 and the memory 102 are connected via a bus. The one or more computer programs are stored in the memory 102 and configured to be executed by the one or more processors 101. When the processors 101 execute the computer programs, they implement the curved surface laser engraving method based on a camera module and active light spot projection provided in any embodiment of the first aspect. This computer device can be a desktop computer or a mobile terminal. The mobile terminal includes at least one of a mobile phone, tablet computer, personal digital assistant, or wearable device.
[0059] It should be understood that the steps in the various embodiments of this application are not necessarily executed sequentially according to the order indicated by the step numbers. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0060] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0061] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0062] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A method for laser engraving curved surfaces based on a camera module and active light spot projection, characterized in that, The method includes: The active light spot projection module is controlled to project an active light spot onto the surface of the workpiece placed on the processing table of the laser engraving machine, and the camera module is simultaneously controlled to capture images to obtain a three-dimensional image pair of the workpiece. Based on the stereo image of the workpiece, parallax matching processing is performed to obtain high-density point cloud data of the workpiece surface; A three-dimensional model of the workpiece surface is constructed based on the high-density point cloud data. The two-dimensional design pattern is mapped onto the three-dimensional model of the workpiece surface to generate a laser engraving trajectory that includes surface height compensation. The laser engraving machine is controlled according to the laser engraving trajectory to perform curved surface laser engraving on the workpiece.
2. The method according to claim 1, characterized in that, Before controlling the active spot projection module to project an active spot onto the surface of the workpiece placed on the processing table of the laser engraving machine, and simultaneously controlling the camera module to capture a stereoscopic image of the workpiece, the method further includes: The camera module is controlled to capture a calibration image, which includes a calibration plate placed at the center of the laser engraving machine. Calculate the camera intrinsic parameter matrix of the camera module based on the calibration image; The extrinsic transformation matrix between the camera coordinate system of the camera module and the three-dimensional coordinate system of the laser engraving machine is calculated based on the camera intrinsic parameter matrix.
3. The method according to claim 1, characterized in that, During the process of controlling the active spot projection module to project an active spot onto the surface of the workpiece placed on the processing table of the laser engraving machine, and simultaneously controlling the camera module to take pictures, the grayscale distribution of the image currently captured by the camera module is analyzed. Based on the deviation between the grayscale distribution and the preset target range, calculate the brightness adjustment amount and the exposure time adjustment amount; The projection brightness of the active light spot projection module is adjusted according to the brightness adjustment amount, and the exposure parameters of the camera module are adjusted according to the exposure time adjustment amount, so that the grayscale distribution of the image captured by the camera module falls into the preset target range.
4. The method according to claim 1, characterized in that, The stereoscopic image pairs of the workpiece include multiple stereoscopic image pairs corresponding to different viewpoints; The active beam projection module projects an active beam onto the surface of a workpiece placed on the processing table of the laser engraving machine, and simultaneously controls the camera module to capture images, obtaining a pair of stereoscopic images of the workpiece, including: The laser engraving machine is controlled to adjust the position and posture of the workpiece multiple times, or the active spot projection module is controlled to project active spots at multiple angles on the surface of the workpiece to obtain the multiple sets of stereoscopic image pairs. The step of performing disparity matching processing on the stereo image of the workpiece to obtain high-density point cloud data of the workpiece surface includes: Perform disparity matching processing on each of the multiple sets of stereo image pairs to obtain multiple sets of local point cloud data; Calculate the confidence weight for each set of local point cloud data in the multiple sets of local point cloud data, transform all local point cloud data to the same coordinate system, and then perform weighted fusion of all local point cloud data according to the confidence weight of each set of local point cloud data to obtain high-density point cloud data of the workpiece surface.
5. The method according to claim 1, characterized in that, Mapping a two-dimensional design pattern onto a three-dimensional model of the workpiece surface to generate a laser engraving trajectory that includes surface height compensation includes: The two-dimensional design pattern is mapped onto the three-dimensional model of the workpiece surface to generate the initial laser engraving trajectory; Calculate the principal curvature of each point on the three-dimensional model of the workpiece surface, and mark the regions where the absolute value of the principal curvature is greater than a preset threshold as high curvature regions; Mark the path points in the high curvature region of the initial laser engraving trajectory as target path points; For each target path point, it is detected whether the distance between the target path point and its adjacent path points is greater than the minimum subdivision step size. If so, a subdivision point is inserted between the target path point and its adjacent path points and projected back onto the surface, such that the distance between the target path point and its adjacent path points is less than or equal to the minimum subdivision step size.
6. The method according to any one of claims 1 to 5, characterized in that, The active light spot can be a laser speckle, a structured light pattern, a DLP stripe, or a random dot matrix projection pattern; the camera module includes at least two cameras.
7. The method according to any one of claims 1 to 5, characterized in that, The active light spot projection module and the camera module are located on the top of the laser engraving machine, and the visual range of the camera module covers the entire engraving area of the laser engraving machine.
8. A laser processing device, characterized in that, The device includes a camera module, an active spot projection module, a laser engraving machine, and a control unit; the control unit is used to execute the method of any one of claims 1-7.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.
10. A computer device comprising one or more processors, a memory, and one or more computer programs, wherein the processors and the memory are connected via a bus, and the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, characterized in that, When the processor executes the computer program, it implements the method as described in any one of claims 1 to 7.
Citation Information
Cited By
Femtosecond laser three-dimensional curved surface machining method and system based on adaptive optics
CN122077169A