Point cloud stitching methods, systems, computer equipment, and readable storage media
By generating a two-dimensional grayscale image using a standard glass grid plate, determining the theoretical and actual coordinates of the reference point, and obtaining coordinate transformation parameters, the problem of high-precision stitching when the point cloud overlap rate is low is solved, and high-precision unified conversion of point cloud data is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-20
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies struggle to achieve high-precision point cloud stitching when the point cloud overlap rate is low, and errors accumulate and increase with repeated stitching.
Using a standard glass grid as a reference, a two-dimensional grayscale image is generated to determine the theoretical and actual coordinates of the reference point, obtain coordinate transformation parameters, and realize the unified transformation of point cloud data.
Achieving high-precision point cloud stitching when the point cloud overlap rate is low avoids dependence on high-overlapping features between regions and improves stitching accuracy.
Smart Images

Figure CN121544459B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of 3D reconstruction technology, and in particular to a point cloud stitching method, system, computer device, and readable storage medium. Background Technology
[0002] In the field of 3D reconstruction technology, point cloud stitching is a core step in 3D reconstruction. Its goal is to merge local point cloud datasets collected from different viewpoints or locations into a continuous, globally consistent 3D model.
[0003] Traditional point cloud stitching utilizes the common region of two sets of scanned data for stitching. However, the stitching accuracy of this method depends on the overlap rate between the point clouds. When the overlap ratio is low, the shared information available for establishing reliable correspondences is scarce, leading to inaccurate estimation of transformation parameters and directly affecting the accuracy of a single stitch. Furthermore, in scenarios requiring multiple consecutive stitches, the stitching error caused by the small overlap region gradually increases with the cumulative number of stitches, further reducing the point cloud stitching accuracy.
[0004] There is currently no effective solution for achieving high-precision point cloud stitching when the point cloud overlap rate is low. Summary of the Invention
[0005] Therefore, it is necessary to provide a point cloud stitching method, system, computer equipment, and readable storage medium that can achieve high-precision point cloud stitching when the point cloud overlap rate is low, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a point cloud stitching method, including:
[0007] Acquire 3D scan point cloud data of the first scan area of a standard glass grid plate;
[0008] A two-dimensional grayscale image corresponding to the first scanned area is generated based on the three-dimensional scanned point cloud data.
[0009] Based on the position of the intersection of the longitudinal and transverse engravings on the standard glass grid plate, the theoretical coordinates of the reference points on the standard glass grid plate are determined, and a first set of theoretical coordinates is obtained.
[0010] Based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate, the theoretical position of the reference point is located in the two-dimensional grayscale image;
[0011] Based on the theoretical position of the reference point, determine the actual coordinates of the feature points in the two-dimensional grayscale image corresponding to the reference point to obtain a first set of actual coordinates;
[0012] Obtain coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set;
[0013] Acquire 3D scan point cloud data of at least two scanned regions of the target object;
[0014] Based on the coordinate transformation parameters, the three-dimensional scanned point cloud data corresponding to each scanned area of the target object are transformed into the coordinate system corresponding to the theoretical coordinates to complete the point cloud stitching.
[0015] In one embodiment, locating the theoretical position of the reference point in the two-dimensional grayscale image based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate includes:
[0016] Three non-collinear reference points are selected from the reference points, and the theoretical positions of the three non-collinear reference points are located in the two-dimensional grayscale image according to the theoretical coordinates of the reference points.
[0017] Based on the theoretical grid spacing of the standard glass grid plate and the theoretical positions of the three non-collinear reference points, locate the theoretical positions of all the reference points in the two-dimensional grayscale image.
[0018] In one embodiment, determining the actual coordinates of the feature points corresponding to the reference point in the two-dimensional grayscale image based on the theoretical position of the reference point, to obtain a first set of actual coordinates, includes:
[0019] For each of the reference points, a corresponding crosshair region is selected in the two-dimensional grayscale image, wherein the crosshair region is the image region containing the crosshair where the theoretical position of the reference point is located;
[0020] Perform image edge detection on the crosshair region;
[0021] Based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region, determine the coordinates of the left and right edges of the vertical line within the crosshair region, and determine the center coordinates of the vertical line based on the coordinates.
[0022] Based on the gradient magnitude of each pixel in the vertical direction of the crosshair region, determine the coordinates of the upper and lower edges of the horizontal line within the crosshair region, and determine the center coordinates of the horizontal line based on the coordinates.
[0023] Based on the center coordinates of the vertical line determined in the crosshair region corresponding to all the reference points, the center vertical line on the two-dimensional grayscale image is determined.
[0024] Based on the center coordinates of the horizontal line determined in the crosshair region corresponding to all the reference points, the center horizontal line on the two-dimensional grayscale image is determined.
[0025] Calculate the intersection of the central vertical line and the central horizontal line to determine the actual coordinates of the feature points in the two-dimensional grayscale image.
[0026] In one embodiment, determining the coordinates of the left and right edges of the vertical line within the crosshair region based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region includes:
[0027] Based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region, determine the pixel coordinates corresponding to the maximum gradient magnitude, and then determine the coordinates of the left and right edges of the vertical lines within the crosshair region.
[0028] Determining the coordinates of the upper and lower edges of the horizontal line within the crosshair region based on the gradient magnitude of each pixel in the vertical direction of the crosshair region includes:
[0029] Based on the gradient magnitude of each pixel in the vertical direction of the crosshair region, the pixel coordinates corresponding to the maximum gradient magnitude are determined, thereby determining the coordinates of the upper and lower edges of the horizontal line within the crosshair region.
[0030] In one embodiment, determining the center coordinates of the vertical line based on the coordinates includes:
[0031] The sub-pixel edge coordinates of the left edge are obtained by using the gradient magnitude corresponding to the left edge and the gradient magnitude corresponding to the left and right adjacent pixels of the left edge;
[0032] The sub-pixel edge coordinates of the right edge are obtained by using the gradient magnitude corresponding to the right edge and the gradient magnitude corresponding to the left and right adjacent pixels of the right edge.
[0033] The center coordinates of the vertical line are determined based on the sub-pixel edge coordinates of the left edge and the sub-pixel edge coordinates of the right edge;
[0034] Determining the center coordinates of the horizontal line based on the coordinates includes:
[0035] The sub-pixel edge coordinates of the upper edge are obtained by using the gradient magnitude corresponding to the upper edge and the gradient magnitude corresponding to the upper and lower adjacent pixels.
[0036] The sub-pixel edge coordinates of the lower edge are obtained by using the gradient magnitude corresponding to the lower edge and the gradient magnitude corresponding to the upper and lower adjacent pixels of the lower edge.
[0037] The center coordinates of the vertical line are determined based on the sub-pixel edge coordinates of the upper edge and the sub-pixel edge coordinates of the lower edge.
[0038] In one embodiment, obtaining coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set includes:
[0039] Define a coordinate transformation expression between the theoretical coordinates and the actual coordinates, wherein the coordinate transformation expression includes coordinate transformation parameters to be solved;
[0040] Using the first theoretical coordinate set and the first actual coordinate set, the coordinate transformation parameters in the coordinate transformation expression are obtained.
[0041] In one embodiment, obtaining the coordinate transformation parameters in the coordinate transformation expression using the first theoretical coordinate set and the first actual coordinate set includes:
[0042] Using the first theoretical coordinate set and the first actual coordinate set, the coordinate transformation expression is fitted using the nonlinear least squares method, and the final coordinate transformation parameters are obtained with the goal of minimizing the coordinate transformation error.
[0043] Secondly, this application also provides a point cloud stitching system, the system comprising: a data acquisition and processing module, a coordinate calculation module, and a point cloud stitching execution module;
[0044] The data acquisition and processing module is used to acquire three-dimensional scanning point cloud data of the first scanning area of a standard glass grid plate; generate a two-dimensional grayscale image corresponding to the first scanning area based on the three-dimensional scanning point cloud data; and acquire three-dimensional scanning point cloud data of at least two scanning areas of the target object.
[0045] The coordinate calculation module is used to determine the theoretical coordinates of a reference point on the standard glass grid plate based on the position of the intersection of the longitudinal and transverse engravings, thereby obtaining a first theoretical coordinate set; to locate the theoretical position of the reference point in the two-dimensional grayscale image based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate; to determine the actual coordinates of the feature points corresponding to the reference point in the two-dimensional grayscale image based on the theoretical position of the reference point, thereby obtaining a first actual coordinate set; and to obtain coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set.
[0046] The point cloud stitching execution module is used to convert the three-dimensional scanned point cloud data corresponding to each scanned area of the target object to the coordinate system corresponding to the theoretical coordinates based on the coordinate transformation parameters, so as to complete the point cloud stitching.
[0047] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0048] Acquire 3D scan point cloud data of the first scan area of a standard glass grid plate;
[0049] A two-dimensional grayscale image corresponding to the first scanned area is generated based on the three-dimensional scanned point cloud data.
[0050] Based on the position of the intersection of the longitudinal and transverse engravings on the standard glass grid plate, the theoretical coordinates of the reference points on the standard glass grid plate are determined, and a first set of theoretical coordinates is obtained.
[0051] Based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate, the theoretical position of the reference point is located in the two-dimensional grayscale image;
[0052] Based on the theoretical position of the reference point, determine the actual coordinates of the feature points in the two-dimensional grayscale image corresponding to the reference point to obtain a first set of actual coordinates;
[0053] Obtain coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set;
[0054] Acquire 3D scan point cloud data of at least two scanned regions of the target object;
[0055] Based on the coordinate transformation parameters, the three-dimensional scanned point cloud data corresponding to each scanned area of the target object are transformed into the coordinate system corresponding to the theoretical coordinates to complete the point cloud stitching.
[0056] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0057] Acquire 3D scan point cloud data of the first scan area of a standard glass grid plate;
[0058] A two-dimensional grayscale image corresponding to the first scanned area is generated based on the three-dimensional scanned point cloud data.
[0059] Based on the position of the intersection of the longitudinal and transverse engravings on the standard glass grid plate, the theoretical coordinates of the reference points on the standard glass grid plate are determined, and a first set of theoretical coordinates is obtained.
[0060] Based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate, the theoretical position of the reference point is located in the two-dimensional grayscale image;
[0061] Based on the theoretical position of the reference point, determine the actual coordinates of the feature points in the two-dimensional grayscale image corresponding to the reference point to obtain a first set of actual coordinates;
[0062] Obtain coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set;
[0063] Acquire 3D scan point cloud data of at least two scanned regions of the target object;
[0064] Based on the coordinate transformation parameters, the three-dimensional scanned point cloud data corresponding to each scanned area of the target object are transformed into the coordinate system corresponding to the theoretical coordinates to complete the point cloud stitching.
[0065] The aforementioned point cloud stitching method, system, computer equipment, and readable storage medium generate two-dimensional scanned point cloud data based on three-dimensional scanned point cloud data, laying the foundation for subsequent accurate acquisition of feature point coordinates and the theoretical coordinates of the reference points corresponding to the feature points. By using a standard glass grid plate as a reference and utilizing the theoretical coordinates of the reference points and the actual coordinates of the feature points to obtain coordinate transformation parameters, the precise coordinate transformation relationship is determined. Using these coordinate transformation parameters, the three-dimensional point clouds of at least two scanned regions of the target object are uniformly transformed to the same theoretical coordinate system, avoiding dependence on highly overlapping features between regions, thereby achieving high-precision point cloud stitching even when the point cloud overlap rate is low. Attached Figure Description
[0066] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0067] Figure 1 This is an application environment diagram of a point cloud stitching method in one embodiment;
[0068] Figure 2 This is a flowchart illustrating a point cloud stitching method in one embodiment;
[0069] Figure 3 This is a schematic diagram of a sample of a standard glass grid plate in one embodiment;
[0070] Figure 4This is a schematic diagram of a two-dimensional grayscale image corresponding to the first scanning area in one embodiment;
[0071] Figure 5 This is a schematic diagram showing the actual coordinates of the feature points in the first row in an example embodiment.
[0072] Figure 6 This is a schematic diagram showing the actual coordinates of each feature point in the first row of feature points in an example embodiment;
[0073] Figure 7 This is a schematic diagram of pixel coordinates and the actual coordinates of the corresponding feature points in an example embodiment;
[0074] Figure 8 This is a schematic diagram of the parameters and residuals obtained according to the iterative formula in an example embodiment;
[0075] Figure 9 This is a schematic diagram simulating the matching result in an example embodiment;
[0076] Figure 10 This is a schematic diagram of a partial effect of point cloud stitching between the first and second scan areas in an example embodiment;
[0077] Figure 11 This is a flowchart illustrating a point cloud stitching method in an example embodiment;
[0078] Figure 12 This is a schematic diagram of the point cloud stitching system in one embodiment;
[0079] Figure 13 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0080] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0081] The point cloud stitching method provided in this application embodiment can be applied to, for example... Figure 1In the application environment shown, the 3D scanning device 102 communicates with the server 104 via a network. A data storage system can store the data that the server 104 needs to process. The data storage system can be integrated onto the server 104, or it can be placed in the cloud or on another network server. The 3D scanning device 102 is used to scan a standard glass grid plate and a target object to obtain 3D point cloud data of a first scanned area of the standard glass grid plate and 3D point cloud data of at least two scanned areas of the target object. Server 104 acquires 3D scanning point cloud data of the first scanning area of a standard glass grid plate from 3D scanning device 102; generates a 2D grayscale image corresponding to the first scanning area based on the 3D scanning point cloud data; determines the theoretical coordinates of a reference point on the standard glass grid plate based on the position of the intersection of the longitudinal and transverse engraving lines, and obtains a first theoretical coordinate set; locates the theoretical position of the reference point in the 2D grayscale image according to the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate; determines the actual coordinates of the feature points corresponding to the reference point in the 2D grayscale image according to the theoretical position of the reference point, and obtains a first actual coordinate set; and obtains coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set.
[0082] In one embodiment, such as Figure 2 As shown, a point cloud stitching method is provided, including the following steps:
[0083] Step 201: Obtain the three-dimensional scanning point cloud data of the first scanning area of the standard glass grid plate.
[0084] The first scanning area is the area to be scanned on the standard glass grid plate.
[0085] The standard glass grid plate is a metrological standard instrument with grid-like or cross-shaped two-dimensional coordinate lines etched on a transparent glass substrate. The center position of each grid intersection is precisely determined during manufacturing. A sample of the standard glass grid plate is shown below. Figure 3 As shown, the standard glass grid sample has a 1mm interval between two adjacent grid lines, and the entire grid area consists of 21 vertical lines and 17 horizontal lines.
[0086] Among them, 3D scan point cloud data is a collection of discrete points on the surface of an object or in space in a 3D coordinate system. Each point contains its spatial location information and can be supplemented with attributes such as color, reflection intensity, and normal vector.
[0087] Optionally, a 3D scanning device scans the first scanning area of the standard glass grid plate, and point clouds can be collected according to a set fixed step size and scanning sequence.
[0088] Optionally, the 3D scanning device is a desktop device, and the position of the 3D scanning device remains unchanged.
[0089] Optionally, the three-dimensional scanning device is a micro-nano-level three-dimensional topology instrument. By scanning the area to be scanned using a micro-nano-level three-dimensional topology instrument, the accuracy of point cloud stitching can be improved.
[0090] Step 202: Generate a two-dimensional grayscale image corresponding to the first scanned area based on the three-dimensional scanned point cloud data.
[0091] Optionally, the three-dimensional scanned point cloud data includes the three-dimensional coordinates and grayscale values of the points in the point cloud, wherein the grayscale values are mapped from the attributes of the points in the point cloud.
[0092] Optionally, the X-axis and Y-axis coordinates of points in the 3D scanned point cloud data are arranged according to a set fixed step size and scanning order. The grayscale value carried by each point in the point cloud is filled into the corresponding pixel position, thereby generating a 2D grayscale image corresponding to the first scanned area. The generated 2D grayscale image result is as follows: Figure 4 As shown, in this two-dimensional grayscale image, the raised or recessed lines on the glass grid plate appear as lines with varying brightness.
[0093] Optionally, after excluding the Z-axis data of the points in the three-dimensional scanned point cloud data, a two-dimensional grayscale image corresponding to the first scanned area is generated using the three-dimensional scanned point cloud data containing the X-axis coordinate data, Y-axis coordinate data, and grayscale values of the points in the point cloud.
[0094] Step 203: Determine the theoretical coordinates of the reference points on the standard glass grid plate based on the positions of the intersections of the longitudinal and transverse engravings, and obtain the first set of theoretical coordinates.
[0095] The reference point corresponds to the intersection of the longitudinal and transverse engravings on the standard glass grid plate.
[0096] Step 204: Based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate, locate the theoretical position of the reference point in the two-dimensional grayscale image.
[0097] Step 205: Based on the theoretical position of the reference point, determine the actual coordinates of the feature points in the two-dimensional grayscale image corresponding to the reference point to obtain a first set of actual coordinates.
[0098] The feature points are the intersections of horizontal and vertical lines extracted from the two-dimensional grayscale image.
[0099] Optionally, the number of feature points is ,in The range of values is ,use Indicates the first There are 1 feature points, among which The range of values is .
[0100] Step 206: Obtain coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set.
[0101] Optionally, the scanning areas of the target object may or may not overlap.
[0102] Step 207: Obtain 3D scan point cloud data of at least two scan areas of the target object.
[0103] Step 208: Based on the coordinate transformation parameters, the three-dimensional scanned point cloud data corresponding to each scanned area of the target object is transformed to the coordinate system corresponding to the theoretical coordinates to complete the point cloud stitching.
[0104] In the aforementioned point cloud stitching method, two-dimensional scanned point cloud data is generated based on three-dimensional scanned point cloud data, laying the foundation for subsequent accurate acquisition of feature point coordinates and the theoretical coordinates of the reference points corresponding to the feature points. By using a standard glass grid plate as a reference, and utilizing the theoretical coordinates of the reference points and the actual coordinates of the feature points to obtain coordinate transformation parameters, the precise coordinate transformation relationship is determined. Using these coordinate transformation parameters, the three-dimensional point clouds of at least two scanned regions of the target object are uniformly transformed to the same theoretical coordinate system, avoiding dependence on highly overlapping features between regions, thereby achieving high-precision point cloud stitching when the point cloud overlap rate is low.
[0105] In one embodiment, locating the theoretical position of the reference point in the two-dimensional grayscale image based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate includes: selecting three non-collinear reference points among the reference points, and locating the theoretical positions of the three non-collinear reference points in the two-dimensional grayscale image based on the theoretical coordinates of the reference points; and locating the theoretical positions of all the reference points in the two-dimensional grayscale image based on the theoretical grid spacing of the standard glass grid plate and the theoretical positions of the three non-collinear reference points.
[0106] Optionally, when locating the theoretical position of the reference point, a pixel coordinate neighborhood containing the theoretical position is set as the test range to test the stability of determining the actual coordinates of the feature point based on the theoretical position of the reference point.
[0107] In one example embodiment, the theoretical positions of the three non-collinear reference points are located in the two-dimensional grayscale image. When the interval between two adjacent grid lines of a standard glass grid plate is 1 mm, based on the determined theoretical positions of the reference points, the theoretical positions of all the reference points can be located in the two-dimensional grayscale image by extending the coordinates in the horizontal and vertical directions with a step size of 1 mm.
[0108] By locating the theoretical positions of the three non-collinear reference points in the two-dimensional grayscale image, and based on the theoretical grid spacing of the standard glass grid plate and the theoretical positions of the three non-collinear reference points, the theoretical positions of all the reference points in the two-dimensional grayscale image can be located, thereby improving data processing speed.
[0109] In one embodiment, determining the actual coordinates of feature points corresponding to the reference point in the two-dimensional grayscale image based on the theoretical position of the reference point to obtain a first set of actual coordinates includes: for each theoretical position of the reference point, selecting a corresponding crosshair region in the two-dimensional grayscale image, wherein the crosshair region is an image region containing the crosshair where the theoretical position of the reference point is located; performing image edge detection on the crosshair region; determining the coordinates of the left and right edges of the vertical line within the crosshair region based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region, and determining the vertical line based on the coordinates. The center coordinates of the line; based on the gradient magnitude of each pixel in the vertical direction of the crosshair region, the coordinates of the upper and lower edges of the horizontal line in the crosshair region are determined, and the center coordinates of the horizontal line are determined based on the coordinates; based on the center coordinates of the vertical lines determined in the crosshair region corresponding to all the reference points, the center vertical line on the two-dimensional grayscale image is determined; based on the center coordinates of the horizontal lines determined in the crosshair region corresponding to all the reference points, the center horizontal line on the two-dimensional grayscale image is determined; the intersection of the center vertical line and the center horizontal line is calculated to determine the actual coordinates of the feature points in the two-dimensional grayscale image.
[0110] Optionally, image edge detection of the crosshair region can be performed using the Sobel operator, Prewitt operator, Roberts operator, or Canny operator. When using the Sobel operator to perform image edge detection of the crosshair region, the horizontal kernel used for detecting vertical edges in the Sobel operator is utilized. and vertical kernels for detecting horizontal edges Convolution is performed on the crosshair region to obtain the gradient magnitude of each pixel in the horizontal and vertical directions.
[0111] Among them, horizontal kernel for:
[0112]
[0113] Vertical core for:
[0114]
[0115] Optionally, determining the central vertical line on the two-dimensional grayscale image based on the center coordinates of the vertical lines determined in the crosshair regions corresponding to all the reference points includes: fitting the central vertical line using the least squares method based on the center coordinates of the vertical lines. Determining the central horizontal line on the two-dimensional grayscale image based on the center coordinates of the horizontal lines determined in the crosshair regions corresponding to all the reference points includes: fitting the central horizontal line using the least squares method based on the center coordinates of the horizontal lines.
[0116] In one example embodiment, the set of extracted feature points is denoted as... Then the set of matrices formed by the actual coordinates of the feature points is .like Figure 5 As shown, the actual coordinates of the feature points in the first row of the 2D image corresponding to the first scanned area are displayed. Along the scanning direction from left to right, they are respectively... , , , and .
[0117] Optionally, this can be achieved by analyzing each feature point against a specified reference point. The distance between them is used to assess the accuracy of the coordinates. For example... Figure 6 As shown, the feature point spacing extraction accuracy is very high, approximately 0.2 micrometers.
[0118] In one example embodiment, when locating the theoretical position of the reference point, a pixel coordinate neighborhood containing the theoretical position is set as a test range to test the stability of determining the actual coordinates of the feature point based on the theoretical position of the reference point. Figure 7 As shown, if pixel coordinates (619, 1500) to (625, 1506) are set as the test range, the standard deviation of the actual coordinates of the feature points obtained according to the test range is less than or equal to 0.00000420, indicating that determining the actual coordinates of the feature points based on the theoretical position of the reference point has stability.
[0119] In one embodiment, determining the coordinates of the left and right edges of the vertical line within the crosshair region based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region includes: determining the pixel coordinates corresponding to the maximum gradient magnitude based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region, thereby determining the coordinates of the left and right edges of the vertical line within the crosshair region; determining the coordinates of the upper and lower edges of the horizontal line within the crosshair region based on the gradient magnitude of each pixel in the vertical direction of the crosshair region includes: determining the pixel coordinates corresponding to the maximum gradient magnitude based on the gradient magnitude of each pixel in the vertical direction of the crosshair region, thereby determining the coordinates of the upper and lower edges of the horizontal line within the crosshair region.
[0120] In this process, the gradient magnitude of each pixel in the horizontal direction is a non-negative value. After determining the pixel coordinates corresponding to the maximum gradient magnitude, the method further includes using the gradient direction to determine the coordinates of the left and right edges of the vertical lines within the crosshair region.
[0121] In one example embodiment, when performing image edge detection on the crosshair region using the Sobel operator, the horizontal kernel in the Sobel operator used for detecting vertical edges is utilized. Convolving the crosshair region yields the convolved image. Determining the coordinates of the maximum gradient magnitude determines the edge coordinates, which include the left and right edge coordinates of the vertical lines. If, along the data detection direction, the convolved image of the vertical lines in the crosshair region exhibits a "white-black-white" grayscale distribution from left to right, then the edge where grayscale changes from white to black from left to right is determined as the left edge of the vertical line, and the edge where grayscale changes from black to white from left to right is determined as the right edge of the vertical line. It can be understood that the upper and lower edge coordinates of the horizontal lines can also be determined using a similar method.
[0122] In one embodiment, determining the center coordinates of the vertical line based on the coordinates includes: performing quadratic spline interpolation using the gradient magnitude corresponding to the left edge and the gradient magnitudes corresponding to the left and right adjacent pixels of the left edge to obtain the sub-pixel edge coordinates of the left edge; performing quadratic spline interpolation using the gradient magnitude corresponding to the right edge and the gradient magnitudes corresponding to the left and right adjacent pixels of the right edge to obtain the sub-pixel edge coordinates of the right edge; and determining the center coordinates of the vertical line based on the sub-pixel edge coordinates of the left edge and the sub-pixel edge coordinates of the right edge. Determining the center coordinates of the horizontal line based on the coordinates includes: performing quadratic spline interpolation using the gradient magnitude corresponding to the upper edge and the gradient magnitudes corresponding to the upper and lower adjacent pixels of the upper edge to obtain the sub-pixel edge coordinates of the upper edge; performing quadratic spline interpolation using the gradient magnitude corresponding to the lower edge and the gradient magnitudes corresponding to the upper and lower adjacent pixels of the lower edge to obtain the sub-pixel edge coordinates of the lower edge; and determining the center coordinates of the vertical line based on the sub-pixel edge coordinates of the upper edge and the sub-pixel edge coordinates of the lower edge.
[0123] Optionally, a gradient vector is constructed using the gradient magnitude corresponding to the left edge and the gradient magnitudes corresponding to the left and right adjacent pixels of the left edge. The gradient vector is then interpolated using quadratic splines to obtain a continuous function. The derivative of this continuous function is calculated and set to zero to obtain the sub-pixel edge coordinates of the left edge. It can be understood that the sub-pixel edge coordinates of the left, top, and bottom edges can also be obtained using a similar method.
[0124] By using quadratic spline interpolation, more accurate position coordinates of the edge can be obtained.
[0125] In one embodiment, obtaining coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set includes: defining a coordinate transformation expression between the theoretical coordinates and the actual coordinates, wherein the coordinate transformation expression includes coordinate transformation parameters to be solved; and obtaining the coordinate transformation parameters in the coordinate transformation expression using the first theoretical coordinate set and the first actual coordinate set.
[0126] The coordinate transformation expression between the theoretical coordinates and the actual coordinates can be derived from a translation and rotation relationship. Definition. Wherein , and There are three translation parameters. , and There are three rotation parameters. The coordinate transformation expression can be obtained from the translation and rotation matrices. Translation matrix. for:
[0127]
[0128] The rotation matrices include matrices for rotation around the Z-axis, rotation around the Y-axis, and rotation around the Z-axis. Specifically, the matrix for rotation around the Z-axis... matrix for:
[0129]
[0130] Rotate around the Y-axis matrix for:
[0131]
[0132] Rotate around the X-axis matrix for:
[0133]
[0134] Optionally, the coordinate transformation parameters in the coordinate transformation expression are obtained using a coordinate set selected from the first theoretical coordinate set and the first actual coordinate set.
[0135] In one example embodiment, the set of obtained reference points is denoted as... The set of extracted feature points is denoted as The matrix set consisting of the theoretical coordinates of the reference point is denoted as . The set of matrices formed by the actual coordinates is denoted as , and If points have the same index, then according to the translation matrix... Rotation around the Z-axis matrix Rotation around the Y-axis matrix and rotation around the X-axis matrix The set of matrices formed by theoretical coordinates can be obtained. The set of matrices formed by the actual coordinates The coordinate transformation expression is:
[0136]
[0137] The coordinate transformation expression includes the coordinate transformation parameters to be solved. , , , , and .
[0138] In one embodiment, obtaining the coordinate transformation parameters in the coordinate transformation expression using the first theoretical coordinate set and the first actual coordinate set includes: using the first theoretical coordinate set and the first actual coordinate set, fitting the coordinate transformation expression using a nonlinear least squares method, and solving for the final coordinate transformation parameters with the goal of minimizing the coordinate transformation error.
[0139] Optionally, the set of extracted feature points The A matrix set formed by substituting the actual coordinates of each feature point into its theoretical coordinates. The set of matrices formed by the actual coordinates The coordinate transformation expression can be obtained as follows:
[0140]
[0141] in, , For the first Feature points Coordinates about The function expression, For the first Feature points Coordinates about The function expression, For the first Feature points Coordinates about The function expression, For the first The actual coordinates of each feature point are related to The system of equations transformed from the function expression. When there is When there are 1 feature points, the following formula can be further obtained:
[0142]
[0143] Where Y is a matrix set consisting of the theoretical coordinates of the reference points, which is composed of the three-dimensional coordinates of the subscript markers of the two-dimensional grayscale image of the first scan area corresponding to the reference points, arranged in a one-to-one correspondence. for A set of equations.
[0144] Using a matrix of all zeros as initial value The iteration is performed according to the iterative formula, and the LM algorithm is used for further iteration, so that... To minimize the sum of the squares of the errors on both sides, we can obtain... The best-fit estimated value. Among them, the iterative formula is:
[0145]
[0146] Among them, is the Jacobian matrix of
[0147] In an exemplary embodiment, for a sample of a standard glass grid plate as shown in Figure 3 , a set of reference points can be obtained. Based on the positions of the vertical and horizontal engraved line intersection points of the standard glass grid plate, the theoretical coordinates of the reference points on the standard glass grid plate are determined. The theoretical coordinates of each reference point in the set of reference points are listed in the form of a matrix , and a matrix set constituted by the theoretical coordinates of the reference points can be obtained. For example, by listing the theoretical coordinates of [[ID= in the form of a matrix , can be obtained. By listing the theoretical coordinates of in the form of a matrix , can be obtained.
[0148] In an exemplary embodiment, for a two-dimensional grayscale image corresponding to a first scanning area as shown in Figure 4 , the set of feature points extracted includes [[ID=]] to . According to the iterative formula, the coordinate transformation parameters and the residual table obtained by iteration are as shown in Figure 8 . Optionally, to verify the accuracy of the iterative algorithm, the iterative theoretical values and the measured values are exported to the metrology software supporting three-dimensional measurement application analysis for simulation matching, and the matching results are as shown in Figure 9 . By analyzing and comparing the results obtained by the iterative algorithm and the results obtained by simulation matching, it can be seen that the iterative algorithm can effectively achieve rotation and translation fitting.
[0149] Optionally, three-dimensional scanned point cloud data of the first and second scanned areas of a standard glass mesh plate are acquired; the theoretical coordinates of the reference points on the standard glass mesh plate are determined based on the positions of the intersections of the longitudinal and transverse engravings, obtaining a first set of theoretical coordinates; based on the coordinate transformation parameters, the three-dimensional scanned point cloud data corresponding to each scanned area of the standard glass mesh plate are transformed to the coordinate system corresponding to the theoretical coordinates, thereby completing the point cloud stitching of the first and second scanned areas of the standard glass mesh plate. The second scanned area is the second area to be scanned on the standard glass mesh plate. The point cloud stitching effect can be verified by stitching the first and second scanned areas of the standard glass mesh plate. The local effect of the point cloud stitching of the first and second scanned areas of the standard glass mesh plate is shown in the image. Figure 10 As shown.
[0150] In one example embodiment, a point cloud stitching method is provided. Figure 11 The flowchart of this method includes the following steps:
[0151] Step 1101: Obtain the three-dimensional scanning point cloud data of the first scanning area of the standard glass grid plate, and generate a two-dimensional grayscale image corresponding to the first scanning area.
[0152] Step 1102: Determine the theoretical coordinates of the reference points on the standard glass grid plate based on the positions of the intersections of the longitudinal and transverse engravings, and obtain the first set of theoretical coordinates.
[0153] Step 1103: Select three non-collinear reference points from the reference points, and locate the theoretical positions of the three non-collinear reference points in the two-dimensional grayscale image according to the theoretical coordinates of the reference points.
[0154] Step 1104: Based on the theoretical grid spacing of the standard glass grid plate and the theoretical positions of the three non-collinear reference points, locate the theoretical positions of all the reference points in the two-dimensional grayscale image.
[0155] Step 1105: For the theoretical position of each reference point, select a corresponding crosshair region in the two-dimensional grayscale image, and perform image edge detection on the crosshair region, wherein the crosshair region is the image region containing the crosshair where the theoretical position of the reference point is located.
[0156] Step 1106: Determine the coordinates of the left and right edges of the vertical line within the crosshair region based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region, and determine the center coordinates of the vertical line based on the coordinates.
[0157] Step 1107: Determine the coordinates of the upper and lower edges of the horizontal line within the crosshair region based on the gradient magnitude of each pixel in the vertical direction of the crosshair region, and determine the center coordinates of the horizontal line based on the coordinates.
[0158] Step 1108: Determine the center vertical line on the two-dimensional grayscale image based on the center coordinates of the vertical line determined in the crosshair region corresponding to all the reference points.
[0159] Step 1109: Determine the center horizontal line on the two-dimensional grayscale image based on the center coordinates of the horizontal line determined in the crosshair region corresponding to all the reference points.
[0160] Step 1110: Calculate the intersection of the central vertical line and the central horizontal line to determine the actual coordinates of the feature points in the two-dimensional grayscale image, so as to obtain the first set of actual coordinates.
[0161] Step 1111: Obtain coordinate transformation parameters using the first theoretical coordinate set obtained in step 1102 and the first actual coordinate set obtained in step 1110.
[0162] Step 1112: Obtain 3D scan point cloud data of at least two scan areas of the target object. Based on the coordinate transformation parameters, transform the 3D scan point cloud data corresponding to each scan area of the target object to the coordinate system corresponding to the theoretical coordinates to complete the point cloud stitching.
[0163] It is understandable that the order of executing steps 1106 and 1107 can be changed to first executing step 1107 to determine the center coordinates of the horizontal line, and then executing step 1106 to determine the center coordinates of the vertical line; the order of executing steps 1108 and 1109 can be changed to first executing step 1109 to determine the center horizontal line, and then executing step 1108 to determine the center vertical line.
[0164] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0165] Based on the same inventive concept, this application also provides a point cloud stitching system. The solution provided by this system is similar to the solution described in the above method. Therefore, the specific limitations in the point cloud stitching system embodiments provided below can be found in the limitations of the point cloud stitching method above, and will not be repeated here.
[0166] In one embodiment, such as Figure 12 As shown, a point cloud stitching system is provided, the system including: a data acquisition and processing module 121, a coordinate calculation module 122, and a point cloud stitching execution module 123;
[0167] The data acquisition and processing module 121 is used to acquire three-dimensional scanning point cloud data of the first scanning area of a standard glass grid plate; generate a two-dimensional grayscale image corresponding to the first scanning area based on the three-dimensional scanning point cloud data; and acquire three-dimensional scanning point cloud data of at least two scanning areas of the target object.
[0168] The coordinate calculation module 122 is used to determine the theoretical coordinates of a reference point on the standard glass grid plate based on the position of the intersection of the longitudinal and transverse engravings of the standard glass grid plate, thereby obtaining a first theoretical coordinate set; to locate the theoretical position of the reference point in the two-dimensional grayscale image based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate; to determine the actual coordinates of the feature points corresponding to the reference point in the two-dimensional grayscale image based on the theoretical position of the reference point, thereby obtaining a first actual coordinate set; and to obtain coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set.
[0169] The point cloud stitching execution module 123 is used to convert the three-dimensional scanned point cloud data corresponding to each scanned area of the target object to the coordinate system corresponding to the theoretical coordinates based on the coordinate transformation parameters, so as to complete the point cloud stitching.
[0170] The modules in the aforementioned point cloud stitching system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0171] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 13As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When executed by the processor, the computer program implements a point cloud stitching method.
[0172] Those skilled in the art will understand that Figure 13 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0173] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0174] A three-dimensional scanned point cloud data of a first scanned area of a standard glass grid plate is acquired; a two-dimensional grayscale image corresponding to the first scanned area is generated based on the three-dimensional scanned point cloud data; the theoretical coordinates of a reference point on the standard glass grid plate are determined based on the position of the intersection of the longitudinal and transverse scribing lines, thus obtaining a first theoretical coordinate set; the theoretical position of the reference point is located in the two-dimensional grayscale image according to the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate; the actual coordinates of the feature points corresponding to the reference point in the two-dimensional grayscale image are determined according to the theoretical position of the reference point, thus obtaining a first actual coordinate set; coordinate transformation parameters are obtained using the first theoretical coordinate set and the first actual coordinate set; three-dimensional scanned point cloud data of at least two scanned areas of a target object are acquired; based on the coordinate transformation parameters, the three-dimensional scanned point cloud data corresponding to each scanned area of the target object are transformed to the coordinate system corresponding to the theoretical coordinates to complete point cloud stitching.
[0175] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0176] A three-dimensional scanned point cloud data of a first scanned area of a standard glass grid plate is acquired; a two-dimensional grayscale image corresponding to the first scanned area is generated based on the three-dimensional scanned point cloud data; the theoretical coordinates of a reference point on the standard glass grid plate are determined based on the position of the intersection of the longitudinal and transverse scribing lines, thus obtaining a first theoretical coordinate set; the theoretical position of the reference point is located in the two-dimensional grayscale image according to the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate; the actual coordinates of the feature points corresponding to the reference point in the two-dimensional grayscale image are determined according to the theoretical position of the reference point, thus obtaining a first actual coordinate set; coordinate transformation parameters are obtained using the first theoretical coordinate set and the first actual coordinate set; three-dimensional scanned point cloud data of at least two scanned areas of a target object are acquired; based on the coordinate transformation parameters, the three-dimensional scanned point cloud data corresponding to each scanned area of the target object are transformed to the coordinate system corresponding to the theoretical coordinates to complete point cloud stitching.
[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0178] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0179] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0180] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A point cloud stitching method, characterized in that, include: Acquire 3D scan point cloud data of the first scan area of a standard glass grid plate; A two-dimensional grayscale image corresponding to the first scanned area is generated based on the three-dimensional scanned point cloud data. Based on the position of the intersection of the longitudinal and transverse engravings on the standard glass grid plate, the theoretical coordinates of the reference points on the standard glass grid plate are determined, and a first set of theoretical coordinates is obtained. Based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate, the theoretical position of the reference point is located in the two-dimensional grayscale image; Determining the actual coordinates of feature points corresponding to the reference points in the two-dimensional grayscale image based on the theoretical positions of the reference points to obtain a first set of actual coordinates includes: selecting a corresponding crosshair region in the two-dimensional grayscale image for each theoretical position of the reference point, wherein the crosshair region is an image region containing the crosshair where the theoretical position of the reference point is located; determining the coordinates of the left and right edges of the vertical lines within the crosshair region, and determining the center coordinates of the vertical lines based on the coordinates; determining the coordinates of the upper and lower edges of the horizontal lines within the crosshair region, and determining the center coordinates of the horizontal lines based on the coordinates; determining the central vertical line on the two-dimensional grayscale image based on the center coordinates of the vertical lines determined in the crosshair regions corresponding to all the reference points; determining the central horizontal line on the two-dimensional grayscale image based on the center coordinates of the horizontal lines determined in the crosshair regions corresponding to all the reference points; calculating the intersection of the central vertical line and the central horizontal line to determine the actual coordinates of the feature points in the two-dimensional grayscale image to obtain the first set of actual coordinates. Obtain coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set; Acquire 3D scan point cloud data of at least two scan areas of the target object; Based on the coordinate transformation parameters, the three-dimensional scanned point cloud data corresponding to each scanned area of the target object are transformed into the coordinate system corresponding to the theoretical coordinates to complete the point cloud stitching.
2. The method according to claim 1, characterized in that, The step of locating the theoretical position of the reference point in the two-dimensional grayscale image based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate includes: Three non-collinear reference points are selected from the reference points, and the theoretical positions of the three non-collinear reference points are located in the two-dimensional grayscale image based on the theoretical coordinates of the reference points. Based on the theoretical grid spacing of the standard glass grid plate and the theoretical positions of the three non-collinear reference points, locate the theoretical positions of all the reference points in the two-dimensional grayscale image.
3. The method according to claim 1, characterized in that, After selecting a corresponding crosshair region in the two-dimensional grayscale image, the method further includes image edge detection of the crosshair region. The step of determining the coordinates of the left and right edges of the vertical line within the crosshair region and determining the center coordinates of the vertical line based on the coordinates includes: determining the coordinates of the left and right edges of the vertical line within the crosshair region based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region, and determining the center coordinates of the vertical line based on the coordinates. Determining the coordinates of the upper and lower edges of the horizontal line within the crosshair region, and determining the center coordinates of the horizontal line based on the coordinates, includes: determining the coordinates of the upper and lower edges of the horizontal line within the crosshair region based on the gradient magnitude of each pixel in the vertical direction of the crosshair region, and determining the center coordinates of the horizontal line based on the coordinates.
4. The method according to claim 3, characterized in that, Determining the coordinates of the left and right edges of the vertical line within the crosshair region based on the gradient magnitude of each pixel in the horizontal direction includes: Based on the gradient magnitude of each pixel in the horizontal direction of the crosshair region, determine the pixel coordinates corresponding to the maximum gradient magnitude, and then determine the coordinates of the left and right edges of the vertical lines within the crosshair region. Determining the coordinates of the upper and lower edges of the horizontal line within the crosshair region based on the gradient magnitude of each pixel in the vertical direction of the crosshair region includes: Based on the gradient magnitude of each pixel in the vertical direction of the crosshair region, the pixel coordinates corresponding to the maximum gradient magnitude are determined, thereby determining the coordinates of the upper and lower edges of the horizontal line within the crosshair region.
5. The method according to claim 3, characterized in that, Determining the center coordinates of the vertical line based on the coordinates includes: The sub-pixel edge coordinates of the left edge are obtained by using the gradient magnitude corresponding to the left edge and the gradient magnitude corresponding to the left and right adjacent pixels of the left edge; The sub-pixel edge coordinates of the right edge are obtained by using the gradient magnitude corresponding to the right edge and the gradient magnitude corresponding to the left and right adjacent pixels of the right edge. The center coordinates of the vertical line are determined based on the sub-pixel edge coordinates of the left edge and the sub-pixel edge coordinates of the right edge; Determining the center coordinates of the horizontal line based on the coordinates includes: The sub-pixel edge coordinates of the upper edge are obtained by using the gradient magnitude corresponding to the upper edge and the gradient magnitude corresponding to the upper and lower adjacent pixels. The sub-pixel edge coordinates of the lower edge are obtained by using the gradient magnitude corresponding to the lower edge and the gradient magnitude corresponding to the upper and lower adjacent pixels of the lower edge. The center coordinates of the vertical line are determined based on the sub-pixel edge coordinates of the upper edge and the sub-pixel edge coordinates of the lower edge.
6. The method according to claim 1, characterized in that, The step of obtaining coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set includes: Define a coordinate transformation expression between the theoretical coordinates and the actual coordinates, wherein the coordinate transformation expression includes coordinate transformation parameters to be solved; Using the first theoretical coordinate set and the first actual coordinate set, the coordinate transformation parameters in the coordinate transformation expression are obtained.
7. The method according to claim 6, characterized in that, The step of obtaining the coordinate transformation parameters in the coordinate transformation expression using the first theoretical coordinate set and the first actual coordinate set includes: Using the first theoretical coordinate set and the first actual coordinate set, the coordinate transformation expression is fitted using the nonlinear least squares method, and the final coordinate transformation parameters are obtained with the goal of minimizing the coordinate transformation error.
8. A point cloud stitching system, characterized in that, The system includes: a data acquisition and processing module, a coordinate calculation module, and a point cloud stitching execution module; wherein... The data acquisition and processing module is used to acquire three-dimensional scanning point cloud data of the first scanning area of a standard glass grid plate; generate a two-dimensional grayscale image corresponding to the first scanning area based on the three-dimensional scanning point cloud data; and acquire three-dimensional scanning point cloud data of at least two scanning areas of the target object. The coordinate calculation module is used to determine the theoretical coordinates of a reference point on the standard glass grid plate based on the position of the intersection of the longitudinal and transverse engravings, thereby obtaining a first theoretical coordinate set; to locate the theoretical position of the reference point in the two-dimensional grayscale image based on the theoretical coordinates of the reference point and the theoretical grid spacing of the standard glass grid plate; to determine the actual coordinates of the feature points corresponding to the reference point in the two-dimensional grayscale image based on the theoretical position of the reference point, thereby obtaining a first actual coordinate set; and to obtain coordinate transformation parameters using the first theoretical coordinate set and the first actual coordinate set. The point cloud stitching execution module is used to convert the three-dimensional scanned point cloud data corresponding to each scanned area of the target object to the coordinate system corresponding to the theoretical coordinates based on the coordinate transformation parameters, so as to complete the point cloud stitching. The step of determining the actual coordinates of the feature points corresponding to the reference points in the two-dimensional grayscale image based on the theoretical positions of the reference points to obtain a first set of actual coordinates includes: for each theoretical position of the reference point, selecting a corresponding crosshair region in the two-dimensional grayscale image, wherein the crosshair region is an image region containing the crosshair where the theoretical position of the reference point is located; determining the coordinates of the left and right edges of the vertical lines within the crosshair region, and determining the center coordinates of the vertical lines based on the coordinates; determining the coordinates of the upper and lower edges of the horizontal lines within the crosshair region, and determining the center coordinates of the horizontal lines based on the coordinates; determining the central vertical line on the two-dimensional grayscale image based on the center coordinates of the vertical lines determined in the crosshair regions corresponding to all the reference points; determining the central horizontal line on the two-dimensional grayscale image based on the center coordinates of the horizontal lines determined in the crosshair regions corresponding to all the reference points; and calculating the intersection of the central vertical line and the central horizontal line to determine the actual coordinates of the feature points in the two-dimensional grayscale image to obtain the first set of actual coordinates.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Point cloud registration system and method
CN103425689A
Point cloud splicing method and device, equipment and storage medium
CN112967189A