Scanning method and device, electronic equipment and storage medium

By first scanning using large dot distance mode during the scanning process, and then switching to small dot distance mode to obtain point cloud and rotation matrix, scanning data that eliminates boundary gaps and step phenomena is generated, solving the problems of poor scanning effect and low efficiency in the existing technology, and achieving a more efficient scanning effect.

CN120339485APending Publication Date: 2025-07-18HANGZHOU SHINING TIANYUAN 3D INSPECTION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510457402.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The existing scanning methods have problems such as poor scanning effect and low scanning efficiency, especially when the junction boundary is prone to create gaps and steps, and the complicated selection and deletion of local fine scanning areas manually.

Method used

The first scanning mode scanning model is used first to use a large dot spacing to obtain the first scan data, and then switch to the second scan mode of a small dot spacing to obtain the first single-frame point cloud and rotation translation matrix, and generate the second scanning data that eliminates the boundary gap and step phenomena through cropping, fusion and merging operations.

Benefits of technology

Improves scanning effect, eliminates boundary gaps and steps, and eliminates the need to manually select local fine scanning areas, improving scanning efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339485A_ABST
    Figure CN120339485A_ABST
Patent Text Reader

Abstract

The invention provides a scanning method and device, electronic equipment and a storage medium, and the method is applied to the technical field of data processing, and comprises the steps: scanning a model through employing a large-dot-pitch first scanning mode to obtain first scanning data; scanning the model by using a second scanning mode with small dot pitch to obtain a first single-frame point cloud and a first rotation translation matrix; the first scanning data, the first single-frame point cloud and the first rotation translation matrix can be used for generating the second scanning data in which boundary gaps and step phenomena are eliminated, so that the scanning effect is improved, a local fine scanning area does not need to be manually selected and deleted, and the scanning efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a scanning method, device, electronic equipment and storage medium. Background Art

[0002] When performing a three-dimensional scan of an object, the degree of detail of different areas of the scanned object is different. It is necessary to use a small dot pitch and parallel laser lines to scan the areas with a high degree of detail, and a large dot pitch, cross laser lines or speckle to scan the areas with a low degree of detail. This can ensure the details of the scanned model and control the data volume of the entire scan data.

[0003] The current scanning method is to first use a large dot pitch, cross laser line or speckle to scan the complete grid data, then manually select and delete the local fine scanning area, and then switch to a small dot pitch to rescan the local fine scanning area. However, on the one hand, the data scanned with a small dot pitch and the data scanned with a large dot pitch are independent of each other, which easily produces gaps and steps at the intersection boundary, resulting in poor scanning effect; on the other hand, the process of manually selecting and deleting the local fine scanning area is relatively complicated, and the scanning efficiency is low. Summary of the invention

[0004] In view of this, embodiments of the present invention provide a scanning method, device, electronic device and storage medium to solve the problems of poor scanning effect and low scanning efficiency in existing scanning methods.

[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:

[0006] A first aspect of an embodiment of the present invention discloses a scanning method, the method comprising:

[0007] Enable the first scanning mode to scan the model and obtain first scanning data;

[0008] Switching to enable a second scanning mode to scan the model, obtaining a first single-frame point cloud and a first rotation and translation matrix, wherein a point distance of the second scanning mode is smaller than a point distance of the first scanning mode;

[0009] The first scanning data, the first single-frame point cloud and the first rotation and translation matrix can be used to generate second scanning data with boundary gaps and step phenomena eliminated.

[0010] Preferably, the first scanning data, the first single-frame point cloud and the first rotation and translation matrix can be used to generate second scanning data with boundary gaps and step phenomena eliminated, including:

[0011] Cropping the first single-frame point cloud to obtain a second single-frame point cloud;

[0012] Fuse the second single-frame point cloud and the first rotation and translation matrix according to the pitch of the second scanning mode into local fine scanning data;

[0013] Stitch the local fine scanning data and the first scanning data to obtain a second rotation and translation matrix;

[0014] Merge the local fine scanning data, the second rotation and translation matrix and the first scanning data to generate second scanning data with boundary gaps and step phenomena eliminated.

[0015] Preferably, merging the local fine scanning data, the second rotation and translation matrix and the first scanning data to generate second scanning data with boundary gaps and step phenomena eliminated includes:

[0016] Determine the product of the local fine scanning data and the second rotation and translation matrix;

[0017] Merge the product and the first scanning data, and crop and delete the first scanning data in the overlapping area to obtain second scanning data with boundary gaps and step phenomena eliminated.

[0018] Preferably, cropping the first single-frame point cloud to obtain a second single-frame point cloud includes:

[0019] Crop the first single-frame point cloud through the projection matrix, model view matrix and window transformation of the three-dimensional scene to obtain a second single-frame point cloud.

[0020] Preferably, after obtaining the second single-frame point cloud, it further includes:

[0021] Fuse the second single-frame point cloud and the first rotation and translation matrix according to the pitch of the first scanning mode into incremental scanning data;

[0022] Generate the weights of the first scanning data and the incremental scanning data;

[0023] In the three-dimensional scene, display the first scanning data in a color style corresponding to the weight of the first scanning data, and display the incremental scanning data in a color style corresponding to the weight of the incremental scanning data.

[0024] Preferably, generating the weights of the first scanning data and the incremental scanning data includes:

[0025] Generate the weight of the first scanning data according to the pitch of the first scanning mode;

[0026] Generate the weight of the incremental scanning data according to the pitch of the second scanning mode.

[0027] Preferably, after obtaining the second single-frame point cloud, it further includes:

[0028] Display the second single-frame point cloud in the central circular area of the three-dimensional scene window.

[0029] A second aspect of the embodiments of the present invention discloses a scanning device, and the device includes:

[0030] A first scanning unit, configured to scan a model in a first scanning mode to obtain first scanning data;

[0031] A second scanning unit, configured to switch to a second scanning mode to scan the model, obtain a first single-frame point cloud and a first rotation and translation matrix, and the point distance of the second scanning mode is smaller than the point distance of the first scanning mode;

[0032] The first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena.

[0033] A third aspect of the embodiments of the present invention discloses an electronic device, including: a processor and a memory, and the processor and the memory are connected by a communication bus; wherein, the processor is configured to call and execute a program stored in the memory; the memory is configured to store a program, and the program is used to implement the scanning method disclosed in the first aspect of the embodiments of the present invention.

[0034] A fourth aspect of the embodiments of the present invention discloses a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, it implements the scanning method disclosed in the first aspect of the embodiments of the present invention.

[0035] Based on the scanning method, device, electronic device, and storage medium provided in the above embodiments of the present invention, the method is: enabling a first scanning mode to scan a model to obtain first scanning data; switching to a second scanning mode to scan the model to obtain a first single-frame point cloud and a first rotation and translation matrix, and the point distance of the second scanning mode is smaller than the point distance of the first scanning mode; the first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena. This solution first uses the first scanning mode with a large point distance to scan the model to obtain first scanning data, and then uses the second scanning mode with a small point distance to scan the model to obtain a first single-frame point cloud and a first rotation and translation matrix. The first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena, improving the scanning effect, and there is no need to manually select and delete local fine scanning areas, improving the scanning efficiency. Description of the Drawings

[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained according to the provided drawings.

[0037] Figure 1 It is a flowchart of a scanning method provided by an embodiment of the present invention;

[0038] Figure 2 It is a flowchart of generating second scan data provided by an embodiment of the present invention;

[0039] Figure 3 It is an example diagram of the workflow of local fine scanning provided by an embodiment of the present invention;

[0040] Figure 4 It is a structural block diagram of a scanning device provided by an embodiment of the present invention. Detailed implementation manners

[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.

[0042] In this application, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or device. Without further limitations, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.

[0043] When performing three-dimensional scanning on an object, the detail levels of different regions of the scanned object are different. It is necessary to use a small dot pitch and parallel laser lines to scan the regions with a high detail level, and use a large dot pitch, cross laser lines or speckle to scan the regions with a low detail level. In this way, both the details of the scanned model can be ensured and the data volume scale of the entire scan data can be controlled.

[0044] The current scanning method is: first use large dot pitch, cross laser lines or speckle to scan the complete grid data, then manually edit to select the local fine scanning area (the area that needs local fine scanning) without penetration, delete the local fine scanning area, switch to small dot pitch, and rescan the local fine scanning area at close range using parallel lines.

[0045] However, the above-mentioned scanning method has the following disadvantages:

[0046] Disadvantages 1. Non-penetration selection of local fine scanning areas can only be performed on the grid, non-penetration selection is not possible on the point cloud, and point cloud scanning does not support local fine scanning.

[0047] Disadvantage 2: The data from small dot pitch scanning and large dot pitch scanning are independent of each other, which easily leads to gaps and steps at the junction, resulting in poor scanning effect.

[0048] Disadvantage 3: The process of manually selecting and deleting local fine scanning areas is complicated and inconvenient, and the scanning efficiency is low.

[0049] In order to solve the above shortcomings, this solution proposes a scanning method, device, electronic device and storage medium, which first uses a first scanning mode with a large dot pitch to scan the model to obtain first scanning data, and then uses a second scanning mode with a small dot pitch to scan the model to obtain a first single-frame point cloud and a first rotation and translation matrix. The first scanning data, the first single-frame point cloud and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena, improve scanning effects, and do not need to manually select and delete local fine scanning areas, thereby improving scanning efficiency. At the same time, the point cloud also supports local fine scanning with a small dot pitch.

[0050] See also Figure 1 , shows a flow chart of a scanning method provided by an embodiment of the present invention, the scanning method comprising the following steps:

[0051] Step S101: Enable the first scanning mode to scan the model and obtain first scanning data.

[0052] It should be noted that the “point distance” mentioned in this solution refers to the distance between adjacent points in the scan, and the “point distance” is a parameter in the fusion algorithm; the “model” mentioned in this solution refers to the scanned object.

[0053] In the specific implementation of step S101, the first scanning mode (ie, the large point pitch scanning mode) is enabled to perform a large point pitch scanning on the model, and first scanning data is obtained and output, where the first scanning data includes overall grid or point cloud data.

[0054] Specifically, during the process of enabling the first scanning mode to perform large pitch scanning on the model, taking a single-frame point cloud as the input, after merging multiple single-frame point clouds through a fusion algorithm, the first scanning data is output, and the first scanning data is also referred to as large pitch grid data.

[0055] Step S102: Switch to enable the second scanning mode to scan the model, and obtain the first single-frame point cloud and the first rotation and translation matrix. The first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate the second scanning data that eliminates boundary gaps and step phenomena.

[0056] It should be noted that the pitch of the second scanning mode (i.e., the local fine scanning mode) (referred to as the small pitch or the pitch of local fine scanning) is smaller than the pitch of the first scanning mode (large pitch scanning mode) (large pitch).

[0057] In the specific implementation process of step S102, after obtaining the first scanning data, switch to enable the second scanning mode (local fine scanning mode) to perform local fine scanning on the model, and obtain the first single-frame point cloud and the first rotation and translation matrix.

[0058] Specifically, during the process of enabling the second scanning mode to perform local fine scanning on the model, by inputting the left and right camera pictures and calibration data, the first single-frame point cloud is reconstructed using a reconstruction algorithm; the first single-frame point clouds are spliced together through fiducial points or features to obtain the first rotation and translation matrix (denoted as spliced rt or rt), and this first rotation and translation matrix contains the relative spatial position relationship between frames.

[0059] It should be noted that a flag for starting local fine scanning is set for the fusion algorithm. After enabling the second scanning mode to perform local fine scanning, the fusion algorithm starts to calculate the subsequent point cloud fusion weights according to the "flag for starting local fine scanning", and this weight will affect the pseudo-color displayed during local fine scanning. The calculation method of the weight is different at different pitches.

[0060] In some embodiments, the aforementioned first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate the second scanning data that eliminates boundary gaps and step phenomena.

[0061] In the specific implementation, the implementation method for generating the second scanning data that eliminates boundary gaps and step phenomena is as follows: after obtaining the first scanning data, the first single-frame point cloud, and the first rotation and translation matrix, perform processing such as cropping operation, fusion operation, splicing operation, and merging operation based on the first scanning data, the first single-frame point cloud, and the first rotation and translation matrix, so as to generate the second scanning data that eliminates boundary gaps and step phenomena. The specific method for obtaining the second scanning data is described in detail in the subsequent embodiments.

[0062] In an embodiment of the present invention, first, the model is scanned using a first scanning mode with a large dot pitch to obtain first scanning data, and then the model is scanned using a second scanning mode with a small dot pitch to obtain a first single-frame point cloud and a first rotation and translation matrix. The first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena, improving the scanning effect, and there is no need to manually select and delete local fine scanning areas, thereby improving the scanning efficiency.

[0063] Regarding the above embodiment of the present invention Figure 1 For the generation of the second scanning data involved in step S102, refer to Figure 2 , which shows a flowchart of generating the second scanning data provided by the embodiment of the present invention. Figure 2 It includes the following steps:

[0064] Step S201: Crop the first single-frame point cloud to obtain a second single-frame point cloud.

[0065] In the process of specifically implementing step S201, the first single-frame point cloud is cropped through the projection matrix, model view matrix, and window transformation of the three-dimensional scene to obtain a second single-frame point cloud.

[0066] In some specific embodiments, after obtaining the second single-frame point cloud, the second single-frame point cloud is displayed in the central circular area of the three-dimensional scene window.

[0067] More specifically, the cropping of the first single-frame point cloud is achieved through the projection matrix, model view matrix, and window transformation, and only the data in the central circular area of the three-dimensional scene window is retained, thereby obtaining the second single-frame point cloud, and the second single-frame point cloud is displayed in the central circular area of the three-dimensional scene window.

[0068] It should be noted that the three-dimensional scene window specifically refers to a software window, and only three-dimensional data is displayed in the three-dimensional scene window. A virtual circle is drawn in the center of the three-dimensional scene window, and the single-frame points inside the circle are retained, and the single-frame points outside the circle are deleted. In this way, the second single-frame point cloud is displayed in the three-dimensional scene window.

[0069] Step S202: According to the dot pitch of the second scanning mode, fuse the second single-frame point cloud and the first rotation and translation matrix into local fine scanning data.

[0070] In the process of specifically implementing step S202, the second single-frame point cloud and the first rotation and translation matrix (stitching rt) are saved to the project file, and the second single-frame point cloud is marked as "local fine single-frame data".

[0071] Before encapsulation, according to the pitch of the second scanning mode (i.e., the pitch of the local fine scanning), the second single-frame point cloud and the first rotation and translation matrix are used to fuse into local fine scanning data. This local fine scanning data at least contains grid data, so this local fine scanning data can also be called local fine grid data.

[0072] Step S203: Stitch the local fine scanning data and the first scanning data to obtain a second rotation and translation matrix.

[0073] It should be noted that ICP (Iterative Closest Point) is the Iterative Closest Point algorithm.

[0074] In the process of specifically implementing step S203, the local fine scanning data and the first scanning data (large-pitch grid data) are stitched together through ICP to obtain a second rotation and translation matrix (denoted as ICPRT). This second rotation and translation matrix is the rotation and translation matrix output by ICP.

[0075] Step S204: Merge the local fine scanning data, the second rotation and translation matrix, and the first scanning data to generate second scanning data that eliminates boundary gaps and step phenomena.

[0076] In the process of specifically implementing step S204, determine the product of the local fine scanning data and the second rotation and translation matrix. This product is "local fine scanning data * second rotation and translation matrix" (which can be abbreviated as local fine scanning data * ICPRT); merge this product and the first scanning data, and in the overlapping area, crop and delete the first scanning data (retain the small-pitch grid) to obtain second scanning data that eliminates boundary gaps and step phenomena.

[0077] Specifically, merge "local fine scanning data * ICPRT" with the first scanning data (large-pitch grid data). When merging, retain the small-pitch grid in the overlapping area to eliminate boundary gaps and step phenomena, thereby obtaining second scanning data that eliminates boundary gaps and step phenomena.

[0078] It should be noted that when merging "local fine scanning data * ICPRT" with the first scanning data, in the overlapping area, use the small-pitch data to perform a crop and delete operation on the large-pitch data, so that the small-pitch grid in the overlapping area can be retained.

[0079] Furthermore, it should be noted that the "large pitch" mentioned in this solution refers to: among the two pitches set for scanning, the larger one that does not focus on the details of the scanned object;

[0080] Similarly, the "smaller pitch" (i.e., the pitch of local fine scanning) refers to the smaller pitch among the two pitches set for scanning that focuses on the details of the object being scanned.

[0081] In some embodiments, after obtaining the second single-frame point cloud, the second single-frame point cloud and the first rotation and translation matrix are fused into incremental scanning data according to the pitch of the first scanning mode (i.e., the larger pitch), and the incremental scanning data includes incremental grid or point cloud data.

[0082] It should be noted that the weight is the number of times the same point is scanned repeatedly. The smaller the pitch, the larger the weight requirement for the data quality to meet the requirements.

[0083] Generate the weights of the first scanning data and the incremental scanning data. Specifically, generate the weight of the first scanning data according to the pitch of the first scanning mode (the larger pitch), and generate the weight of the incremental scanning data according to the pitch of the second scanning mode (the smaller pitch).

[0084] Distinguish the data scanned at different pitches through the value range of the weight. For example, "1-15" is the value range of the weight of the first scanning data (the larger pitch data), and "100-130" is the value range of the weight of the incremental scanning data (the smaller pitch data).

[0085] Distinguish whether the point cloud data is the larger pitch data or the smaller pitch data through the value range of the weight, so that the larger pitch data and the smaller pitch data can be treated differently during subsequent 3D display, editing, and re-fusion, avoiding adding new variables to describe the data scanned at different pitches to avoid increasing the memory.

[0086] In the 3D scene, display the first scanning data in the color style corresponding to the weight of the first scanning data, and display the incremental scanning data in the color style corresponding to the weight of the incremental scanning data.

[0087] It should be noted that 3D rendering maps the weights within different value ranges to different color scales. The value range of the weight of the larger pitch data corresponds to one color scale, and the value range of the weight of the smaller pitch data corresponds to one color scale. Different colors of the color scale represent the redundancy of the scanned data volume.

[0088] For example: "1-15" is the value range of the weight of the larger pitch data, "1-15" corresponds to one color scale, the weight "1" corresponds to one color value, the weight "15" corresponds to one color value, and the color values corresponding to the intermediate weights can be determined by interpolation.

[0089] For another example: "100 - 130" is the value range of the weight of the small dot pitch data. "100 - 130" corresponds to a color scale. The weight "100" corresponds to a color value, and the weight "130" corresponds to a color value. The color values corresponding to the intermediate weights can be determined by interpolation.

[0090] Based on the color scale corresponding to the value range of the weight of the large dot pitch data, the first scan data is displayed in the three-dimensional scene in the color style corresponding to "the weight of the first scan data".

[0091] Similarly, based on the color scale corresponding to the value range of the weight of the small dot pitch data, the incremental scan data is displayed in the three-dimensional scene in the color style corresponding to "the weight of the incremental scan data".

[0092] For example: The color scale corresponding to the value range of the weight of the small dot pitch data is "yellow - green", that is, the minimum value to the maximum value of this value range is interpolated and converted to the color values between yellow and green. The incremental scan data is displayed in the three-dimensional scene in the color style corresponding to "the weight of the incremental scan data", where "yellow" indicates that the redundancy of the data volume of this incremental scan data is insufficient (equivalent to the data quality not meeting the standard), and "green" indicates that the redundancy of the data volume of this incremental scan data is sufficient (equivalent to the data quality meeting the standard).

[0093] The above embodiments of the present invention Figure 2 , are related descriptions on how to obtain the second scan data. To better explain the overall process of obtaining the second scan data, the following A1 - A8 are used for illustration.

[0094] A1. Perform a large dot pitch scan on the model and output the first scan data (large dot pitch grid data).

[0095] In specific implementation, after the large dot pitch scan, switch to the second scan mode (also the local fine scan mode) and execute the subsequent A2 - A8.

[0096] A2. Perform single-frame point cloud reconstruction and stitching to obtain the first single-frame point cloud and the first rotation and translation matrix. The first single-frame point cloud is cropped through the projection matrix, the model view matrix, and the window transformation, and only the data in the central circular area of the three-dimensional scene window is retained, thereby obtaining the second single-frame point cloud, and the second single-frame point cloud is displayed in the central circular area of this three-dimensional scene window.

[0097] A3. The second single-frame point cloud (the cropped first single-frame point cloud) and the first rotation and translation matrix are fused according to the large dot pitch by an algorithm, and the incremental scan data is output.

[0098] A4. In a three-dimensional scene, display the first scan data in a color style corresponding to the weight of the first scan data, and display the incremental scan data in a color style corresponding to the weight of the incremental scan data.

[0099] A5. Save the second single-frame point cloud and the first rotation and translation matrix (stitching rt) to the project file, and label the second single-frame point cloud as "local fine single-frame data".

[0100] A6. According to the point spacing of the local fine scan, fuse the second single-frame point cloud and the first rotation and translation matrix into local fine scan data.

[0101] A7. Stitch the local fine scan data and the first scan data together through ICP to obtain the second rotation and translation matrix (ICPRT).

[0102] A8. Merge "local fine scan data * ICPRT" with the first scan data. When merging, retain the small-point-spacing grid in the overlapping area to eliminate boundary gaps and step phenomena, and obtain the second scan data with boundary gaps and step phenomena eliminated.

[0103] In practical engineering applications, through this solution for local fine scanning, it is possible to obtain scan data with boundary gaps and step phenomena eliminated without manually selecting and deleting the local fine scanning area. The following uses Figure 3 the following example diagram of the workflow of local fine scanning to illustrate the workflow for implementing this solution. Figure 3 The workflow shown includes the following parts:

[0104] S301: Click local fine scanning on the interface.

[0105] In specific implementation, click local fine scanning to enable the second scanning mode, and set the point spacing / identification information of the local fine scanning, as well as set the three-dimensional scene parameters.

[0106] S302: Reconstruct and stitch.

[0107] In specific implementation, reconstruct and stitch to obtain the first single-frame point cloud and the first rotation and translation matrix (stitching rt).

[0108] S303: Crop the single frame according to the circle.

[0109] In specific implementation, crop the first single-frame point cloud according to the circle to obtain the local fine single frame (the second single-frame point cloud). For the ordinary point-spacing project, perform single-frame identification, and this single-frame identification is used to represent whether the identified single-frame point cloud is a local fine single frame (a single frame obtained by small-point-spacing scanning) or an ordinary point-spacing single frame (a single frame obtained by large-point-spacing scanning).

[0110] S304: Normal pitch fusion field.

[0111] In specific implementation, by using the second single-frame point cloud and the first rotation and translation matrix (stitching rt), perform fusion according to the large pitch, and output incremental scan data (the incremental grid identifies local fine increments).

[0112] S305: The 3D scene displays pseudo-color according to the small pitch conversion weight.

[0113] In specific implementation, according to the pitch conversion weight of the local fine scan, and display the incremental scan data in a color style corresponding to the weight of the incremental scan data in the 3D scene.

[0114] S306: Optimize / not optimize encapsulation.

[0115] S307: When optimizing, perform global optimization.

[0116] S308: Based on the optimized rt, re-fuse the large pitch single-frame and the local fine single-frame with the large pitch (note that when switching the single-frame type during fusion, it is necessary to set the fusion field parameters) to obtain ICPRT.

[0117] S309: When not optimizing, re-fuse the local fine single-frame; or, when performing global optimization, re-fuse the local fine single-frame with the new rt; obtain local fine scan data (local fine grid data).

[0118] S310: "Local fine scan data * ICPRT" merges the large pitch grid data, and retains the small pitch grid in the overlapping area.

[0119] The above is the related description of the workflow of this solution.

[0120] Generally speaking, this solution has the following beneficial effects: There is no need to manually select the local fine scan area; there is no need to first non-penetratingly select the local fine scan area, and point cloud scanning can also support local fine scanning; the large pitch data and the small pitch data are fused together, without boundary gaps and step phenomena.

[0121] Corresponding to the scanning method provided by the above-mentioned embodiment of the present invention, see Figure 4 , the embodiment of the present invention also provides a structural block diagram of a scanning device, and the scanning device includes: a first scanning unit 100 and a second scanning unit 200;

[0122] The first scanning unit 100 is used to scan the model in the first scanning mode to obtain the first scanning data.

[0123] A second scanning unit 200, configured to switch to enable the second scanning mode to scan the model, obtain a first single-frame point cloud and a first rotation and translation matrix, and the point spacing of the second scanning mode is smaller than that of the first scanning mode.

[0124] Among them, the first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena.

[0125] In the embodiment of the present invention, first use the first scanning mode with a large point spacing to scan the model to obtain the first scanning data, and then use the second scanning mode with a small point spacing to scan the model to obtain the first single-frame point cloud and the first rotation and translation matrix. The first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena, improving the scanning effect, and there is no need to manually select and delete local fine scanning areas, improving the scanning efficiency.

[0126] Preferably, in combination with Figure 4 the content shown, a second scanning data that eliminates boundary gaps and step phenomena can be generated by a processing unit, that is, the processing unit uses the first scanning data, the first single-frame point cloud, and the first rotation and translation matrix to generate the second scanning data that eliminates boundary gaps and step phenomena;

[0127] The processing unit includes a cropping module, a first fusion module, a stitching module, and a merging module, and the execution principles of each module are as follows:

[0128] The cropping module is configured to crop the first single-frame point cloud to obtain a second single-frame point cloud.

[0129] In specific implementation, the cropping module is specifically configured to: crop the first single-frame point cloud through the projection matrix, model view matrix, and window transformation of the three-dimensional scene to obtain the second single-frame point cloud.

[0130] Preferably, the cropping module is further configured to: display the second single-frame point cloud in the central circular area of the three-dimensional scene window.

[0131] The first fusion module is configured to fuse the second single-frame point cloud and the first rotation and translation matrix into local fine scanning data according to the point spacing of the second scanning mode.

[0132] The stitching module is configured to stitch the local fine scanning data and the first scanning data to obtain a second rotation and translation matrix.

[0133] The merging module is configured to merge the local fine scanning data, the second rotation and translation matrix, and the first scanning data to generate second scanning data that eliminates boundary gaps and step phenomena.

[0134] In a specific implementation, the merging module is specifically configured to: determine the product of the local fine-scanned data and the second rotation and translation matrix; merge the product and the first scanned data, and crop and delete the first scanned data in the overlapping area to obtain second scanned data that eliminates boundary gaps and step phenomena.

[0135] Preferably, on the basis of the above content about the processing unit, the processing unit further includes:

[0136] A second fusion module, configured to fuse the second single-frame point cloud and the first rotation and translation matrix into incremental scanned data according to the point distance of the first scanning mode.

[0137] A generation module, configured to generate weights of the first scanned data and the incremental scanned data.

[0138] In a specific implementation, the generation module is specifically configured to: generate the weight of the first scanned data according to the point distance of the first scanning mode; generate the weight of the incremental scanned data according to the point distance of the second scanning mode.

[0139] A display module, configured to display the first scanned data in a color style corresponding to the weight of the first scanned data and display the incremental scanned data in a color style corresponding to the weight of the incremental scanned data in a three-dimensional scene.

[0140] Preferably, an embodiment of the present invention further provides an electronic device, including: a processor and a memory, and the processor and the memory are connected through a communication bus; wherein, the processor is configured to call and execute a program stored in the memory; the memory is configured to store a program, and the program is used to implement the scanning method provided by the above method embodiment.

[0141] Preferably, an embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, it implements the scanning method provided by the above method embodiment.

[0142] In summary, an embodiment of the present invention provides a scanning method, device, electronic device and storage medium. First, the model is scanned using a first scanning mode with a large point distance to obtain first scanned data, and then the model is scanned using a second scanning mode with a small point distance to obtain a first single-frame point cloud and a first rotation and translation matrix. The first scanned data, the first single-frame point cloud and the first rotation and translation matrix can be used to generate second scanned data that eliminates boundary gaps and step phenomena, improving the scanning effect, and there is no need to manually select and delete the local fine-scanned area, improving the scanning efficiency.

[0143] Each embodiment in this specification is described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for a system or system embodiment, since it is basically similar to a method embodiment, the description is relatively simple. For the relevant parts, reference can be made to the description of the method embodiment. The systems and system embodiments described above are merely illustrative. 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 to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. A person of ordinary skill in the art can understand and implement it without creative work.

[0144] Those skilled in the art can further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0145] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be obvious to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A scanning method, characterized in that, The method includes: Enabling a first scanning mode to scan the model to obtain first scanning data; Switching to enable a second scanning mode to scan the model to obtain a first single-frame point cloud and a first rotation and translation matrix, wherein the point spacing of the second scanning mode is smaller than that of the first scanning mode; The first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena.

2. The method according to claim 1, wherein The first scanning data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scanning data that eliminates boundary gaps and step phenomena, including: Cropping the first single-frame point cloud to obtain a second single-frame point cloud; Fusing the second single-frame point cloud and the first rotation and translation matrix into local fine scanning data according to the point spacing of the second scanning mode; Stitching the local fine scanning data and the first scanning data to obtain a second rotation and translation matrix; Merging the local fine scanning data, the second rotation and translation matrix, and the first scanning data to generate second scanning data that eliminates boundary gaps and step phenomena.

3. The method according to claim 2, characterized in that Merging the local fine scanning data, the second rotation and translation matrix, and the first scanning data to generate second scanning data that eliminates boundary gaps and step phenomena, including: Determining the product of the local fine scanning data and the second rotation and translation matrix; Merging the product and the first scanning data, and cropping and deleting the first scanning data in the overlapping area to obtain second scanning data that eliminates boundary gaps and step phenomena.

4. The method according to claim 2, wherein Cropping the first single-frame point cloud to obtain a second single-frame point cloud, including: Cropping the first single-frame point cloud through the projection matrix, model view matrix, and window transformation of the three-dimensional scene to obtain a second single-frame point cloud.

5. The method according to claim 2 or 4, characterized in that, After obtaining the second single-frame point cloud, it further includes: Fusing the second single-frame point cloud and the first rotation and translation matrix into incremental scanning data according to the point spacing of the first scanning mode; Generating weights for the first scanning data and the incremental scanning data; In the three-dimensional scene, displaying the first scanning data in a color style corresponding to the weight of the first scanning data, and displaying the incremental scanning data in a color style corresponding to the weight of the incremental scanning data.

6. The method according to claim 5, wherein Generating weights for the first scanning data and the incremental scanning data, including: Generating the weight of the first scanning data according to the point spacing of the first scanning mode; Generating the weight of the incremental scanning data according to the point spacing of the second scanning mode.

7. The method according to claim 2 or 4, characterized in that, After obtaining the second single-frame point cloud, it further includes: Displaying the second single-frame point cloud in the central circular area of the three-dimensional scene window.

8. A scanning device, characterized in that, The device includes: A first scanning unit for enabling a first scanning mode to scan the model to obtain first scanning data; A second scanning unit for switching to enable a second scanning mode to scan the model to obtain a first single-frame point cloud and a first rotation and translation matrix, wherein the point spacing of the second scanning mode is smaller than that of the first scanning mode; The first scan data, the first single-frame point cloud, and the first rotation and translation matrix can be used to generate second scan data that eliminates boundary gaps and step phenomena.

9. An electronic device, characterized in that, Comprising: A processor and a memory, the processor and the memory being connected by a communication bus; wherein, the processor is configured to call and execute a program stored in the memory; The memory is configured to store a program, and the program is used to implement the scan method according to any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, A computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the scan method according to any one of claims 1-7 is implemented.