A three-dimensional point cloud stitching method, device and equipment
By acquiring and processing the calibration plate images and raster images, the problem that the surface of the object needs to have obvious visual characteristics in the binocular three-dimensional reconstruction technology is solved, and a high-precision and robust three-dimensional point cloud splicing is achieved.
Patent Information
- Application Number
- CN202311765100.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-20
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2043-12-20
AI Technical Summary
The existing binocular three-dimensional reconstruction technology requires obvious visual characteristics on the surface of the object and requires artificial arrangement and positioning of marking points, resulting in cumbersome operation and large errors.
By acquiring multiple sets of calibration plate images and raster images, the structured light scanning device is calibrated, the three-dimensional point cloud of the target object is obtained, and it is converted from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system, and registration and fusion are performed to obtain the fusion point cloud.
Improve the accuracy and robustness of three-dimensional point cloud splicing, reduce artificial operations, simplify processes, improve efficiency and reduce errors.
Smart Images

Figure CN117710584B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and also to a three-dimensional point cloud stitching method, device and equipment. Background Art
[0002] Three-dimensional optical scanners can conveniently solve the high-precision measurement of most objects with poor surface texture. However, a large number of evenly distributed marking reflective points must be pasted on the surface of the object to be measured for frame stitching during scanning. The process of pasting marking points on the surface of each object to be measured is cumbersome and time-consuming, which increases the workload of scanning and measurement.
[0003] Binocular 3D reconstruction has certain requirements for the object to be modeled. The surface of the object must have obvious visual features. Reconstructing the model by overlapping multiple point cloud markers requires manual placement of markers on the surface of the object and positioning of the markers on the point cloud, which adds too many human factors and affects the modeling effect. Summary of the invention
[0004] The present invention provides a three-dimensional point cloud stitching method, device and equipment, which solves the problem that the surface of the object to be modeled in the existing binocular three-dimensional reconstruction must have obvious visual features, and the model is reconstructed by overlapping multiple point cloud marker points, which requires manual arrangement of markers on the surface of the object and positioning of the marker points on the point cloud, adding too many human factors to affect the modeling effect.
[0005] In order to solve the above technical problems, the technical solution of the present invention is as follows:
[0006] An embodiment of the present invention provides a three-dimensional point cloud stitching method, comprising:
[0007] Obtain multiple sets of calibration plate images and calibration plate grating pictures;
[0008] Performing scanner calibration on the calibration plate image and the calibration plate grating picture to obtain a structured light scanning device coordinate system;
[0009] Obtain the three-dimensional point cloud of the target object;
[0010] Converting the three-dimensional point cloud of the target object from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system to obtain a transformation initial value;
[0011] The initial values of the transformation are registered and fused to obtain a fused point cloud.
[0012] Optionally, obtaining a three-dimensional point cloud of the target object includes:
[0013] Mapping the calibration plate grating image from color to number based on the color grating to obtain a color code;
[0014] Generate a pseudo-random sequence, and encode the pseudo-random sequence to obtain a color projected sinusoidal grating;
[0015] Performing Fourier transformation on the color projection sinusoidal grating to obtain a periodic fringe grating principal value;
[0016] Analyze the main value of the periodic fringe grating to obtain periodic lines;
[0017] Calculate the grating period by using the color code, the grating principal value and the periodic line;
[0018] Calculate the phase by using the grating period and the periodic fringe grating principal value;
[0019] Through the phase and calibration equation, a three-dimensional point cloud of the target object is obtained.
[0020] Optionally, converting the three-dimensional point cloud of the target object from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system to obtain the initial value of the transformation includes:
[0021] Set a reference point set, and obtain a rotation matrix R and a translation matrix T through the reference point set;
[0022] The three-dimensional point cloud of the target object is transformed from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system through the rotation matrix R and the translation matrix T to obtain the initial value of the transformation.
[0023] Optionally, the setting of the reference point set and obtaining the rotation matrix R and the translation matrix T through the reference point set include:
[0024] Set a reference point set and record the coordinates of each reference point in the coordinate system of the calibration indoor positioning system and the coordinate system of the structured light scanning device;
[0025] Calculate the difference between the coordinate system of the calibration indoor positioning system and the coordinate system of the structured light scanning device for each reference point;
[0026] Through the difference, the rotation matrix R and the translation matrix T are obtained.
[0027] Optionally, the calibration equation is:
[0028]
[0029] Where θ is the absolute phase of the calibration plate grating image in the y direction, a1, a2, a3, a4, a5, a6, a7 and a8 are the system parameters to be calibrated, (X c , Y c , Z c ) are the coordinates of the corner points of the calibration plate.
[0030] Optionally, obtaining a three-dimensional point cloud of the target object through the phase and the calibration equation includes:
[0031] Obtaining an initial three-dimensional point cloud through the phase and calibration equations;
[0032] The initial three-dimensional point cloud is subjected to noise removal and edge point processing to obtain a three-dimensional point cloud of the target object.
[0033] Optionally, performing registration fusion on the initial values of the transformation to obtain a fused point cloud includes:
[0034] Performing surface fitting on the initial value of the transformation to obtain a fitting plane;
[0035] The distance is calculated according to the initial value of the transformation, and the distance is weighted to obtain a fused point cloud.
[0036] An embodiment of the present invention further provides a three-dimensional point cloud stitching device, comprising:
[0037] An acquisition module acquires multiple sets of calibration plate images and calibration plate grating pictures; performs camera calibration on the calibration plate images to obtain a structured light scanning device coordinate system; performs projector calibration on the calibration plate grating pictures to obtain a calibrated indoor positioning system coordinate system;
[0038] The processing module converts the calibrated indoor positioning system coordinate system into the structured light scanning device coordinate system to obtain a three-dimensional point cloud; and performs registration and fusion on the three-dimensional point cloud to obtain a fused point cloud.
[0039] An embodiment of the present invention further provides a computing device, comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed.
[0040] An embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the method described above.
[0041] The above solution of the present invention includes at least the following beneficial effects:
[0042] The above-mentioned scheme of the present invention is a method, device and equipment for 3D point cloud stitching, including: obtaining multiple groups of calibration plate images and calibration plate grating pictures; calibrating the calibration plate images and calibration plate grating pictures with a scanner to obtain a structured light scanning device coordinate system; obtaining a 3D point cloud of the target object; converting the 3D point cloud of the target object from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system to obtain a transformation initial value; performing registration and fusion on the transformation initial value to obtain a fused point cloud. The scheme of the present invention improves the accuracy of point cloud stitching, enhances robustness, and makes point cloud stitching more complete by registering the 3D point cloud, with simple operation, high efficiency and small error. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is a schematic diagram of the three-dimensional point cloud splicing process of the present invention;
[0044] Figure 2 It is a three-dimensional point cloud stitching flow chart of the present invention;
[0045] Figure 3 is a top view of the three-dimensional point cloud splicing device of the present invention;
[0046] Figure 4 It is the calibration board chessboard diagram of the present invention;
[0047] Figure 5 It is a schematic diagram of a three-dimensional point cloud splicing device diagram of the present invention. DETAILED DESCRIPTION
[0048] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to enable the scope of the present invention to be fully communicated to those skilled in the art.
[0049] like Figures 1 to 3 As shown, an embodiment of the present invention provides a three-dimensional point cloud stitching method, comprising:
[0050] S1, obtaining multiple sets of calibration plate images and calibration plate grating images;
[0051] S2, performing scanner calibration on the calibration plate image and the calibration plate grating picture to obtain a structured light scanning device coordinate system;
[0052] S3, obtaining a three-dimensional point cloud of the target object;
[0053] S4, converting the three-dimensional point cloud of the target object from the coordinate system of the structured light scanning device to the coordinate system of the calibration indoor positioning system to obtain an initial value of the transformation;
[0054] S5. Perform registration and fusion on the initial values of the transformation to obtain a fused point cloud.
[0055] In this embodiment, in step S1, the camera and the projector are fixed at a suitable angle, and the camera and the projector are kept relatively still during the calibration process; a calibration plate is prepared, and a standard ceramic calibration plate is used, such as Figure 4 As shown, it is a chessboard; the projector is turned off, the camera shoots the calibration plate, and obtains the calibration plate image; the projector is turned on, the projector projects a color grating on the calibration plate, and the camera shoots to obtain the calibration plate grating picture.
[0056] Change the position of the structured light scanning device coordinate system relative to the calibration plate, and repeat step S1, that is, take multiple sets of calibration plate images and calibration plate grating pictures at different positions, and take at least 15 sets of calibration plate images and calibration plate grating pictures.
[0057] In step S2, the camera or scanner is calibrated on the captured calibration plate image and the calibration plate grating image to obtain the internal and external parameters of the camera and save the position information of the corner points on each calibration plate. The external parameter of the camera is the posture of the calibration plate, and the internal parameter is used to convert the three-dimensional point into a two-dimensional point for optical position correction.
[0058] According to the projection of the grating onto the calibration plate, the absolute phase θ′ of the calibration plate grating image in the y direction is obtained. According to the absolute phase θ′ of the calibration plate grating image in the y direction, multiple sets of calibration plate images and calibration equations, the system parameters to be calibrated are calculated. The calculation formula is:
[0059]
[0060] Where θ′ is the absolute phase of the calibration plate grating image in the y direction, a1, a2, a3, a4, a5, a6, a7 and a8 are the system parameters to be calibrated, (X c ′,Y c ′,Z c ′) are the coordinates of the sample points.
[0061] The absolute phase of the calibration image in the y direction is calculated according to multiple sets of calibration plate grating images, system parameters to be calibrated and calibration equations;
[0062] The coordinates of the corner points on the calibration plate in the structured light scanning device coordinate system at each posture are calculated based on the absolute phase of the calibration image in the y direction, the system parameters to be calibrated and the calibration equation. The absolute phase θ of the calibration image in the y direction is calculated based on multiple sets of calibration plate grating images, the system parameters to be calibrated and the calibration equation;
[0063] According to the absolute phase θ of the calibration image in the y direction, the system parameters to be calibrated and the calibration equation, the coordinates of the corner points on the calibration plate in the coordinate system of the structured light scanning device at each posture are calculated.
[0064] In an optional embodiment of the present invention, step S3 includes:
[0065] S31, mapping the calibration plate grating image from color to number according to the color grating to obtain a color code;
[0066] S32, generating a pseudo-random sequence, and encoding the pseudo-random sequence to obtain a color projected sinusoidal grating;
[0067] S33, performing Fourier transform on the color projection sinusoidal grating to obtain a periodic fringe grating principal value;
[0068] S34, analyzing the main value of the periodic fringe grating to obtain a periodic line;
[0069] S35, calculating the grating period by using the color coding, the grating main value and the periodic line;
[0070] S36, calculating the phase by the grating period and the periodic stripe grating principal value;
[0071] S37. Obtain a three-dimensional point cloud of the target object through the phase and calibration equation.
[0072] In this embodiment, the three colors of red, green and blue are digitally encoded to provide a coding basis for image grating recognition; the main value of the periodic stripe grating is obtained based on Fourier transform to complete the main value enhancement optimization; the main value of the periodic stripe grating is a sinusoidal periodic grating signal, and the sinusoidal periodic grating signal is analyzed in the frequency domain to filter noise and improve the algorithm's environmental adaptability; the grating main value is analyzed to extract the periodic line; the grating period is calculated based on the periodic line, color coding and grating main value; the phase is calculated using the grating period and grating main value. Substitute the phase into the calibration equation to obtain a three-dimensional point cloud.
[0073] In an optional embodiment of the present invention, the calibration equation is:
[0074]
[0075] Where θ is the absolute phase of the calibration image in the y direction, a1, a2, a3, a4, a5, a6, a7 and a8 are the system parameters to be calibrated, (X c , Y c , Z c ) are the coordinates of the corner points of the calibration plate.
[0076] In an optional embodiment of the present invention, step S37 includes:
[0077] Obtaining an initial three-dimensional point cloud through the phase and calibration equations;
[0078] The initial three-dimensional point cloud is subjected to noise removal and edge point processing to obtain a three-dimensional point cloud of the target object.
[0079] In this embodiment, data processing of the three-dimensional point cloud can effectively remove noise, redundancy and discrete points, and improve the accuracy and precision of the three-dimensional point cloud data. Statistical filtering calculates the normal vector and curvature of the point cloud data, removes noise points and edge points, and improves the quality of the data.
[0080] In an optional embodiment of the present invention, step S4 includes:
[0081] S41, setting a reference point set, and obtaining a rotation matrix R and a translation matrix T through the reference point set;
[0082] S42. Convert the three-dimensional point cloud of the target object from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system through the rotation matrix R and the translation matrix T to obtain an initial value of the transformation.
[0083] In an optional embodiment of the present invention, step S41 includes:
[0084] S411, setting a reference point set, and recording the coordinates of each reference point in the coordinate system of the calibration indoor positioning system and the coordinate system of the structured light scanning device;
[0085] S412, calculating the difference between the coordinate system of the calibration indoor positioning system and the coordinate system of the structured light scanning device for each reference point;
[0086] S413. Obtain the rotation matrix R and the translation matrix T through the difference.
[0087] In this embodiment, in this embodiment, the conversion parameter RT of the indoor positioning system coordinate system (IPCS) and the structured light scanning device coordinate system (SLSC) is calibrated. A set of reference points is set, and for each reference point, its coordinates (x_ipcs, y_ipcs, z_ipcs) in the calibrated indoor positioning system coordinate system IPCS and its coordinates (x_slsc, y_slsc, z_slsc) in the structured light scanning device coordinate system SLSC are recorded. The difference between each reference point in the two coordinate systems is calculated, i.e., Δx = x_slsc-x_ipcs, Δy = y_slsc-y_ipcs, Δz = z_slsc-z_ipcs. According to the relationship between the difference, the rotation matrix and the translation matrix, R and the translation matrix T can be solved. For example, for Δx, Δx = R (x_ipcs-x_origin) + T, where R is the rotation matrix and x_origin is the coordinate of the origin of the indoor positioning system coordinate system IPCS in the structured light scanning device coordinate system SLSC. Similarly, R and T can be solved for Δy and Δz. By solving R and the translation matrix T, the coordinates in IPCS can be converted to coordinates in SLSC, and vice versa.
[0088] When the transformation between the two point clouds is completely unknown, a relatively rough alignment is performed, that is, the three-dimensional point cloud of the target object is converted from the coordinate system of the structured light scanning device to the coordinate system of the calibrated indoor positioning system for coarse alignment. The main purpose is to provide a better initial transformation value for fine alignment. According to RT (1, 2, 3...n) obtained in step 3, the three-dimensional point cloud is converted to the coordinate system of the indoor positioning system.
[0089] In an optional embodiment of the present invention, the registering and fusing the initial values of the transformation to obtain a fused point cloud includes:
[0090] Performing surface fitting on the initial value of the transformation to obtain a fitting plane;
[0091] The distance is calculated according to the initial value of the transformation, and the distance is weighted to obtain a fused point cloud.
[0092] In this embodiment, the registration fusion is fine registration. Fine registration is to give an initial transformation, and the coarse match is the initial value. A more accurate transformation is obtained by further optimization through fine registration, and the iterative closest point algorithm (PP-ICP). Initialization: Select an initial estimate, which is usually obtained through RANSAC or other robust estimation methods. Surface fitting: Overlap the point clouds in the two images. For each source point, find the nearest point in the destination, and use these two points and their connecting lines to fit a plane. Distance calculation: Calculate the distance between the source point and the destination plane. Weight assignment: Assign weights according to the distance of each matching point. Least squares method: Use weighted least squares method to update the transformation matrix. Repeat steps S4 and S5, iteratively and incrementally complete the fusion of the three-dimensional point cloud, and then complete the point cloud stitching.
[0093] like Figure 5 As shown, an embodiment of the present invention further provides a three-dimensional point cloud stitching device 5, comprising:
[0094] The acquisition module 51 acquires multiple sets of calibration plate images and calibration plate grating pictures; performs camera calibration on the calibration plate images to obtain a structured light scanning device coordinate system; performs projector calibration on the calibration plate grating pictures to obtain a calibrated indoor positioning system coordinate system;
[0095] The processing module 52 converts the calibrated indoor positioning system coordinate system into the structured light scanning device coordinate system to obtain a three-dimensional point cloud; and performs registration and fusion on the three-dimensional point cloud to obtain a fused point cloud.
[0096] Optionally, obtaining a three-dimensional point cloud of the target object includes:
[0097] Mapping the calibration plate grating image from color to number based on the color grating to obtain a color code;
[0098] Generate a pseudo-random sequence, and encode the pseudo-random sequence to obtain a color projected sinusoidal grating;
[0099] Performing Fourier transformation on the color projected sinusoidal grating to obtain a periodic fringe grating principal value;
[0100] Analyze the main value of the periodic fringe grating to obtain periodic lines;
[0101] Calculate the grating period by using the color code, the grating principal value and the periodic line;
[0102] Calculate the phase by the grating period and the periodic fringe grating principal value;
[0103] Through the phase and calibration equation, a three-dimensional point cloud of the target object is obtained.
[0104] Optionally, converting the three-dimensional point cloud of the target object from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system to obtain the initial value of the transformation includes:
[0105] Set a reference point set, and obtain a rotation matrix R and a translation matrix T through the reference point set;
[0106] The three-dimensional point cloud of the target object is transformed from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system through the rotation matrix R and the translation matrix T to obtain the initial value of the transformation.
[0107] Optionally, the setting of the reference point set and obtaining the rotation matrix R and the translation matrix T through the reference point set include:
[0108] Set a reference point set and record the coordinates of each reference point in the coordinate system of the calibration indoor positioning system and the coordinate system of the structured light scanning device;
[0109] Calculate the difference between the coordinate system of the calibration indoor positioning system and the coordinate system of the structured light scanning device for each reference point;
[0110] Through the difference, the rotation matrix R and the translation matrix T are obtained.
[0111] Optionally, the calibration equation is:
[0112]
[0113] Where θ is the absolute phase of the calibration plate grating image in the y direction, a1, a2, a3, a4, a5, a6, a7 and a8 are the system parameters to be calibrated, (X c , Y c , Z c ) are the coordinates of the corner points of the calibration plate.
[0114] Optionally, obtaining a three-dimensional point cloud of the target object through the phase and the calibration equation includes:
[0115] Obtaining an initial three-dimensional point cloud through the phase and calibration equations;
[0116] The initial three-dimensional point cloud is subjected to noise removal and edge point processing to obtain a three-dimensional point cloud of the target object.
[0117] Optionally, performing registration fusion on the initial values of the transformation to obtain a fused point cloud includes:
[0118] Performing surface fitting on the initial value of the transformation to obtain a fitting plane;
[0119] The distance is calculated according to the initial value of the transformation, and the distance is weighted to obtain a fused point cloud.
[0120] The steps of an implementation scheme of the present invention are as follows:
[0121] The steps for calibrating the structured light scanning device are as follows:
[0122] S1: Fix the camera and projector at appropriate angles and keep them relatively still during the calibration process;
[0123] S2: Prepare the calibration plate, using a standard ceramic calibration plate;
[0124] S3: The projector is turned off and the camera takes a picture of the calibration plate;
[0125] S4: The projector projects the color grating picture, and the camera takes pictures at the same time;
[0126] S5: Change the position of the structured light scanning device coordinate system relative to the calibration plate, repeat steps S3 and S4, and capture >15 sets of data;
[0127] S6: Use the captured calibration plate image to calibrate the camera, obtain the internal and external parameters of the camera and save the position information of each corner point on the calibration plate; the role of the internal parameter is to convert the three-dimensional point into a two-dimensional point for optical position correction;
[0128] S7: Projector calibration;
[0129] S7.1: The camera captures the picture with the grating on the chessboard, and calculates the absolute phase image Θ in the y direction;
[0130] S7.2: Calculate the coordinates of the corner points on the calibration plate in the structured light scanning device coordinates at each pose;
[0131] S7.3: Calculate the phase value of the corner point in the absolute phase image according to the corner point position information;
[0132] S7.4: Calculate the unknown parameters a1, a2, a3, a4, a5, a6, a7 and a8 according to the following formula;
[0133] Camera projector position mathematical model:
[0134]
[0135] Where a1, a2, a3, a4, a5, a6, a7 and a8 are the system parameters to be calibrated. c , Y c , Z c , Θ), is the collection sample point (X c , Y c, Z c , θ), fitting parameters. Thus, the relationship between the phase and the coordinate system of the structured light scanning device is established.
[0136] (2) Calibrate the transformation parameter RT of the indoor positioning system coordinate system (IPCS) and the structured light scanning device coordinate system (SLSC). Set a set of reference points. For each reference point, record its coordinates in IPCS (x_ipcs, y_ipcs, z_ipcs) and its coordinates in SLSC (x_slsc, y_slsc, z_slsc). Calculate the difference between each reference point in the two coordinate systems, that is, Δx = x_slsc-x_ipcs, Δy = y_slsc-y_ipcs, Δz = z_slsc-z_ipcs. According to the relationship between the difference and the rotation matrix and the translation matrix, R and the translation matrix T can be solved. For example, for Δx, Δx = R(x_ipcs-x_origin) + T, where R is the rotation matrix and x_origin is the coordinate of the origin of IPCS in SLSC. Similarly, R and T can be solved for Δy and Δz. By solving R and the translation matrix T, the coordinates in IPCS can be converted to coordinates in SLSC, and vice versa.
[0137] (3) Point cloud data processing can effectively remove noise, redundancy and discrete points, and improve the accuracy and precision of point cloud data. Statistical filtering can improve the quality of data by calculating the normal vector and curvature of point cloud data, removing noise points and edge points.
[0138] (4) Based on structured light modeling technology (Fourier profilometry + color grating phase solution), a set of three-dimensional point clouds of the object to be modeled is obtained. A color-to-digital mapping is made based on the collected color grating to generate color coding; the main value of the periodic stripe grating is obtained based on Fourier transform, and the main value enhancement optimization is completed. The sinusoidal periodic grating signal is analyzed in the frequency domain to filter noise and improve the algorithm's environmental adaptability; the period of the main value is analyzed and the periodic line is extracted; the grating period is calculated based on the periodic line, color coding, and main value; the phase is calculated using the period and main value. Substitute the phase into the calibration equation to obtain a three-dimensional point cloud.
[0139] (5) Coarse Registration: A relatively rough registration is performed when the transformation between the two point clouds is completely unknown. The main purpose is to provide a better initial transformation value for fine registration. According to the RT (1, 2, 3...n) obtained by the technique in step 1, the 3D point cloud is converted to the indoor positioning system coordinate system.
[0140] (6) Fine Registration Fine registration is to give an initial transformation, and the rough match is the initial value. Further optimization is performed to obtain a more accurate transformation, the iterative closest point algorithm (PP-ICP). Surface fitting: Overlapping bright spot clouds For each source point, find the nearest point in the destination, and use these two points and their connecting line to fit a plane. Distance calculation: Calculate the distance between the source point and the destination plane. Weight assignment: Assign weights according to the distance of each matching point. Least squares method: Use weighted least squares method to update the transformation matrix. (6) Repeat steps (2)(3)(4)(5)(6), iteratively and incrementally to complete object modeling.
[0141] It should be noted that the embodiments of the above method are all applicable to the embodiment of the device and can achieve the same technical effect.
[0142] The embodiment of the present invention further provides a computing device, comprising: a processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method described above is executed. The embodiments of the above method are applicable to this embodiment and can achieve the same technical effect.
[0143] The embodiment of the present invention further provides a computer-readable storage medium storing instructions, which, when executed on a computer, enable the computer to execute the above method. The above method embodiments are applicable to this embodiment and can achieve the same technical effect.
[0144] Those skilled in the art will appreciate that the units and algorithm steps of each example 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 performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0145] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0146] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0147] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0148] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0149] If the functions are implemented in the form of 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 the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical disks.
[0150] In addition, it should be noted that in the apparatus and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. Moreover, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order, and some steps can be performed in parallel or independently of each other. For those of ordinary skill in the art, it is understood that all or any steps or components of the method and apparatus of the present invention can be implemented in any computing device (including processors, storage media, etc.) or a network of computing devices in hardware, firmware, software or a combination thereof, which can be achieved by those of ordinary skill in the art using their basic programming skills after reading the description of the present invention.
[0151] Therefore, the purpose of the present invention can also be achieved by running a program or a group of programs on any computing device. The computing device can be a well-known general device. Therefore, the purpose of the present invention can also be achieved by simply providing a program product containing a program code that implements the method or device. That is to say, such a program product also constitutes the present invention, and the storage medium storing such a program product also constitutes the present invention. Obviously, the storage medium can be any well-known storage medium or any storage medium developed in the future. It should also be pointed out that in the device and method of the present invention, it is obvious that each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent schemes of the present invention. In addition, the steps of performing the above-mentioned series of processing can naturally be performed in chronological order according to the order of description, but it is not necessary to perform them in chronological order. Some steps can be performed in parallel or independently of each other.
[0152] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A three-dimensional point cloud stitching method, characterized in that: include: Obtain multiple sets of calibration plate images and calibration plate grating pictures; Performing scanner calibration on the calibration plate image and the calibration plate grating picture to obtain a structured light scanning device coordinate system; Obtain the three-dimensional point cloud of the target object; Converting the three-dimensional point cloud of the target object from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system to obtain a transformation initial value; Performing registration and fusion on the initial values of the transformation to obtain a fused point cloud; The step of registering and fusing the initial values of the transformation to obtain a fused point cloud includes: Performing surface fitting on the initial value of the transformation to obtain a fitting plane; Calculate the distance according to the initial value of the transformation, and assign weights to the distance to obtain a fused point cloud; Wherein, obtaining a three-dimensional point cloud of the target object includes: Mapping the calibration plate grating image from color to number based on the color grating to obtain a color code; Generate a pseudo-random sequence, and encode the pseudo-random sequence to obtain a color projected sinusoidal grating; Performing Fourier transformation on the color projection sinusoidal grating to obtain a periodic fringe grating principal value; Analyze the main value of the periodic fringe grating to obtain periodic lines; Calculate the grating period by using the color code, the grating principal value and the periodic line; Calculate the phase by using the grating period and the periodic fringe grating principal value; Obtaining a three-dimensional point cloud of the target object through the phase and calibration equation; Wherein, the calibration equation is: Where θ is the absolute phase of the calibration plate grating image in the y direction, a1, a2, a3, a4, a5, a6, a7 and a8 are the system parameters to be calibrated, (X c , Y c , Z c ) are the coordinates of the corner points of the calibration plate.
2. The three-dimensional point cloud stitching method according to claim 1, characterized in that: The step of converting the three-dimensional point cloud of the target object from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system to obtain the initial value of the transformation includes: Set a reference point set, and obtain a rotation matrix R and a translation matrix T through the reference point set; The three-dimensional point cloud of the target object is transformed from the structured light scanning device coordinate system to the calibration indoor positioning system coordinate system through the rotation matrix R and the translation matrix T to obtain the initial value of the transformation.
3. The three-dimensional point cloud stitching method according to claim 2, characterized in that: The setting of the reference point set and obtaining the rotation matrix R and the translation matrix T through the reference point set include: Set a reference point set and record the coordinates of each reference point in the coordinate system of the calibration indoor positioning system and the coordinate system of the structured light scanning device; Calculate the difference between the coordinate system of the calibration indoor positioning system and the coordinate system of the structured light scanning device for each reference point; Through the difference, the rotation matrix R and the translation matrix T are obtained.
4. The three-dimensional point cloud stitching method according to claim 3, characterized in that: The step of obtaining a three-dimensional point cloud of a target object by using the phase and the calibration equation includes: Obtaining an initial three-dimensional point cloud through the phase and calibration equations; The initial three-dimensional point cloud is subjected to noise removal and edge point processing to obtain a three-dimensional point cloud of the target object.
5. A three-dimensional point cloud stitching device, characterized in that: include: An acquisition module is used to acquire multiple sets of calibration plate images and calibration plate grating images; Performing camera calibration on the calibration plate image to obtain a structured light scanning device coordinate system; Calibrate the projector on the calibration plate grating image to obtain a calibrated indoor positioning system coordinate system; obtain a three-dimensional point cloud of the target object; A processing module converts the calibrated indoor positioning system coordinate system into the structured light scanning device coordinate system to obtain a transformation initial value; Performing registration and fusion on the obtained initial transformation values to obtain a fused point cloud; The registering and fusing the initial transformation values to obtain a fused point cloud includes: performing surface fitting on the initial transformation values to obtain a fitting plane; calculating a distance according to the initial transformation values, and performing weight distribution on the distance to obtain a fused point cloud; Wherein, obtaining a three-dimensional point cloud of the target object includes: Mapping the calibration plate grating image from color to number based on the color grating to obtain a color code; Generate a pseudo-random sequence, and encode the pseudo-random sequence to obtain a color projected sinusoidal grating; Performing Fourier transformation on the color projected sinusoidal grating to obtain a periodic fringe grating principal value; Analyze the main value of the periodic fringe grating to obtain periodic lines; Calculate the grating period by using the color code, the grating principal value and the periodic line; Calculate the phase by using the grating period and the periodic fringe grating principal value; Obtaining a three-dimensional point cloud of the target object through the phase and calibration equation; Wherein, the calibration equation is: Where θ is the absolute phase of the calibration plate grating image in the y direction, a1, a2, a3, a4, a5, a6, a7 and a8 are the system parameters to be calibrated, (X c , Y c , Z c ) are the coordinates of the corner points of the calibration plate.
6. A computing device, characterized in that include: A processor and a memory storing a computer program, wherein when the computer program is executed by the processor, the method according to any one of claims 1 to 4 is performed.
7. A computer-readable storage medium, characterized in that: Instructions are stored, and when the instructions are executed on a computer, the computer is caused to execute the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Point cloud measurement method and system
CN116026252A
Material pile lumpiness analysis method and device, electronic equipment and storage medium
CN117237395A