A method, device and related equipment for stitching keyboard point cloud images

By converting the three-dimensional point cloud image into a plane point cloud image, determining the displacement distances in multiple directions, and splicing the keyboard point cloud images based on these displacement distances, the problem of poor splicing in the existing technology is solved, and an efficient, concise and accurate Keyboard point cloud image stitching.

CN118096524BActive Publication Date: 2024-09-03SUZHOU JIERUISI INTELLIGENT TECH CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202410508812.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-26
Publication Date
2024-09-03
Estimated Expiration
2044-04-26

AI Technical Summary

Technical Problem

The existing technology has problems of registration failure and poor performance during the stitching process of keyboard point cloud images, especially when processing massive point cloud data, it is difficult to stitch accurately.

Method used

By acquiring multiple parallel three-dimensional point clouds obtained by continuous linear scanning of the keyboard, vertical projection is performed to obtain a planar point cloud, and the horizontal displacement data and vertical displacement data are determined based on the gaps and overlapping areas in the planar point cloud, and then the Adjacent three-dimensional point cloud images are stitched together.

Benefits of technology

It effectively reduces the dependence on massive point cloud data, improves the accuracy and efficiency of splicing, and achieves a splicing effect with an error of less than 0.01mm.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118096524B
    Figure CN118096524B
Patent Text Reader

Abstract

The present application relates to the field of image processing technology, and in particular to a method, device and related equipment for stitching keyboard point cloud images. The method includes: obtaining multiple mutually parallel stereo point cloud images obtained by continuous linear scanning of the keyboard, and vertically projecting the stereo point cloud images to obtain a plane point cloud image; determining two adjacent stereo point cloud images to be stitched based on the arrangement order of the multiple stereo point cloud images; determining the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data according to the overlapped area and the gap in the corresponding plane point cloud image; stitching the two adjacent stereo point cloud images to be stitched according to the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data until all the stereo point cloud images are stitched together to obtain a keyboard point cloud image. The present application can solve the technical problems of registration failure and poor effect in the process of stitching keyboard point cloud images in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device and related equipment for stitching keyboard point cloud images. Background Art

[0002] In real applications, keyboard surface defects are usually detected based on the keyboard point cloud image. In the prior art, the keyboard surface point cloud data can be obtained by line scanning laser, but because the scanning width of a single line scanning laser is smaller than the geometric size of the keyboard, usually only a partial line scanning 3D point cloud image of the keyboard can be obtained by scanning with a single line scanning laser, and then multiple partial line scanning 3D point cloud images are spliced ​​to obtain the keyboard point cloud image.

[0003] In practical applications, the ICP (Iterative Closest Point) method and the NDT (Non-Destructive Testing) method can be used to stitch two adjacent local line scan stereo point cloud images of the keyboard.

[0004] Specifically, the ICP method achieves stitching by finding the closest points in two groups of point clouds and minimizing the distance between them; the NDT method finds the transformation that can minimize the difference between the two groups of point clouds based on the probability distribution of the point cloud data; however, in actual operation, both the ICP method and the NDT method have difficulty in processing the massive point clouds in the local line scan stereo point cloud images, resulting in the problems of registration failure and poor effect in the stitching process of the ICP method and the NDT method. Summary of the invention

[0005] In view of this, the purpose of the present application is to provide a method, device and related equipment for stitching keyboard point cloud images to solve the technical problems of failed registration and poor effect in the process of stitching keyboard point cloud images in the prior art.

[0006] In a first aspect, the present application provides a method for stitching a keyboard point cloud image, the method comprising:

[0007] A plurality of mutually parallel three-dimensional point cloud images are obtained by continuous linear scanning of the keyboard, and the three-dimensional point cloud images are vertically projected to obtain a plane point cloud image; a gap is displayed in the plane point cloud image, and the gap indicates a gap area between two adjacent keys; and there is an overlap area between two adjacent three-dimensional point cloud images;

[0008] Determining two adjacent three-dimensional point cloud images to be spliced ​​based on the arrangement order of the plurality of three-dimensional point cloud images;

[0009] For the two adjacent three-dimensional point cloud images to be spliced, determine the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data according to the overlapped area and the gap in the corresponding two-dimensional point cloud images;

[0010] The two adjacent stereo point cloud images to be spliced ​​are spliced ​​according to the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data of the two adjacent stereo point cloud images to be spliced, until all the stereo point cloud images are spliced ​​in the arrangement order to obtain a keyboard point cloud image.

[0011] Preferably, after acquiring a plurality of mutually parallel stereoscopic point cloud images obtained by continuously linearly scanning the keyboard, the method further comprises:

[0012] Flipping the plurality of the three-dimensional point cloud images so that the edge features in the length direction that are opposite in each pair of adjacent three-dimensional point cloud images coincide with each other;

[0013] According to the projection formula, the three-dimensional point cloud image is vertically projected to obtain the plane point cloud image.

[0014] Preferably, for the two adjacent three-dimensional point cloud images to be stitched, determining the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data according to the overlapped area and the gap in the corresponding plane point cloud images includes:

[0015] For the two adjacent 3D point cloud images to be spliced, selecting a positioning gap for determining the first horizontal displacement data and the second horizontal displacement data from a plurality of gaps of the planar point cloud image corresponding to each of the 3D point cloud images;

[0016] For the two adjacent three-dimensional point cloud images to be spliced, determine the side position of the positioning gap used to determine the first horizontal displacement data and determine the first horizontal displacement data according to the side position;

[0017] For the two adjacent three-dimensional point cloud images to be spliced, the side position of the positioning gap used to determine the second horizontal displacement data is determined, and the second horizontal displacement data is determined according to the side position.

[0018] Preferably, for the two adjacent three-dimensional point cloud images to be stitched, determining the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data according to the overlapped area and the gap in the corresponding plane point cloud images includes:

[0019] For the two adjacent three-dimensional point cloud images to be spliced, the vertical displacement data is determined according to the width of the overlapping area.

[0020] In a second aspect, the present application provides a device for stitching a keyboard point cloud image, the device comprising: a point cloud module, a calculation module and a stitching module;

[0021] The point cloud module is used to obtain a plurality of mutually parallel three-dimensional point cloud images obtained by continuous linear scanning of the keyboard, and vertically project the three-dimensional point cloud images to obtain a plane point cloud image; a gap is displayed in the plane point cloud image, and the gap indicates a gap area between two adjacent keys; there is an overlap area between two adjacent three-dimensional point cloud images;

[0022] The point cloud module is further used to determine two adjacent three-dimensional point cloud images to be spliced ​​based on the arrangement order of the plurality of three-dimensional point cloud images;

[0023] The calculation module is used to determine the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data according to the overlapped area and the gap in the corresponding plane point cloud images for the two adjacent three-dimensional point cloud images to be spliced;

[0024] The splicing module is used to splice the two adjacent stereo point cloud images to be spliced ​​according to the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data of the two adjacent stereo point cloud images to be spliced, until all the stereo point cloud images are spliced ​​in the arrangement order to obtain the keyboard point cloud image.

[0025] Preferably, the point cloud module is also used to perform flipping processing on the multiple three-dimensional point cloud images so that the edge features in the relative length directions in each pair of adjacent three-dimensional point cloud images match each other; and is also used to perform vertical projection on the three-dimensional point cloud images according to the projection formula to obtain the plane point cloud image.

[0026] Preferably, the calculation module is further used to select, for the two adjacent stereo point cloud images to be spliced, a positioning gap for determining the first horizontal displacement data and the second horizontal displacement data from a plurality of gaps in the plane point cloud image corresponding to each of the stereo point cloud images;

[0027] It is also used to determine, for the two adjacent three-dimensional point cloud images to be spliced, a side position of the positioning gap used to determine the first horizontal displacement data and determine the first horizontal displacement data according to the side position;

[0028] It is also used to determine the side position of the positioning gap used to determine the second horizontal displacement data for the two adjacent three-dimensional point cloud images to be spliced, and determine the second horizontal displacement data according to the side position.

[0029] Preferably, the calculation module is further used to determine the vertical displacement data according to the width of the overlapping area for the two adjacent three-dimensional point cloud images to be spliced.

[0030] In a third aspect, the present application provides a computer-readable storage medium, comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the above-mentioned keyboard point cloud image stitching method.

[0031] In a fourth aspect, the present application provides a computer program product, which includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the above-mentioned keyboard point cloud image stitching method.

[0032] Beneficial effects:

[0033] The present application provides a method for stitching a keyboard point cloud image, the method comprising: obtaining a plurality of mutually parallel stereo point cloud images obtained by continuous linear scanning of a keyboard, and vertically projecting the stereo point cloud images to obtain a plane point cloud image; there is an overlapping area between two adjacent stereo point cloud images; determining two adjacent stereo point cloud images to be stitched based on the arrangement order of the plurality of stereo point cloud images; for the two adjacent stereo point cloud images to be stitched, determining first horizontal displacement data, second horizontal displacement data, and vertical displacement data according to the overlapping area and the gap in the corresponding plane point cloud images; stitching the two adjacent stereo point cloud images to be stitched according to the first horizontal displacement data, second horizontal displacement data, and vertical displacement data of the two adjacent stereo point cloud images to be stitched, until all the stereo point cloud images are stitched in the arrangement order to obtain a keyboard point cloud image.

[0034] In summary, the present application converts a three-dimensional point cloud image into a plane point cloud image, first determines the displacement distances in two directions in the horizontal plane through the plane point cloud image corresponding to the two adjacent three-dimensional point cloud images to be spliced, then determines the displacement distance in the vertical direction according to the two adjacent three-dimensional point cloud images to be spliced, and finally splices the two adjacent three-dimensional point cloud images according to the displacement distances in multiple directions, until all the three-dimensional point cloud images are spliced ​​in order of arrangement to obtain a keyboard point cloud image; compared with the splicing method in the prior art that needs to rely on massive point cloud data to directly splice three-dimensional point cloud images, the method of splicing three-dimensional point cloud images with the help of plane point cloud images in the present application effectively reduces the dependence on massive point cloud data, and therefore has an efficient and concise implementation effect, and also improves the accuracy of splicing. In actual operation, a splicing effect with an error of less than 0.01mm can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 This is a flow chart of a method for stitching keyboard point cloud images in an embodiment of the present application;

[0037] FIG. 2( a ) and FIG. 2( b ) are example diagrams of plane point cloud images corresponding to the edge area and non-edge area of ​​the keyboard in an embodiment of the present application;

[0038] Figure 3 This is a flowchart of S110 in the method for stitching keyboard point cloud images in an embodiment of the present application;

[0039] Figure 4 This is a flowchart of S130 in the method for stitching keyboard point cloud images in an embodiment of the present application;

[0040] FIG. 5( a ) and FIG. 5( b ) are example diagrams of horizontal side positions in a plane point cloud diagram corresponding to an edge area and a non-edge area of ​​a keyboard in an embodiment of the present application;

[0041] FIG. 6( a ) and FIG. 6( b ) are example diagrams of determining horizontal displacement data between two adjacent plane point cloud images based on the same positioning gap and different positioning gaps in an embodiment of the present application;

[0042] FIG. 7( a ) and FIG. 7( b ) are example diagrams of the overlapped area between two adjacent planar point cloud images based on the same positioning gap and different positioning gaps in an embodiment of the present application;

[0043] Figure 8 A schematic diagram of determining vertical displacement data in an embodiment of the present application;

[0044] Fig. 9 It is a structural diagram of a keyboard point cloud image stitching device in an embodiment of the present application. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0046] First, the present application provides a flowchart of a method for stitching keyboard point cloud images, such as Figure 1 As shown, Figure 1 This is a flow chart of a method for stitching keyboard point cloud images in an embodiment of the present application. The method includes S110 to S140, which are specifically as follows:

[0047] S110: Acquire a plurality of mutually parallel three-dimensional point cloud images obtained by continuous linear scanning of the keyboard, and vertically project the three-dimensional point cloud images to obtain a plane point cloud image.

[0048] Among them, a gap is displayed in the plane point cloud image, and the gap indicates the gap area between two adjacent keys; there is an overlapping area between two adjacent three-dimensional point cloud images.

[0049] Specifically, the plane point cloud image is a point cloud height image that indicates the height of the keyboard based on color depth. As shown in Figure 2(a) and Figure 2(b), Figure 2(a) and Figure 2(b) are example images of plane point cloud images corresponding to the edge area and non-edge area of ​​the keyboard in the embodiment of the present application, wherein Figure 2(a) is a plane point cloud image corresponding to the non-edge area of ​​the keyboard, and Figure 2(b) is a plane point cloud image corresponding to the edge area of ​​the keyboard.

[0050] It should be noted that the "non-edge area" and the "edge area" are relatively determined relative to the scanning direction of the keyboard. The edge area refers to the keyboard area displayed in the plane point cloud corresponding to the starting point of the splicing and the plane point cloud corresponding to the end point of the splicing, and the non-edge area is the keyboard area displayed in the plane point cloud located between the edge areas. Now, for example, in an embodiment of the present application, the scan is started from one width end side of the keyboard until the scan ends at the other width end side of the keyboard. In actual operation, when multiple three-dimensional point cloud images need to be spliced, one width end side is also selected as the splicing starting point, and then the other three-dimensional point cloud images are spliced ​​to the width end side one by one according to the scanning order. Therefore, the "non-edge area" here refers to the area between the two width ends of the keyboard. Similarly, if the scan is started from one length end side of the keyboard until the scan ends at the other length end side of the keyboard, then the "non-edge area" refers to the area between the two length ends of the keyboard.

[0051] According to Figure 2(a) and Figure 2(b), each plane point cloud has a dark gap. The actual role of the gap is as a reference, that is, the displacement data between two adjacent plane point clouds can be obtained based on the position of the gap. Subsequently, a plane point cloud can be operated to move the displacement data until it is spliced ​​with another plane point cloud. In actual operation, it is necessary to select one or several gaps from multiple gaps as a reference for splicing. Depending on the scanning direction (the length direction of the keyboard or the width direction of the keyboard), the selected gap is also different. When scanning along the length direction of the keyboard, as shown in Figure 2(a) and Figure 2(b), the selected gap is usually the gap area between two adjacent rows of keys in the keyboard; when scanning along the width direction of the keyboard, the selected gap is usually the gap area between two adjacent keys in a row of multiple keys.

[0052] In actual operation, when obtaining a three-dimensional point cloud image of a keyboard through a line scanning laser instrument, in order to ensure that the point cloud image of all areas of the keyboard can be collected, it is necessary to control the line scanning laser instrument so that there is a certain overlapping area between two adjacent three-dimensional point cloud images.

[0053] In one implementation, Figure 3 As shown, Figure 3 This is a flow chart of S110 in the method for stitching keyboard point cloud images in an embodiment of the present application, where S110 includes S1101 to S1103, as shown below:

[0054] S1101: Acquire a plurality of mutually parallel three-dimensional point cloud images obtained by continuously folding back the linear scan of the keyboard along the length direction or the width direction of the keyboard.

[0055] Specifically, the length direction of the keyboard refers to scanning from one width end side of the keyboard to the other width end side along a direction parallel to the long side direction of the keyboard; the width direction of the keyboard refers to scanning from one length end side of the keyboard to the other length end side along a direction parallel to the short side direction of the keyboard. In actual operation, scanning along the length direction or the width direction helps to improve the convenience of splicing the plane point cloud map through the gaps in the plane point cloud map. The "continuous folding" scanning method helps to speed up the scanning progress.

[0056] S1102: Flipping the plurality of 3D point cloud images so that edge features in the length direction that are opposite to each other in each pair of adjacent 3D point cloud images are aligned with each other.

[0057] Specifically, after multiple 3D point cloud images are obtained through the "continuous folding" scanning method, the edge features between the multiple 3D point cloud images do not match each other. Therefore, in actual operation, it is necessary to flip the multiple 3D point cloud images obtained through the continuous folding scanning method so that any two adjacent 3D point cloud images can be spliced ​​by horizontal and / or vertical translation operations.

[0058] In the actual operation of flipping, every three-dimensional point cloud needs to be flipped. In order to confirm the coordinates of each sampling point in the flipped three-dimensional point cloud, the three-dimensional point cloud to be flipped needs to be placed in the coordinate system before flipping. The length side of the placed three-dimensional point cloud (looking down) is consistent with the length side of the plane coordinate system. Axis parallel, the width side in the three-dimensional point cloud (looking down) is the same as that in the plane coordinate system The specific placement direction of the 3D point cloud can be found in Figures 2(a) and 2(b). The middle line parallel to the axis is the horizontal axis and flipped up and down. Specifically, assuming that the vertical coordinate of the width side at the higher position in the stereo point cloud is , the vertical coordinate of the lower width side of the stereo point cloud is , for any sampling point in the stereo point cloud , and the distance between it and the lower width side in the stereo point cloud is , when the stereo point cloud image is flipped, the "lower width side" in the stereo point cloud image is converted to the "higher width side" and the distance between the coordinates of the flipped sampling point and the "higher width side" remains unchanged, which is still ; At this time, the vertical coordinate of the "width side at a higher position" and Calculate the vertical coordinate value of the sampling point after flipping, that is = , from which the coordinates of the sampling point can be obtained After flipping, it turns into .

[0059] S1103: According to the projection formula, the three-dimensional point cloud image is vertically projected to obtain a two-dimensional point cloud image.

[0060] Specifically, the coordinates of all sampling points in the three-dimensional point cloud image are converted according to the projection formula to obtain the coordinates of all sampling points in the plane point cloud image, and the grayscale in the plane point cloud image indicates the height information;

[0061] The projection formula is as follows:

[0062] ;

[0063] In the formula, Represents the point in the three-dimensional point cloud The displacement data of the sampling points during the projection process;

[0064] Represents the point in the three-dimensional point cloud The z coordinates of the sampling points;

[0065] Indicates the z coordinate of the sampling point at the highest position in the stereo point cloud image;

[0066] Indicates the z-coordinate of the lowest sampling point in the stereo point cloud.

[0067] S120: Determine two adjacent three-dimensional point cloud images to be spliced ​​based on the arrangement order of the multiple three-dimensional point cloud images.

[0068] Specifically, in an embodiment of the present application, multiple three-dimensional point cloud images are spliced ​​in sequence, that is, the three-dimensional point cloud image of the edge area of ​​the keyboard is used as the starting point for splicing, and then the three-dimensional point cloud image of the edge area is spliced ​​with the three-dimensional point cloud image of the adjacent non-edge area, and then the remaining three-dimensional point cloud images are spliced ​​in sequence according to the arrangement order of the multiple three-dimensional point cloud images. Therefore, each splicing requires the participation of two three-dimensional point cloud images, and these two three-dimensional point cloud images are the "two adjacent three-dimensional point cloud images currently to be spliced".

[0069] S130: For two adjacent three-dimensional point cloud images to be spliced, determine first horizontal displacement data, second horizontal displacement data, and vertical displacement data according to the overlapped area and the gap in the corresponding two-dimensional point cloud images.

[0070] In one implementation, Figure 4 As shown, Figure 4 This is a flow chart of S130 in the method for stitching keyboard point cloud images in an embodiment of the present application. S130 includes S1301 to S1305, which are specifically as follows:

[0071] S1301: Determine two adjacent three-dimensional point cloud images to be spliced ​​based on the arrangement order of multiple three-dimensional point cloud images.

[0072] S1302: For two adjacent 3D point cloud images to be spliced, a positioning gap for determining first horizontal displacement data and second horizontal displacement data is selected from multiple gaps of the plane point cloud image corresponding to each 3D point cloud image. The positioning gap is used to determine the relative position between the two adjacent 3D point cloud images to be spliced.

[0073] Specifically, in actual operation, there may be more than one gap in each plane point cloud. As shown in Figure 2(a) and Figure 2(b), there are multiple gaps in each plane point cloud. For details, please refer to the area marked in the border in Figure 2(a). and Region Therefore, before splicing, it is necessary to select a positioning gap from multiple gaps.

[0074] In actual operation, the selection of positioning gap needs to pay attention to convenience and correspondence.

[0075] Convenience refers to whether it is convenient to splice the two adjacent three-dimensional point cloud images to be spliced. In actual operation, the positioning gaps usually selected are convenient for determining the position between the two adjacent three-dimensional point cloud images to be spliced. As shown in Figures 5(a) and 5(b), Figures 5(a) and 5(b) are example diagrams of horizontal side positions in the plane point cloud images corresponding to the edge area and non-edge area of ​​the keyboard in the embodiment of the present application, wherein Figure 5(a) is an example diagram of the plane point cloud image corresponding to the non-edge area in the embodiment of the present application, and 5(b) is an example diagram of the plane point cloud image corresponding to the edge area in the embodiment of the present application. The area between the marked "first horizontal side position on the left side of the positioning gap" and "first horizontal side position on the right side of the positioning gap" in Figure 5(a) is the selected positioning gap. It should be noted here that the marked borders in Figures 5(a) and 5(b) are only used to indicate the reference positions of the first horizontal side position on the left side of the positioning gap and the first horizontal side position on the right side of the positioning gap, and the marked borders are not the image data attached to the plane point cloud image.

[0076] Correspondence refers to whether the positioning gaps in the plane point cloud corresponding to the two adjacent stereo point cloud images to be spliced ​​are the same. Because the purpose of selecting the positioning gap is to determine the relative position between the plane point cloud images corresponding to the two adjacent stereo point cloud images, it is very important to determine whether the positioning gaps in the plane point cloud corresponding to the two adjacent stereo point cloud images to be spliced ​​are the same.

[0077] As shown in Figures 6(a) and 6(b), Figures 6(a) and 6(b) are example diagrams of determining the horizontal displacement data between two adjacent planar point cloud images based on the same positioning gap and different positioning gaps in an embodiment of the present application, wherein Figure 6(a) is an example diagram of determining the horizontal displacement data between two adjacent planar point cloud images based on the same positioning gap in an embodiment of the present application, and Figure 6(b) is an example diagram of determining the horizontal displacement data between two adjacent planar point cloud images based on different positioning gaps in an embodiment of the present application. It can be seen from Figures 6(a) and 6(b) that the difference between the data based on the same positioning gap and the data based on different positioning gaps is Whether the distance between the positioning gaps of two adjacent plane point cloud images has "whether there is a key width"; in the process of determining the horizontal displacement data of two adjacent plane point cloud images based on the same positioning gap, the distance between the first horizontal side positions of the positioning gap does not have a "key width", and in two adjacent plane point cloud images based on different positioning gaps, the distance between the first horizontal side positions of the positioning gap has a "key width", and the "key width" directly affects the displacement values ​​of the two plane point cloud images of the two current three-dimensional point cloud images to be spliced ​​during the splicing process, so it is very important to confirm whether they are based on the same positioning gap.

[0078] In actual operation, the positioning gaps in two adjacent planar point cloud images for determining the first horizontal displacement data may be different, and the positioning gaps in two adjacent planar point cloud images for determining the second horizontal displacement data are usually the same.

[0079] S1303: For two adjacent 3D point cloud images to be spliced, determine a side position of a positioning gap for determining first horizontal displacement data and determine the first horizontal displacement data according to the side position.

[0080] Specifically, in the embodiment of the present application, the first horizontal direction is the length direction of the plane point cloud image.

[0081] In actual operation, before stitching multiple 3D point clouds, the corresponding 2D point clouds will be straightened, that is, the multiple 2D point clouds will be straightened so that their rectangular sides are aligned with the plane rectangular coordinate system. Axis or The axes are arranged in parallel.

[0082] (1) If the positioning gaps between the two plane point cloud images corresponding to the two adjacent three-dimensional point cloud images to be stitched are the same, as shown in Figure 6(a), it is necessary to determine the first horizontal side position on the left side of the positioning gap in the two plane point cloud images. It should be noted here that "left side" and "right side" only indicate the relative positions shown in the drawings and do not indicate the actual positions.

[0083] After determining the first horizontal side position on the left side of the positioning gap in the two plane point cloud images, the first horizontal displacement data is calculated using the first displacement formula. The first displacement formula is as follows:

[0084] ;

[0085] In the formula, represents the first horizontal displacement data determined based on the same positioning gap; the first horizontal displacement data is used to Move the plane point cloud to the The stitching is completed in the plane point cloud map;

[0086] Indicates The first horizontal side position on the left side of the positioning gap in the plane point cloud Coordinate value;

[0087] Indicates The first horizontal side position on the left side of the positioning gap in the plane point cloud Coordinate value;

[0088] express and The difference between .

[0089] (2) If the positioning gaps between the planar point cloud images corresponding to the two adjacent three-dimensional point cloud images to be stitched are different, as shown in FIG6(b), it is necessary to determine the first horizontal side position on the right side of the positioning gap in the planar point cloud image on the left and the first horizontal side position on the left side of the positioning gap in the planar point cloud image on the right.

[0090] After determining the first horizontal side position of the right side of the positioning gap in the plane point cloud image on the left and the first horizontal side position of the left side of the positioning gap in the plane point cloud image on the right, the first horizontal displacement data is calculated by the first displacement formula, and the first displacement formula is as follows:

[0091] ;

[0092] In the formula, Indicates first horizontal displacement data determined based on different positioning gaps;

[0093] Indicates The first horizontal side position on the left side of the positioning gap in the plane point cloud Coordinate value;

[0094] Indicates The first horizontal side position on the right side of the positioning gap in the plane point cloud Coordinate value;

[0095] Indicates that it is located , The key width of the keys between; express and The difference between .

[0096] S1304: For two adjacent 3D point cloud images to be spliced, determine a side position of a positioning gap for determining second horizontal displacement data and determine the second horizontal displacement data according to the side position.

[0097] Specifically, in the embodiment of the present application, the second horizontal direction is a direction that is perpendicular to the length direction of the plane point cloud image.

[0098] In actual operation, the positioning gap used to determine the second horizontal displacement data is usually located at the top or bottom. In the embodiment of the present application, as shown in FIG6 (a) and FIG6 (b), the positioning gap at the bottom is selected.

[0099] After determining the second horizontal side position located at the bottom of the positioning gap in two adjacent horizontal plane point cloud images, the second horizontal displacement data is calculated using the third displacement formula. The second displacement formula is as follows:

[0100] ;

[0101] In the formula, Represents the second horizontal displacement data;

[0102] Indicates The second horizontal side position at the bottom of the positioning gap (the bottommost gap is selected as the positioning gap) in the plane point cloud Coordinate value;

[0103] Indicates The second horizontal side position at the bottom of the positioning gap (the bottom gap is selected as the positioning gap) in the plane point cloud Coordinate value.

[0104] S1305: For two adjacent 3D point cloud images to be spliced, determine vertical displacement data according to the width of the overlapping area.

[0105] Specifically, the width of the overlapped area needs to be calculated. As shown in Figure 7(a) and Figure 7(b), Figure 7(a) and Figure 7(b) are example diagrams of the overlapped area between two adjacent plane point cloud images based on the same positioning gap and different positioning gaps in the embodiment of the present application, wherein Figure 7(a) is an example diagram of the overlapped area between two adjacent plane point cloud images based on the same positioning gap in the embodiment of the present application, and Figure 7(b) is an example diagram of the overlapped area between two adjacent plane point cloud images based on different positioning gaps in the embodiment of the present application.

[0106] The example diagram of the overlap area shown in FIG7( b ) is used to illustrate how to calculate the overlap area.

[0107] The formula for calculating the width of the overlap area is as follows:

[0108] ;

[0109] In the formula, Indicates the width of the overlap area; Indicates the width of the plane point cloud image;

[0110] Indicates The first horizontal side position on the left side of the positioning gap in the plane point cloud Coordinate value;

[0111] Indicates The first horizontal side position on the right side of the positioning gap in the plane point cloud Coordinate value.

[0112] When the width of the overlapping area is determined, such as Figure 8 As shown, Figure 8 This is a schematic diagram of determining vertical displacement data in an embodiment of the present application, according to the line scan point cloud in Direction and The characteristics of the regular distribution of directions, with each scanning line as a group, in The point clouds of the three-dimensional point cloud images are grouped in the direction, and the corresponding scanning lines of two adjacent three-dimensional point cloud images are calculated. Coordinate value difference, calculate all scan lines The average value of the coordinate value difference is finally obtained The vertical displacement data of the direction. The formula for calculating the vertical displacement data is as follows:

[0113] ;

[0114] ;

[0115] In the formula, Indicates In the three-dimensional point cloud map Scan lines Coordinate value;

[0116] Indicates In the three-dimensional point cloud map Scan lines Coordinate value;

[0117] Indicates Scan lines Coordinate value difference, , express The number of scan lines in the direction; Represents all scan lines The average of the coordinate value differences.

[0118] S140: stitching two adjacent stereo point cloud images to be stitched according to the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data of the two adjacent stereo point cloud images to be stitched, until all the stereo point cloud images are stitched in the arrangement order to obtain a keyboard point cloud image.

[0119] Specifically, when all the three-dimensional point cloud images are spliced ​​together based on the arrangement order of the multiple three-dimensional point cloud images, a keyboard point cloud image can be obtained.

[0120] In summary, the embodiment of the present application converts a three-dimensional point cloud image into a two-dimensional point cloud image, first completes the displacement distance in the horizontal direction through the plane point cloud image, then determines the displacement distance in the vertical direction based on the three-dimensional point cloud image, and finally splices two adjacent three-dimensional point cloud images based on the displacement distances in multiple directions until all the three-dimensional point cloud images are spliced. Compared with the prior art that only splices through three-dimensional point cloud images, the splicing method of the present application that determines the displacement distance in the horizontal direction with the help of a plane point cloud image has an efficient and simple implementation effect. In addition, since multiple displacement distances are confirmed separately, the processing of massive point cloud data is avoided, thereby improving the accuracy of splicing. In actual operation, a splicing effect with an error of less than 0.01mm can be achieved.

[0121] Second, the present application provides a schematic diagram of the structure of a device for stitching keyboard point cloud images, such as Fig. 9 As shown, Fig. 9 3 is a structural diagram of a keyboard point cloud image stitching device in an embodiment of the present application, the device includes: a point cloud module 310 , a calculation module 320 and a stitching module 330 .

[0122] The point cloud module 310 is used to obtain a plurality of mutually parallel three-dimensional point cloud images obtained by continuous linear scanning of the keyboard, and vertically project the three-dimensional point cloud images to obtain a plane point cloud image; a gap is displayed in the plane point cloud image, and the gap indicates the gap area between two adjacent keys; there is an overlap area between two adjacent three-dimensional point cloud images;

[0123] The point cloud module 310 is further used to determine two adjacent three-dimensional point cloud images to be spliced ​​based on the arrangement order of the multiple three-dimensional point cloud images;

[0124] The calculation module 320 is used to determine the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data according to the overlapped area and the gap in the corresponding plane point cloud images for the two adjacent three-dimensional point cloud images to be spliced.

[0125] The stitching module 330 is used to stitch the two adjacent stereo point cloud images to be stitched according to the first horizontal displacement data, the second horizontal displacement data and the vertical displacement data of the two adjacent stereo point cloud images to be stitched, until all the stereo point cloud images are stitched in the arrangement order to obtain the keyboard point cloud image.

[0126] In one implementation, the point cloud module 310 is also used to perform flip processing on multiple three-dimensional point cloud images so that the edge features in the relative length direction in each pair of adjacent three-dimensional point cloud images match each other; it is also used to vertically project the three-dimensional point cloud images according to the projection formula to obtain a plane point cloud image.

[0127] In one implementation, the calculation module 320 is also used to select, for two adjacent three-dimensional point cloud images to be spliced, a positioning gap for determining the first horizontal displacement data and the second horizontal displacement data from multiple gaps in the plane point cloud image corresponding to each three-dimensional point cloud image; it is also used to determine, for two adjacent three-dimensional point cloud images to be spliced, the side position of the positioning gap for determining the first horizontal displacement data and determine the first horizontal displacement data based on the side position; it is also used to determine, for two adjacent three-dimensional point cloud images to be spliced, the side position of the positioning gap for determining the second horizontal displacement data and determine the second horizontal displacement data based on the side position.

[0128] In one implementation, the calculation module 320 is further configured to determine vertical displacement data according to a width of an overlapping area of ​​two adjacent three-dimensional point cloud images to be spliced.

[0129] Third, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, steps S110 to S140 provided in the above embodiment are implemented.

[0130] Fourth, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, steps S110 to S140 of the above embodiment are executed.

[0131] Fifth, the computer program product provided in the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. The specific implementation can refer to steps S110~S140 of the method embodiment, which will not be repeated here.

[0132] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, 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 communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0133] In addition, 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.

[0134] Furthermore, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0135] It should be noted that if the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, 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 a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, and other media that can store program codes.

[0136] In this document, relational terms such as first and second, etc. are used merely to distinguish one entity or operation from another entity or operation, but do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0137] The above description is only an embodiment of the present application and is not intended to limit the protection scope of the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for stitching keyboard point cloud images, characterized in that: The method comprises: Acquire multiple mutually parallel 3D point cloud images obtained by continuous linear scanning of the keyboard, and vertically project the 3D point cloud images to obtain a 2D point cloud image; the 2D point cloud image shows a gap, which indicates a space area between two adjacent keys; and two adjacent 3D point cloud images have an overlapping area; Determining two adjacent 3D point cloud images to be spliced ​​based on the arrangement order of the plurality of 3D point cloud images; For the two adjacent 3D point cloud images to be stitched, determining first horizontal displacement data, second horizontal displacement data, and vertical displacement data according to the overlapping area and the gap in the corresponding 2D point cloud images; splicing the two adjacent 3D point cloud images to be spliced ​​according to the first horizontal displacement data, the second horizontal displacement data, and the vertical displacement data of the two adjacent 3D point cloud images to be spliced, until all the 3D point cloud images are spliced ​​together in the arrangement order to obtain a keyboard point cloud image; The determining, for the two adjacent 3D point cloud images to be stitched, first horizontal displacement data, second horizontal displacement data, and vertical displacement data according to the overlapping area and the gap in the corresponding 2D point cloud images, includes: For the two adjacent 3D point cloud images to be stitched, selecting a positioning gap for determining the first horizontal displacement data and the second horizontal displacement data from the plurality of gaps in the planar point cloud image corresponding to each of the 3D point cloud images; For the two adjacent 3D point cloud images to be spliced, determining a side position of the positioning gap for determining first horizontal displacement data and determining the first horizontal displacement data according to the side position; For the two adjacent 3D point cloud images to be spliced, determining a side position of the positioning gap for determining the second horizontal displacement data and determining the second horizontal displacement data according to the side position; The determining, for the two adjacent 3D point cloud images to be stitched, first horizontal displacement data, second horizontal displacement data, and vertical displacement data according to the overlapping area and the gap in the corresponding 2D point cloud images, includes: For the two adjacent 3D point cloud images to be spliced, the vertical displacement data is determined according to the width of the overlapping area.

2. The method according to claim 1, characterized in that After obtaining a plurality of mutually parallel 3D point cloud images obtained by continuously linearly scanning the keyboard, the method further includes: Flipping the plurality of 3D point cloud images so that the longitudinal edge features in each pair of adjacent 3D point cloud images are aligned with each other; According to the projection formula, the three-dimensional point cloud image is vertically projected to obtain the two-dimensional point cloud image.

3. A keyboard point cloud image stitching device, characterized in that: The device includes: a point cloud module, a calculation module and a splicing module; The point cloud module is configured to obtain a plurality of mutually parallel 3D point cloud images obtained by continuously linearly scanning the keyboard, and vertically project the 3D point cloud images to obtain a 2D point cloud image; the 2D point cloud image displays a gap, which indicates a space between two adjacent keys; and two adjacent 3D point cloud images have an overlapping area; The point cloud module is further configured to determine two adjacent 3D point cloud images to be spliced ​​based on the arrangement order of the plurality of 3D point cloud images; The calculation module is configured to determine, for the two adjacent 3D point cloud images to be stitched, first horizontal displacement data, second horizontal displacement data, and vertical displacement data based on the overlapping area and the gap in the corresponding 2D point cloud images; The stitching module is configured to stitch the two adjacent stereo point cloud images to be stitched together according to the first horizontal displacement data, the second horizontal displacement data, and the vertical displacement data of the two adjacent stereo point cloud images to be stitched together, until all the stereo point cloud images are stitched together in the arrangement order to obtain a keyboard point cloud image; The calculation module is further configured to select, for the two adjacent 3D point cloud images to be stitched, a positioning gap for determining the first horizontal displacement data and the second horizontal displacement data from the plurality of gaps in the planar point cloud image corresponding to each of the 3D point cloud images; further configured to determine, for the two adjacent 3D point cloud images to be spliced, a side position of the positioning gap for determining the first horizontal displacement data and determine the first horizontal displacement data according to the side position; further configured to determine, for the two adjacent 3D point cloud images to be spliced, a side position of the positioning gap for determining the second horizontal displacement data and determine the second horizontal displacement data according to the side position; The calculation module is further configured to determine the vertical displacement data according to the width of the overlapping area for the two adjacent three-dimensional point cloud images to be spliced.

4. The device according to claim 3, characterized in that The point cloud module is also used to flip the multiple three-dimensional point cloud images so that the relative length direction edge features in each pair of adjacent three-dimensional point cloud images match each other; it is also used to vertically project the three-dimensional point cloud images according to the projection formula to obtain the plane point cloud image.

5. A computer-readable storage medium comprising instructions, characterized in that: When the instruction is executed on an electronic device, the electronic device executes the keyboard point cloud image stitching method according to any one of claims 1 to 2.

6. A computer program product, characterized in that The computer program product includes computer instructions. When the computer instructions are run on an electronic device, the electronic device executes the keyboard point cloud image stitching method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Point cloud image splicing method and device and storage medium

    CN111080518A

  • Point cloud picture generation method and device, electronic equipment and storage medium

    CN113362328A

  • Complex shape three-dimensional reconstruction method for small part based on 3D vision

    CN116817793A

  • Point cloud coarse registration method, device and equipment

    CN117765039A

  • Point cloud splicing method and device based on 3D line scanning device, equipment and medium

    CN117876219A