Method for operating a 3D printer and a laser profilometer
By setting up a calibration board and main control chip in the 3D printer, and using the calibration image and laser image of the laser profilometer to calculate the laser plane parameters, the problem of calibration parameter changes caused by vibration is solved, and high-precision printing of the 3D printer is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ORBBEC CO LTD
- Filing Date
- 2023-08-10
- Publication Date
- 2026-07-10
AI Technical Summary
Because 3D printers move and vibrate continuously during the printing process, the calibration parameters of the laser profilometer change, affecting the printing accuracy of the 3D printer.
A calibration plate is set up in the 3D printer, and the movement of the print bed and print head is controlled by the main control chip. Combined with the laser emitter and camera of the laser profilometer, calibration images and laser images are acquired at different intervals, and laser plane parameters are calculated to achieve recalibration of the laser profilometer.
This ensures the scanning accuracy of the laser profilometer, thereby guaranteeing the overall printing accuracy of the 3D printer, especially maintaining high accuracy during long-term use.
Smart Images

Figure CN116901430B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D printing, and more particularly to a working method of a 3D printer and a laser profilometer. Background Technology
[0002] With the increasing popularity of the concept of "personal manufacturing," the demand and application of 3D printing (additive manufacturing) technology in the personal consumer sector have experienced explosive growth. Desktop 3D printing equipment refers to small 3D printers designed for easy use on a desktop. These devices are typically designed to be more compact and user-friendly, enabling individual users and small businesses to easily perform 3D printing in their home or office environments. This significantly lowers the barrier to entry for 3D printing technology and promotes the development of personal manufacturing.
[0003] Desktop 3D printers include laser profilometers, whose main function is to scan the point cloud data of the target object and then transmit it to the processor for 3D printing. The scanning accuracy of the laser profilometer directly affects the printing accuracy of the 3D printer. However, because 3D printers move and vibrate continuously during the printing process, the calibration parameters of the laser profilometer can easily change, affecting the printing accuracy of the 3D printer. Summary of the Invention
[0004] This application provides a working method for a 3D printer and a laser profilometer. Before the laser profilometer scans the target object, it can be recalibrated to ensure the accuracy of the 3D printer.
[0005] This application provides a 3D printer, including a print head, a print bed, a laser profilometer, a calibration plate, and a main control chip. The laser profilometer is fixed to the side of the print head, and the plane of the calibration plate is parallel to or coincides with the surface of the print bed. The print head is used to print a layer of the target object on the print bed. The laser profilometer includes a laser emitter and a camera. Before acquiring the point cloud data of the target object, the camera is used to acquire multiple frames of calibration images of the calibration plate at multiple intervals when the laser emitter is not turned on, and to acquire multiple frames of laser images corresponding to the multiple frames of calibration images when the laser emitter is turned on. The main control chip is used to acquire the laser plane parameters of the laser emitter based on the multiple frames of calibration images and the multiple frames of laser images, and to control the laser profilometer to scan the target object to obtain a target image. The point cloud data of the target object is obtained by combining the laser plane parameters and the target image.
[0006] In some embodiments, the main control chip is specifically used for: calculating the plane equation of the calibration board plane in the camera coordinate system at multiple intervals based on multiple frames of calibration images; extracting the set of laser points in each frame of laser image, and calculating the first set of laser point coordinates in the camera coordinate system according to the corresponding plane equation; and fitting the laser plane parameters according to the first set of laser point coordinates corresponding to multiple frames of laser images. In some embodiments, the calibration board has multiple calibration points, and the main control chip is specifically used for: extracting the calibration points in each frame of calibration image to obtain a set of calibration points; calculating the camera intrinsic and extrinsic parameters according to the calibration point information in the set of calibration points corresponding to at least one frame of calibration image; calculating the set of calibration point coordinates in the camera coordinate system for each set of calibration points according to the camera extrinsic parameters; and fitting the calibration points in each set of calibration point coordinates to obtain the corresponding plane equation.
[0007] In some embodiments, the main control chip is specifically used to: extract the center point of each row of laser lines or the center point of each column of laser lines from each frame of laser image to obtain the corresponding set of laser points in the image coordinate system; calculate the second set of laser point coordinates corresponding to the set of laser points in the camera coordinate system based on the camera intrinsic parameters; construct a ray set through the laser point coordinates in the second set of laser point coordinates, with the origin of the camera coordinate system as the endpoint; and calculate the first set of laser point coordinates based on the ray set and the calibration plate plane equation at the corresponding spacing, wherein the first set of laser point coordinates consists of the intersection points of the rays in the ray set at the corresponding spacing and the calibration plate plane. In some embodiments, the main control chip is specifically used to: fit the first laser point coordinates corresponding to multiple frames of laser images into a laser plane to obtain laser plane parameters.
[0008] This application also provides a method for operating a laser profilometer, applied to a 3D printer. The 3D printer includes a print head, a print bed, a laser profilometer, a calibration plate, and a main control chip. The laser profilometer includes a laser emitter and a camera. The plane of the calibration plate is parallel to or coincides with the surface of the print bed. The operating method includes: moving the print head and / or the print bed so that the laser profilometer and the calibration plate are relative in the Z-axis direction and have different distances; controlling the camera to capture multiple frames of calibration images of the calibration plate at different distances; turning on the laser emitter to project laser lines onto the calibration plate and controlling the camera to capture multiple frames of laser images corresponding to the multiple frames of calibration images; calculating the laser plane parameters of the laser emitter based on the multiple frames of calibration images and the multiple frames of laser images; controlling the laser profilometer to scan the target object to obtain a target image; and using the laser plane parameters and the target image to obtain the point cloud data of the target object.
[0009] In some embodiments, calculating the laser plane parameters of the laser emitter based on multiple calibration images and multiple laser images includes: calculating the plane equations of the calibration plate plane in the camera coordinate system at multiple intervals based on the multiple calibration images; extracting the set of laser points in each laser image and calculating the first set of laser point coordinates in the camera coordinate system based on the corresponding plane equations; and fitting the laser plane parameters based on the first set of laser point coordinates corresponding to the multiple laser images. In some embodiments, the calibration plate has multiple calibration points. Calculating the plane equations of the calibration plate plane in the camera coordinate system at multiple intervals based on the multiple calibration images includes: extracting the calibration points in each calibration image to obtain a set of calibration points; calculating camera intrinsic and extrinsic parameters based on the calibration point information in the set of calibration points corresponding to at least one calibration image; calculating the set of calibration point coordinates in the camera coordinate system for each set of calibration points based on the camera extrinsic parameters; and fitting the calibration points in each set of calibration point coordinates to obtain the corresponding plane equation.
[0010] In some embodiments, extracting the set of laser points in each frame of laser image and calculating the first set of laser point coordinates in the camera coordinate system according to the corresponding plane equation includes: extracting the center point of each row of laser lines or the center point of each column of laser lines from each frame of laser image to obtain the corresponding set of laser points in the image coordinate system; calculating the second set of laser point coordinates in the camera coordinate system according to camera intrinsic parameters; constructing a ray set through the laser point coordinates in the second set of laser point coordinates with the origin of the camera coordinate system as the endpoint; calculating the first set of laser point coordinates according to the ray set and the calibration plate plane equation at the corresponding spacing, wherein the first set of laser point coordinates consists of the intersection points of the rays in the ray set at the corresponding spacing and the calibration plate plane. In some embodiments, fitting the first set of laser point coordinates corresponding to multiple frames of laser images to obtain laser plane parameters includes: fitting the first set of laser point coordinates corresponding to multiple frames of laser images into a laser plane to obtain laser plane parameters.
[0011] The working method of the 3D printer and laser profilometer provided in this application, by setting a calibration plate next to the print bed, allows control of the movement of the print bed and / or print head, as well as the laser emitter and camera of the laser profilometer, before scanning the target object with the laser profilometer. Based on the calibration images and laser images obtained at different intervals, the laser plane parameters are calculated, realizing the calibration of the laser profilometer in the 3D printer. When the calibration parameters of the laser profilometer change due to vibration or other reasons, the laser profilometer can be recalibrated, ensuring the scanning accuracy of the laser profilometer, and thus ensuring the accuracy of the 3D printer. Attached Figure Description
[0012] Figure 1 This is a schematic diagram of a 3D printer provided in an embodiment of this application.
[0013] Figure 2 This is a schematic diagram of a calibration image provided in an embodiment of this application.
[0014] Figure 3 This is a schematic diagram of a laser image provided in an embodiment of this application.
[0015] Figure 4 This is a schematic diagram of the working method of a laser profilometer provided in an embodiment of this application.
[0016] Figure 5 This is a structural example diagram of a device provided in an embodiment of this application. Detailed Implementation
[0017] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0018] With the increasing popularity of the concept of "personal manufacturing," the demand and application of 3D printing (additive manufacturing) technology in the personal consumer sector have experienced explosive growth. Desktop 3D printing equipment refers to small 3D printers designed for easy use on a desktop. These devices are typically designed to be more compact and user-friendly, enabling individual users and small businesses to easily perform 3D printing in their home or office environments. This significantly lowers the barrier to entry for 3D printing technology and promotes the development of personal manufacturing.
[0019] To improve the quality and success rate of 3D printing, a laser profilometer is added to the 3D printer. Its main function is to scan the point cloud data of the target object and transmit it to the main control chip. The main control chip then monitors the printing quality of the target object, thus achieving high-quality 3D printing. However, because the 3D printer moves and vibrates continuously during the printing process, the calibration parameters of the laser profilometer can easily change, affecting the printing accuracy of the 3D printer.
[0020] In view of this, this application provides a working method for a 3D printer and a laser profilometer, enabling the 3D printer to have high printing accuracy.
[0021] Figure 1 This is a schematic diagram of the structure of a 3D printer provided in an embodiment of this application. For example... Figure 1 As shown, a 3D printer may include a print bed 101, a print head 102, a laser profilometer 104, a calibration board 108, and a main control chip 110.
[0022] A print bed 101 provides a printing surface, and a print head 102 prints layers of the target object on the print bed 101. The print bed 101 and print head 102 can move along the X, Y, and Z axes. The X and Y axes are parallel to the bed surface (i.e., the printing plane) of the print bed 101, and the Z axis is perpendicular to the bed surface of the print bed 101. In typical 3D printer displacement settings, the print bed 101 moves along the Z-axis, and the print head 102 moves along the X and Y axes. In some implementations, the print bed 101 can be heated, i.e., it is a heated bed, thereby increasing the adhesion of the printing material, preventing edge warping during printing, and improving print quality.
[0023] The laser profilometer 104 is primarily used to scan the point cloud data of a target object. It can be fixed to the side of the print head 102 using any method, such as adhesive bonding or screw fastening, ensuring a relatively fixed position between the laser profilometer 104 and the print head 102 after installation. The laser profilometer 104 includes a camera and a laser emitter. The laser emitter projects a laser line onto the target object, and the camera acquires an image of the target object with the laser line, allowing for the calculation of point cloud data based on the image. The laser profilometer and camera can move with the print head 102 to scan the target object and obtain complete point cloud data. Figure 1 In this diagram, 105 represents the center point of the camera, or its specific mounting location; 106 represents the camera's shooting area, the size of which changes as the laser profilometer 104 moves longitudinally. In some implementations, the laser beam projected by the laser emitter is infrared light, and the camera is an infrared camera. In some implementations, the laser profilometer 104 also includes a floodlight.
[0024] The calibration plane of the calibration plate 108 (hereinafter referred to as the calibration plate plane) can be parallel to or coincide with the bed surface of the print bed 101. In some embodiments, the 3D printer further includes a support 107, which can be disposed on the side of the print bed 101, and the calibration plate 108 can be disposed on the support 107. Thus, in cases where the print bed size of the 3D printer is small, such as a desktop 3D printer, the print head 102 can be moved out of the print bed 101 to calibrate the laser profilometer 108. The calibration plate 108 has multiple calibration points, such as a regularly arranged pattern, such as a checkerboard pattern, a dot array pattern, or a binary random code pattern. In some implementations, the pattern accuracy in the calibration plate 108 is higher than 2μm, specifically referring to the difference between the actual distance and the theoretical distance between any two calibration points in the pattern. The material of the calibration plate 108 is required to be opaque, flat, and without any protrusions to avoid affecting the calibration accuracy.
[0025] The main control chip 110 is connected to the print bed 101, print head 102, and laser profilometer 104. It controls the print bed 101, print head 102, and laser profilometer 104, and receives, processes, and calculates data transmitted by the laser profilometer 104. For example, the main control chip 110 can control the laser profilometer 104 to scan a target object to obtain a target image, and combine the laser plane parameters of the laser profilometer 104 with the target image to obtain point cloud data of the target object. Specifically, the laser plane parameters of the laser emitter refer to the plane equation of the laser plane projected by the laser emitter in the camera coordinate system. The main control chip 110 is also used to perform related leveling detection, flow control, first-layer detection, and linewidth detection based on the point cloud image output by the laser profilometer 104.
[0026] To prevent the calibration parameters of the laser profilometer 104 from changing due to vibration or other reasons, the laser profilometer 104 can be calibrated before 3D printing, i.e., before acquiring the point cloud data of the target object through the laser profilometer 104. Specifically, the laser profilometer 104 is also used to acquire multiple frames of calibration images of the calibration plate 108 at multiple different distances from the calibration plate 108 when the laser emitter is not turned on, and to turn on the laser emitter at multiple distances, projecting laser lines onto the calibration plate 108, and acquiring multiple frames of laser images corresponding to the multiple frames of calibration images through the camera; the main control chip 110 can be used to acquire the laser plane parameters of the laser emitter based on the multiple frames of calibration images and the multiple frames of laser images, so that the point cloud data obtained by scanning the target object in the subsequent 3D printing process is more accurate, and the printing quality of the 3D printer is improved.
[0027] In such Figure 1 In the 3D printer shown, by setting a calibration plate 108 next to the print bed 101 and controlling the movement of the print bed 101 and / or the print head 102, as well as the operation of the laser emitter and camera of the laser profilometer 108, the laser profilometer 108 can be calibrated before 3D printing. When the calibration parameters of the laser profilometer 108 change due to factors such as vibration of the print head 102 and / or the print bed 101, the laser profilometer 108 can be recalibrated. This avoids the occurrence of decreased accuracy due to changes in the internal parameters of the laser profilometer 108 caused by vibration, stress release, etc. Therefore, the 3D printer can maintain high accuracy during long-term use.
[0028] Multiple spacings can refer to two, three, four, five, or more different spacings, all of which are within the camera's depth of field, enabling the camera to acquire a clear image of the calibration plate. For ease of explanation, this application uses two different spacings as an example, namely, multiple spacings including a first spacing and a second spacing. The camera acquires the calibration image of the calibration plate 108 and the laser image of the calibration plate 108 with laser lines at the first spacing and the second spacing, respectively. Specifically... Figure 2 and Figure 3 These are schematic diagrams of a calibration image and a laser image provided in the embodiments of this application, wherein 301 is a laser line.
[0029] Taking the direction parallel to the print bed surface, including the X-axis and Y-axis directions, as an example, when calibrating the laser profilometer 104, the main control chip 110 can control the movement of the print head 102 and / or the print bed 101, so that the laser profilometer 104 and the calibration plate 108 are opposite each other in the Z-axis direction, and have a first gap and a second gap respectively. Specifically, the print head 102 and / or the print bed 101 can be moved along the direction parallel to the print bed surface to align the center point of the camera with the center point of the calibration plate 108, so that the image of the calibration plate 108 in the camera of the laser profilometer is clearer and more complete.
[0030] At the first spacing, the camera of the laser profilometer 104 first acquires an image of the calibration plate 108 to obtain a first calibration image. The laser emitter of the laser profilometer 104 then turns on, projecting a laser line towards the calibration plate 108. The camera acquires an image of the calibration plate 108 with the laser line, obtaining a first laser image. The laser emitter is then turned off. The print bed 101 and / or print head 102 are moved along the Z-axis to create a second spacing between the laser profilometer 104 and the calibration plate 108. The camera of the laser profilometer 104 acquires an image of the calibration plate 108 to obtain a second calibration image. The laser emitter of the laser profilometer 104 then turns on, projecting a laser line towards the calibration plate 108. The camera acquires an image of the calibration plate 108 with the laser line, obtaining a second laser image. It should be noted that the positions of the laser lines in the laser images at the first and second spacings are different. Acquiring calibration images and laser images at other spacings is similar, except that the positions of the laser lines differ between the different spacings; this will not be elaborated upon here.
[0031] In some implementations, the floodlight of the laser profilometer 104 can be turned on when acquiring calibration images to make the acquired calibration images clearer; when acquiring laser images, the floodlight can be turned off to avoid interference from the floodlight. In some implementations, the first spacing is the optimal shooting distance of the camera, and the difference between the first spacing and the second spacing can be determined according to the depth of field range of the camera. Generally speaking, the larger the depth of field range, the larger the difference between the first spacing and the second spacing can be. In one embodiment, the difference between the first spacing and the second spacing is 1mm, thereby ensuring that the calibration board is still within the depth of field range of the camera to capture clear images.
[0032] When calculating the laser plane parameters, the main control chip 110 is specifically used for: calculating the plane equation of the calibration board plane in the camera coordinate system at multiple intervals based on multiple frames of calibration images; extracting the set of laser points in each frame of laser image, and calculating the first set of laser point coordinates in the camera coordinate system according to the corresponding plane equation; and fitting the laser plane parameters based on the first set of laser point coordinates corresponding to multiple frames of laser images. Compared with the laser plane parameters obtained based on a single interval, the laser plane parameters obtained in this embodiment are more accurate.
[0033] When calculating the plane equation of the calibration board in the camera coordinate system, the main control chip 110 is specifically used for: extracting calibration points from each frame of calibration images to obtain a set of calibration points; calculating camera intrinsic and extrinsic parameters based on the calibration point information in the set of calibration points corresponding to at least one frame of calibration images; calculating the set of calibration point coordinates for each set of calibration points in the camera coordinate system based on the camera intrinsic and extrinsic parameters; and fitting the calibration points in each set of calibration point coordinates to obtain the corresponding plane equation. Here, the camera coordinate system refers to a coordinate system constructed with the camera's optical center as the origin.
[0034] When extracting calibration points from each frame of the calibration image, the calibration image can be preprocessed. Preprocessing may include Gaussian filtering, histogram equalization, binarization, etc., to facilitate accurate identification of calibration points later. The region of interest (ROI) in the preprocessed calibration image is then identified. Calibration points within the ROI are detected to obtain a first set of calibration points. The calibration points in the first set are then decoded to obtain their corresponding calibration point information, which includes the coordinates and number of the calibration points in the image coordinate system. The image coordinate system refers to the coordinate system of the image captured by the camera, with its origin at the intersection of the camera's optical axis and the imaging plane, i.e., the center point of the image. The image coordinate system is a two-dimensional coordinate system.
[0035] Camera intrinsic parameters are represented by the relative transformation relationship between the image coordinate system and the camera coordinate system, while camera extrinsic parameters are represented by the relative transformation relationship between the camera coordinate system and the calibration board coordinate system. In some implementations, the spatial coordinates of the calibration point in the calibration board coordinate system are known and can be pre-stored in memory. The camera intrinsic parameters can be calculated based on the coordinates of the calibration point in the image coordinate system and the camera coordinate system of a calibration frame. Then, the camera extrinsic parameters are calculated using the spatial coordinates in the calibration board coordinate system and the coordinates of the calibration point in the camera coordinate system. These camera intrinsic and extrinsic parameters are then used as the camera intrinsic and extrinsic parameters for subsequent calculations. In some implementations, the calculation methods can be Perspective-n-Point (PnP), Singular Value Decomposition (SVD), quaternion methods, etc. Furthermore, the corresponding camera intrinsic and extrinsic parameters can be calculated based on the spatial coordinates of the calibration point in the calibration plate coordinate system and the coordinates of the calibration point in the image coordinate system in each frame of calibration image. By combining the camera intrinsic and extrinsic parameters corresponding to multiple frames of calibration images, the final camera intrinsic and extrinsic parameters are obtained. The camera intrinsic and extrinsic parameters obtained in this way are relatively accurate, and the laser plane parameters calculated subsequently are more accurate. The synthesis method can be a nonlinear optimization method (such as the least squares method) or other methods, which are not limited here.
[0036] The set of coordinates of the known spatial coordinates of the calibration points in the calibration plate coordinate system is calculated based on the camera extrinsic parameters. The coordinates of at least some of the calibration points in the calibration point coordinate set are fitted to obtain the plane equation of the calibration plate plane in the camera coordinate system at the corresponding spacing. The fitted calibration points must be at least three and not on the same straight line.
[0037] When calculating the first set of laser point coordinates in the camera coordinate system, the main control chip 110 is specifically used to: extract the center point of each row of laser lines or the center point of each column of laser lines from each frame of laser image to obtain the corresponding set of laser points in the image coordinate system; calculate the second set of laser point coordinates in the camera coordinate system based on the camera intrinsic parameters; construct a ray set by passing through the laser point coordinates in the second set of laser point coordinates with the origin of the camera coordinate system as the endpoint; and calculate the first set of laser point coordinates based on the ray set and the calibration plate plane equation at the corresponding spacing. The first set of laser point coordinates consists of the intersection points of the rays in the ray set at the same spacing and the calibration plate plane.
[0038] In a laser image, laser lines may be quite wide, meaning each row or column of pixels may occupy multiple pixels. Therefore, for accurate subsequent calculations, the center point of each row or column of pixels represents the position coordinates of that row's laser line. This requires extracting the image coordinates of the center points of the laser lines in each row or column of the second image to obtain the first set of laser points. Specifically, the center points of the laser lines can be extracted row by row or column by column using methods such as the grayscale centroid method or the Steger method. The center points of all rows or columns of laser lines then constitute the laser line. Whether to extract the center points row by row or column by column depends on the distribution of the laser lines in the laser image. When the laser lines are distributed horizontally, they are extracted column by column; when they are distributed vertically, they are extracted row by row; and when they are distributed diagonally, they are extracted either row by row or column by column.
[0039] In some embodiments, the spatial coordinates of each laser point in each frame of laser image on the physical imaging plane or unit imaging plane in the camera coordinate system can be calculated using camera intrinsic parameters to obtain a second set of laser point coordinates. The physical imaging plane is the plane in the camera coordinate system with the focal length at its Z-coordinate, and the unit imaging plane is the plane in the camera coordinate system with a Z-coordinate of 1.
[0040] Using the origin of the camera coordinate system as the endpoint, a ray combination is constructed by passing through the laser points in the second laser point coordinate set corresponding to each frame image. The ray combination includes multiple rays. At each interval, each laser point on the calibration plane satisfies the corresponding ray equation and plane equation. By solving the intersection point of each ray equation and the corresponding calibration plate plane equation, the coordinates of each first laser point in the camera coordinate system can be obtained, and thus the coordinates of the first laser points in the camera coordinate system at multiple intervals can be obtained.
[0041] When calculating the laser plane parameters, the main control chip 110 is specifically used to: fit the coordinates of the first laser point corresponding to multiple frames of laser images into the laser plane to obtain the laser plane parameters.
[0042] Three points not lying on the same straight line can define a plane. Since laser points at the same spacing are all on the same straight line, the coordinates of laser points at at least two spacings can be fitted to obtain the laser plane parameters. In some implementations, M laser points can be selected when fitting the laser plane, and these M laser points must include laser points at at least two spacings, where M ≥ 3. The more laser points selected when fitting the laser plane, the more accurate the fitting result. For example, fitting the coordinates of laser points at all spacings will result in a more accurate laser plane. The laser plane parameters specifically refer to the laser plane equation.
[0043] After calibrating and obtaining the laser plane parameters of the laser emitter, the main control chip 110 can also be used to control the laser profilometer 108 to scan the target object, for example, by moving the print head 102 and / or the print bed 101 along the X-axis or Y-axis to obtain the point cloud data of the target object, and then perform 3D printing or 3D printing quality inspection. The target object can be a printed layer produced by the print bed 101 or the print head 102.
[0044] Specifically, the laser emitter in the laser profilometer 108 emits a laser line to the target object's main control chip 110. This laser line forms a plane, which corresponds to a laser plane equation, i.e., the laser plane parameters calculated in the above process. The camera in the laser profilometer 108 receives the laser line reflected back from the target object and generates a laser image. A ray is formed from the optical center of the camera and any laser point on the laser line in the laser image. The three-dimensional coordinates of the point can be determined by finding the intersection of the ray and the plane, so as to obtain the point cloud of the target object in the camera coordinate system.
[0045] Before a 3D printer begins printing an actual item, a pre-designed pattern is typically printed first; this is called the first layer printing. The main purpose of the first layer printing is to check the print quality. As a method of inspection, a laser profilometer is used to scan the printed pattern, and the print quality is checked based on the scanned point cloud data. This inspection method is less affected by subjective human factors compared to other methods such as visual inspection and manual inspection, and it also has other advantages such as being non-contact and highly accurate.
[0046] During 3D printing quality inspection, the main control chip 110 can specifically be used to: control the print head 102 to move to a position relative to the center of the print bed 101; the print head 102 prints a preset pattern on the print bed 101; the movement of the print head 102 drives the laser profilometer 104 to scan the printed preset pattern, obtaining the actual printed pattern point cloud data; by registering the actual printed pattern point cloud data with the preset printed pattern point cloud data, a printing quality result is generated based on the registration result. For example, when the difference is greater than a threshold, the printing quality is judged to be poor; when the difference is less than or equal to the threshold, the printing quality is judged to be good. When poor printing quality is detected, the flow rate of the print head 102 outlet can be readjusted, and / or the relative plane of the print head 102 and the print bed 101 can be adjusted to keep the print head 102 and any position on the print bed 101 relatively consistent. During registration, multiple key point cloud data can be selected for registration, or all point cloud data can be selected for registration. The difference threshold can be set based on empirical values.
[0047] like Figure 4 As shown, this application also provides a method for operating a laser profilometer, which is applied to the 3D printer provided in the above embodiments. The method includes the following steps:
[0048] S401. Move the print head and / or print bed so that the laser profilometer and the calibration plate are opposite each other in the Z-axis direction and have different spacing;
[0049] S402. At different intervals, control the camera to capture multiple frames of calibration images of the calibration board; turn on the laser emitter to project a laser line onto the calibration board, and control the camera to capture multiple frames of laser images corresponding to the multiple frames of calibration images.
[0050] S403. Calculate the laser plane parameters of the laser emitter based on the multi-frame calibration images and multi-frame laser images;
[0051] S404. Control the laser profilometer to scan the target object to obtain the target image, and use the laser plane parameters and the target image to obtain the point cloud data of the target object.
[0052] Steps 401 and 102 can be performed alternately. After obtaining the calibration image and laser image of the calibration plate at the corresponding interval, the plate is moved to another interval to obtain the corresponding calibration image and laser image of the calibration plate.
[0053] In some embodiments, step 403 includes: calculating the plane equation of the calibration plate plane in the camera coordinate system at multiple intervals based on multiple calibration images; extracting the set of laser points in each frame of laser image, and calculating the first set of laser point coordinates in the camera coordinate system according to the corresponding plane equation; and fitting the laser plane parameters according to the first set of laser point coordinates corresponding to the multiple frames of laser images.
[0054] In some embodiments, the calibration board has multiple calibration points. The planar equations of the calibration board plane in the camera coordinate system are calculated based on multiple frames of calibration images at multiple intervals, including: extracting calibration points from each frame of calibration images to obtain a set of calibration points; calculating camera intrinsic and extrinsic parameters based on the calibration point information in the calibration point set corresponding to at least one frame of calibration images; calculating the coordinate set of each calibration point set in the camera coordinate system based on the camera extrinsic parameters; and fitting the calibration points in each coordinate set of calibration points to obtain the corresponding planar equation.
[0055] In some embodiments, extracting the set of laser points in each frame of laser image and calculating the first set of laser point coordinates in the camera coordinate system according to the corresponding plane equation includes: extracting the center point of each row of laser lines or the center point of each column of laser lines from each frame of laser image to obtain the corresponding set of laser points in the image coordinate system; calculating the second set of laser point coordinates in the camera coordinate system according to the camera intrinsic parameters; constructing a ray set through the laser point coordinates in the second set of laser point coordinates with the origin of the camera coordinate system as the endpoint; and calculating the first set of laser point coordinates according to the ray set and the calibration plate plane equation at the corresponding spacing. The first set of laser point coordinates consists of the intersection points of the rays in the ray set at the same spacing and the calibration plate plane.
[0056] In some embodiments, fitting laser plane parameters based on the set of first laser point coordinates corresponding to multiple laser images includes: fitting the first laser point coordinates corresponding to multiple laser images into a laser plane to obtain laser plane parameters.
[0057] The specific details of each step in the above working method can be found in the description of 3D printers above, and will not be repeated here.
[0058] It should be understood that the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0059] It should also be understood that, in the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.
[0060] Furthermore, embodiments of this application also provide a computer-readable storage medium storing computer instructions for implementing the working method of the laser profilometer in the above-described method embodiments.
[0061] In addition, this application embodiment also provides a calibration device for a laser profilometer, used to calibrate the laser profilometer.
[0062] Figure 5 This is a structural example diagram of a calibration device provided in an embodiment of this application. The calibration device 500 includes a processor 502, a communication interface 503, and a memory 504. One example of the calibration device 500 is a chip. Another example of the calibration device 500 is a computing device.
[0063] The processor 502, memory 504, and communication interface 503 can communicate via a bus. The memory 504 stores executable code, and the processor 502 reads the executable code from the memory 504 to execute the corresponding method. The memory 504 may also include other software modules required by the running process, such as an operating system. For example, the executable code in the memory 504 is used to implement... Figure 4 The illustrated method of operation involves processor 502 reading the executable code from memory 504 to execute it. Figures 2 to 5 The method shown.
[0064] The processor 502 can be a CPU. The memory 504 can include volatile memory (VM), such as random access memory (RAM). The memory 504 can also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state disk (SSD).
[0065] In this application, the term "at least one" means one or more, and the term "multiple" means two or more.
[0066] It should be understood that the explanations and beneficial effects of the relevant contents of any of the devices or systems provided above can be referred to the corresponding method embodiments provided above, and will not be repeated here.
[0067] In this application, the term "at least one" means one or more, and the term "multiple" means two or more.
[0068] In this application, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor is there any limitation on the quantity or execution order. For example, "first calibration point" and "second calibration point" are only used for distinction and do not represent that "first calibration point" and "second calibration point" have different priorities.
[0069] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0070] It should be understood that determining B based on A does not mean determining B solely based on A; B can also be determined based on A and / or other information.
[0071] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0072] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0073] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0074] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0075] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory, random access memory, magnetic disks, or optical disks.
[0076] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for operating a laser profilometer, characterized in that, This invention is applied to a 3D printer, which includes a print head, a print bed, a laser profilometer, a calibration plate, and a main control chip. The laser profilometer includes a laser emitter and a camera. The plane of the calibration plate is parallel to or coincides with the surface of the print bed. The working method includes: Move the print head and / or the print bed so that the laser profilometer and the calibration plate are opposite each other in the Z-axis direction and have different spacing; At different intervals, the camera is controlled to capture multiple frames of calibration images of the calibration board; the laser emitter is turned on to project a laser line onto the calibration board, and the camera is controlled to capture images of the calibration board to obtain multiple frames of laser images corresponding to the multiple frames of calibration images; Calculate the laser plane parameters of the laser emitter based on the multiple frames of calibration images and the multiple frames of laser images; The laser profilometer is controlled to scan the target object to obtain a target image, and the point cloud data of the target object is obtained using the laser plane parameters and the target image; The step of calculating the laser plane parameters of the laser emitter based on the multiple frames of calibration images and the multiple frames of laser images includes: Based on the multi-frame calibration images, calculate the plane equation of the plane where the calibration board is located in the camera coordinate system at multiple intervals; Extract the set of laser points in each frame of the laser image, and calculate the first set of laser point coordinates in the camera coordinate system based on the corresponding plane equation; The laser plane parameters are obtained by fitting the set of coordinates of the first laser point corresponding to multiple frames of the laser image. The calibration board has multiple calibration points, and the calculation of the plane equation of the plane where the calibration board is located in the camera coordinate system at multiple intervals based on the multiple frames of calibration images includes: The calibration points in each frame of the calibration image are extracted to obtain a set of calibration points; the camera intrinsic and extrinsic parameters are calculated based on the calibration point information in the set of calibration points corresponding to at least one frame of the calibration image; the coordinate set of each set of calibration points in the camera coordinate system is calculated based on the camera extrinsic parameters; the calibration points in each set of calibration point coordinates are fitted to obtain the corresponding plane equation. The step of extracting the set of laser points in each frame of the laser image and calculating the first set of laser point coordinates in the camera coordinate system according to the corresponding plane equation includes: The center point of each row of laser lines or the center point of each column of laser lines are extracted from each frame of the laser image to obtain the set of laser points in the image coordinate system. Based on the camera intrinsic parameters, calculate the second laser point coordinate set corresponding to the laser point set in the camera coordinate system; Using the origin of the camera coordinate system as the endpoint, construct a ray set through the laser point coordinates in the second laser point coordinate set; Based on the ray set and the calibration plate plane equation at the corresponding spacing, the first laser point coordinate set is calculated. The first laser point coordinate set is composed of the intersection points of the rays in the ray set at the corresponding spacing and the plane where the calibration plate is located.
2. The working method according to claim 1, characterized in that, The step of fitting the laser plane parameters based on the set of coordinates of the first laser points corresponding to multiple frames of the laser images includes: The coordinates of the first laser point corresponding to multiple frames of the laser image are fitted to a laser plane to obtain the laser plane parameters.