Automated three-dimensional scanning method, device, equipment and storage medium
By constantly updating the scan path and using the current three-dimensional model to determine the next scan path, the problem of incomplete three-dimensional scanning is solved and the quality of three-dimensional scanning is improved.
Patent Information
- Application Number
- CN202311849130.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-29
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2043-12-29
AI Technical Summary
During the three-dimensional scanning process, it is difficult for the existing technology to realize fully automated scanning, and the problem of incomplete scanning often occurs, resulting in low quality of the three-dimensional scanning.
By obtaining the current scan path, determining the next scan path based on the current three-dimensional model, and constantly updating the scan path is achieved to achieve a globally relatively complete three-dimensional scan of the scanned object.
By updating the scanning path multiple times, this method can perform a globally and relatively complete three-dimensional scan of the scan object to be scanned, improving the quality of the three-dimensional scanning.
Smart Images

Figure CN117499547B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of computer technology, and in particular to an automated three-dimensional scanning method, device, equipment, and storage medium. Background Art
[0002] In industrial applications of 3D scanning, it is often necessary to connect the scanning instrument to a robotic arm or carry an AGV to scan the object. In such a 3D scanning scenario, it is usually necessary to automatically plan the scanning path to achieve fully automated scanning.
[0003] Currently, in the 3D scanning process, the scanning path is usually automatically planned through heuristic methods or simulation methods. However, problems such as incomplete scanning often occur, resulting in low quality of 3D scanning. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the embodiments of the present disclosure provide an automated three-dimensional scanning method, device, equipment and storage medium.
[0005] A first aspect of an embodiment of the present disclosure provides an automated three-dimensional scanning method, the method comprising:
[0006] Obtaining a current scanning path, where the current scanning path includes at least one scanning point posture;
[0007] Scanning the scanned object based on the scanning point posture of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object;
[0008] Determine a next scanning path based on the current three-dimensional model, where the next scanning path includes at least one scanning point posture;
[0009] updating the current scan path based on the next scan path;
[0010] The scanned object is scanned based on the updated scan point position of the current scan path, and the current three-dimensional model corresponding to the scanned object is updated.
[0011] A second aspect of the embodiments of the present disclosure provides an automated three-dimensional scanning device, the device comprising:
[0012] A first acquisition module, used to acquire a current scanning path, where the current scanning path includes at least one scanning point posture;
[0013] A first scanning module, used to scan the scanned object based on the scanning point posture of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object;
[0014] A first determination module, configured to determine a next scanning path based on the current three-dimensional model, wherein the next scanning path includes at least one scanning point posture;
[0015] A first updating module, configured to update a current scanning path based on a next scanning path;
[0016] The second updating module is used to scan the scanned object based on the updated scanning point posture of the current scanning path, and update the current three-dimensional model corresponding to the scanned object.
[0017] A third aspect of an embodiment of the present disclosure provides an electronic device, the server comprising: a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method of the first aspect above.
[0018] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect described above can be implemented.
[0019] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has the following advantages:
[0020] The disclosed embodiment can obtain the current scanning path, which includes at least one scanning point posture; scan the scanned object based on the scanning point posture of the current scanning path to obtain the current three-dimensional model corresponding to the scanned object; determine the next scanning path based on the current three-dimensional model, which includes at least one scanning point posture; update the current scanning path based on the next scanning path; scan the scanned object based on the updated scanning point posture of the current scanning path, and update the current three-dimensional model corresponding to the scanned object. It can be seen that by adopting the above technical solution, the current scanning path can be updated for multiple scans to perform a relatively complete three-dimensional scan of the scanned object globally, thereby improving the quality of three-dimensional scanning. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0023] Figure 1 is a flow chart of an automated three-dimensional scanning method provided by an embodiment of the present disclosure;
[0024] Figure 2 It is a partial schematic diagram of a revenue graph provided by an embodiment of the present disclosure;
[0025] Figure 3 is a structural schematic diagram of an automated three-dimensional scanning device provided by an embodiment of the present disclosure;
[0026] Figure 4 It is a structural schematic diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0027] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0028] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0029] Figure 1 This is a flow chart of an automated three-dimensional scanning method provided by an embodiment of the present disclosure. The method can be executed by an electronic device and is applicable to a scene where a scanner with a robotic arm scans an object to be scanned, or a scanner with a stage (such as an AGV) scans an object to be scanned. The electronic device can be exemplarily understood as a device such as a scanner with a robotic arm, a scanner with a stage, a tablet computer, a laptop computer, etc. Figure 1 As shown, the method provided in this embodiment includes the following steps:
[0030] S110, obtaining a current scanning path, where the current scanning path includes at least one scanning point posture.
[0031] In the disclosed embodiment, the scanned object can be scanned multiple times (ie, multiple scanning processes are required) to perform a relatively complete three-dimensional scan of the scanned object. The scanning path used in the current scanning process is the current scanning path.
[0032] Specifically, the scanning point posture of the current scanning path represents the relative scanning posture between the scanner and the scanned object.
[0033] S120 , scanning the scanned object based on the scanning point posture of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object.
[0034] In the disclosed embodiment, for each scanning point posture in the current scanning path, the scanner can scan the scanned object at the scanning point posture, thereby obtaining the scanning data corresponding to the scanning point posture. If the current scanning process is the first scanning, the scanning data corresponding to the scanning point postures in the current scanning path together constitute the current scanning data obtained in the current scanning process. If the current scanning process is not the first scanning, the scanning data corresponding to the scanning point postures in the current scanning path and the scanning data obtained in the previous scanning process together constitute the current scanning data obtained in the current scanning process.
[0035] In some embodiments, the current scanning path includes a preset scanning path, and the preset scanning path includes at least one preset scanning point posture; wherein S120 includes: S121, scanning the scanned object based on the preset scanning point posture of the preset scanning path to obtain a current three-dimensional model corresponding to the scanned object.
[0036] Specifically, in order to achieve three-dimensional scanning of the scanned object, a solution space including multiple candidate scanning point postures can be pre-constructed for the scanned object. In this way, during the first scanning process, at least one candidate scanning point posture can be selected from the solution space as a preset scanning point posture, thereby obtaining a preset scanning path.
[0037] In some examples, selecting at least one candidate scanning point posture from the solution space as a preset scanning point posture to obtain a preset scanning path may include: uniformly selecting multiple candidate scanning point postures from multiple candidate scanning point postures in the solution space as the preset scanning point posture to obtain the preset scanning path.
[0038] Specifically, the uniformity here means that the RTs corresponding to each preset scanning point posture pair in the three-dimensional space are similar or the difference is within a preset range, wherein the preset scanning point posture pair refers to two adjacent preset scanning point postures, and RT refers to the rotation matrix and translation matrix between the two adjacent preset scanning point postures.
[0039] It can be understood that by obtaining the preset scanning path in a uniform manner, the risk of overlapping scanning data corresponding to different preset scanning point postures can be reduced, and the risk of large unscanned areas on the scanned object can be reduced, thereby achieving the use of a relatively small number of preset scanning point postures to obtain relatively more scanning data, which is beneficial to reducing the total number of scans required to complete the scanned object.
[0040] In other embodiments, the current scanning path includes an updated scanning path, and the updated scanning path includes at least one updated scanning point posture; wherein S120 includes: scanning the scanned object based on the updated scanning point posture of the updated scanning path, and updating the three-dimensional model obtained from the previous scan corresponding to the scanned object to obtain the current three-dimensional model corresponding to the scanned object.
[0041] Specifically, if the current scanning process is not the first scanning, that is, at least one scanning has been performed before the current scanning process, then the current scanning path used in the current scanning process can be a scanning path updated based on the three-dimensional model obtained in the previous scanning (that is, an updated scanning path), and the specific updating process of the scanning path is similar to S130 and S140, which will not be repeated here. In this way, the scanned object can be scanned based on the updated scanning point posture of the updated scanning path, and the three-dimensional model obtained in the previous scanning corresponding to the scanned object is updated to obtain the current three-dimensional model corresponding to the scanned object. The specific updating process of the three-dimensional model is similar to S150, which will not be repeated here.
[0042] In some embodiments, S121 may include: S121A: scanning the scanned object based on the scanning point posture of the current scanning path to obtain current scanning data; performing gridding processing based on the current scanning data, or performing gridding processing and hole filling processing based on the current scanning data to obtain the current three-dimensional model.
[0043] In one example, S121A includes: scanning the scanned object based on a preset scanning point posture of a preset scanning path to obtain current scanning data; performing gridding and hole filling processing based on the current scanning data to obtain a current three-dimensional model.
[0044] In another example, S121A includes: scanning the scanned object based on the updated scanning point posture of the updated scanning path to obtain current scanning data; performing meshing processing, or meshing processing and hole filling processing based on the current scanning data to obtain a current three-dimensional model.
[0045] Specifically, meshing is performed based on the current scan data to obtain the current initial 3D model. If the current initial 3D model is a complete 3D model corresponding to the scanned object, the current initial 3D model is the current 3D model. If the current initial 3D model is not a complete 3D model corresponding to the scanned object, the current initial 3D model can be processed to fill holes. Then, the current initial 3D model is processed to fill holes to obtain the current 3D model. Of course, the current scan data can be pre-processed before meshing, such as deduplication of scan data corresponding to the same area of the measured object, but it is not limited to this.
[0046] Specifically, the current initial three-dimensional model is a three-dimensional model corresponding to the scanned object and obtained by meshing the current scanning data.
[0047] It should be noted that any method known to those skilled in the art can be used to mesh the current scan data, and the meshed facets obtained by the meshing process can be triangular facets, quadrangular facets, etc., but are not limited thereto. Any hole-filling method known to those skilled in the art can be used to fill the holes in the current initial three-dimensional model, which is not limited here.
[0048] It is understandable that some areas of the scanned object may not be able to obtain corresponding scanning data due to reasons such as material or lack of scanning point pose matching. Therefore, the current initial three-dimensional model may not be a complete three-dimensional model corresponding to the scanned object. The current initial three-dimensional model can be filled with holes to obtain a complete three-dimensional model corresponding to the scanned object (i.e., the current three-dimensional model).
[0049] Of course, for the current three-dimensional model, different types of identifiers can be used to distinguish between mesh patches obtained by meshing processing and mesh patches obtained based on hole filling processing.
[0050] Of course, the current three-dimensional model can also be visualized to present the complete three-dimensional model corresponding to the scanned object to the user in real time.
[0051] S130. Determine a next scanning path based on the current three-dimensional model, where the next scanning path includes at least one scanning point posture.
[0052] In some embodiments, S130 may include: inputting the current three-dimensional model, the scanning point poses of the current scanning path, and a plurality of candidate scanning point poses in the solution space into a trained path planning model to obtain a next scanning path.
[0053] In some other embodiments, S130 may include: S131, obtaining a preset solution space.
[0054] Specifically, the description of the preset solution space is given above and will not be repeated here.
[0055] S132. Based on the current three-dimensional model, determine the current gain values corresponding to the multiple candidate scanning point postures, wherein the current gain values are used to characterize the degree of scanning completeness of the sub-area corresponding to the candidate scanning point postures on the current three-dimensional model.
[0056] In some embodiments, S132 may include: inputting the current three-dimensional model, multiple candidate scanning point postures in the solution space, and the type identifier of each mesh face in the current three-dimensional model into a trained benefit value recognition model to obtain the current benefit values corresponding to the multiple candidate scanning point postures output by the benefit value recognition model.
[0057] In other embodiments, S132 may include: S13211, obtaining a current weight field, wherein the current weight field includes a plurality of voxel points and current weight values of the plurality of voxel points, and the current three-dimensional model is located in the current weight field.
[0058] Optionally, obtaining the current weight field includes: S132111, scanning the scanned object based on the scanning point posture of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object; S132112, obtaining an initial weight field, wherein the initial weight field includes multiple voxel points and initial weight values of the multiple voxel points, and the current three-dimensional model is located in the initial weight field; S132113, updating the initial weight field based on the current three-dimensional model to obtain the current weight field.
[0059] Specifically, a preset weight field corresponding to the solution space can be pre-constructed. The preset weight field includes multiple voxel points and weight values corresponding to the multiple voxel points, wherein the smaller the weight value of the voxel point is, the more the three-dimensional point on the three-dimensional model corresponding to the voxel point meets the scanning requirements, and the less further scanning is required. The weight value in the preset weight field is generally the third weight value, indicating that further scanning is required.
[0060] Specifically, if the current scanning process is the first scan, the initial weight field is the preset weight field; if at least one scan has been performed before the current scanning process, the initial weight field is the weight field updated based on the three-dimensional model corresponding to the previous scan. The specific update process is similar to S132113 and will not be repeated here.
[0061] Further optionally, S132113 includes: for a part of the current three-dimensional model acquired by scanning with a camera based on a scanning point position located at the current scanning path, determining its voxel points in the initial weight field and reducing its corresponding initial weight value to a first weight value; for the current three-dimensional model, determining the voxel points through which a line connecting it and the camera located at a scanning point position located at the current scanning path passes in the initial weight field, and reducing the weight value corresponding to the passed voxel point to a second weight value; and updating the initial weight field to obtain the current weight field.
[0062] Specifically, the second weight value is smaller than the first weight value, and the first weight value is smaller than the third weight value.
[0063] It should be noted that, for each 3D point on the current 3D model, the voxel point through which the line connecting it and the camera passes is determined, which actually means that the scanner (virtual scanner) is in a scanning point position, and the current 3D model is located in the field of view of the scanner. The weight value of the voxel point where the part of the current 3D model surface is located in the field of view becomes the first weight value, and the current 3D model surface and the field of view space enclose a closed space (for example, a conical space), which forms an overlapping space with the weight field where the current 3D model is located, and the weight value of the voxel point located in the overlapping space becomes the second weight value.
[0064] For example, Figure 2 is a logical diagram of updating the initial weight field provided by an embodiment of the present disclosure. Figure 2 , the weight value of the voxel point where the 3D point on the current 3D model MX is located decreases from 9 to 1, and the weight values of other voxel points passed by the line connecting the camera WZ0 decreases from 9 to 0.
[0065] It can be understood that by updating the initial weight field in the above manner, the current gain value determined subsequently can be more accurate and more consistent with the current actual scanning situation.
[0066] S13112. For mesh faces on the current three-dimensional model, the mesh faces obtained by meshing the current scan data are rendered as a preset first color, and the mesh faces obtained by the hole filling process are determined according to their IDs based on a preset coding principle and rendered as corresponding colors, wherein the color corresponding to each mesh face obtained by the hole filling process is different from the colors corresponding to other mesh faces on the current three-dimensional model.
[0067] Specifically, those skilled in the art may set the first color according to actual conditions, for example, the first color is black, but it is not limited thereto.
[0068] Specifically, for the mesh surface obtained by the hole filling process, its corresponding color is determined by querying the preset coding principle according to its ID (i.e., identity identifier). The colors corresponding to any two mesh surfaces obtained by the hole filling process are different, and the color corresponding to the mesh surface obtained by the hole filling process is different from the first color. In this way, the reliability of the current three-dimensional model can be intuitively displayed to the user according to the rendering color of the current three-dimensional model.
[0069] Exemplarily, for the mesh face on the current three-dimensional model, if the type of the mesh face is a mesh face obtained by hole filling processing, the corresponding color is determined by querying the mapping relationship between the identity of the mesh face and the color (that is, the preset encoding principle), for example, the color RGB value corresponding to the mesh face with an identity of 001 is (0,0,1), the color RGB value corresponding to the mesh face with an identity of 002 is (0,0,2), and the color RGB value corresponding to the mesh face with an identity of 003 is (0,0,3); if the type of the mesh face is obtained by gridding the current scanning data, then the corresponding color is determined to be the first color, for example, the first color is black.
[0070] S13113. For the candidate scanning point pose, determine the sub-region corresponding to it on the current three-dimensional model, and generate a current gain map corresponding to the sub-region.
[0071] Specifically, the understanding of the sub-area is as follows: when the scanner's posture is a certain scanning point posture, the presentation area of the area on the scanned object within the scanner's field of view on the current three-dimensional model is the sub-area corresponding to the scanning point posture.
[0072] Specifically, each candidate scanning point posture corresponds to a sub-region, and the current yield map corresponding to the candidate scanning point posture can be generated based on the sub-region. The pixels in the current yield map correspond to the mesh patches on the current three-dimensional model. Specifically, each pixel contains the RGB value of the corresponding mesh patch color. The corresponding mesh patch ID can be determined by combining the RGB value with the preset coding principle, thereby determining the correspondence between each pixel and the mesh patch ID. The correspondence between a mesh patch and several pixels (or a mesh patch is represented by several pixels), as well as the color of the pixels corresponding to a mesh patch, can be set by those skilled in the art according to actual conditions and are not limited here.
[0073] S13114. For the pixel points in the current gain map, determine the corresponding ID of the pixel point according to the color, determine the three-dimensional point corresponding to the pixel point in the current weight field based on the pixel point and the corresponding ID, and use the current weight value corresponding to the three-dimensional point in the current weight field as the weight value of the pixel point.
[0074] Specifically, a larger weight value of a pixel point indicates that the corresponding three-dimensional point is less reliable, and the object point corresponding to the three-dimensional point on the scanned object needs to be further scanned.
[0075] Optionally, for the pixel points in the current gain map, the corresponding ID of the pixel points is determined according to the color, and the three-dimensional point corresponding to the pixel point is determined in the current weight field based on the pixel point and the corresponding ID, including: for the pixel points in the current gain map, the grid face ID corresponding to the pixel point is determined according to the color, and linear interpolation is performed on the grid face of the corresponding ID based on the pixel coordinates of the pixel point to obtain the three-dimensional point corresponding to the pixel point.
[0076] Specifically, based on the ID of the corresponding mesh patch recorded behind the pixel point, the mesh patch corresponding to the pixel point is determined, and then, based on the pixel coordinates of the pixel point and the vertex coordinates of the corresponding mesh patch, linear interpolation is performed to obtain the three-dimensional point corresponding to the pixel point on the mesh patch. It should be noted that any linear interpolation method known to those skilled in the art can be used to linearly interpolate the pixel coordinates of the pixel point and the vertex coordinates of the corresponding mesh patch, and this is not limited. In the present application, the mesh patch of the current three-dimensional model is rendered according to the preset rendering principle, and the scanner (virtual scanner) in a scanning point posture shoots the rendered current three-dimensional model to obtain a benefit map. Each pixel point of the benefit map contains the RGB value of the corresponding mesh patch rendering color. The corresponding mesh patch can be determined according to the RGB of the benefit map, and then the three-dimensional point is linearly interpolated in the corresponding mesh patch according to the pixel coordinates of the benefit map, so as to determine the voxel point where the mesh patch is located. Compared with the direct intersection calculation based on the current three-dimensional model and the camera parameters, a large amount of calculation is reduced, so as to quickly update the weight value and reduce the occupation of computing resources. The rendering principle refers to a rendering principle of a mesh surface obtained by meshing the current scan data and a rendering principle of a mesh surface obtained by hole filling processing (ie, a preset encoding principle).
[0077] S13115. Add the weight values of the pixel points in the current benefit map corresponding to the mesh patches obtained by the hole filling process to obtain the benefit value of the current benefit map, and use the benefit value of the current benefit map as the current benefit value of the corresponding candidate scanning point posture.
[0078] It can be understood that the reliability of the mesh surface obtained by gridding processing is higher, and the reliability of the mesh surface obtained by hole filling processing is lower. Therefore, in the embodiment of the present disclosure, the weight values of the three-dimensional points corresponding to the pixel points corresponding to the mesh surface obtained by hole filling processing in the current gain map corresponding to the candidate scanning point posture are added together to obtain the current gain value, so that the current gain value can more accurately represent the reliability of the sub-area corresponding to the candidate scanning point posture.
[0079] In some further embodiments, S132 may include: S13221, obtaining a current weight field, wherein the current weight field includes a plurality of voxel points and current weight values of the plurality of voxel points, and the current three-dimensional model is located in the current weight field;
[0080] Specifically, S13221 is similar to S13211 and will not be described again here.
[0081] S13222. For the candidate scanning point posture, determine the sub-region corresponding to it on the current three-dimensional model, and use the current weight value corresponding to the three-dimensional point in the sub-region in the current weight field as the weight value of the three-dimensional point.
[0082] Specifically, sampling may be performed on the mesh patch of the sub-region to obtain a plurality of three-dimensional points, and the current weight value corresponding to the three-dimensional point in the current weight field may be determined as the weight value of the three-dimensional point.
[0083] S13223. Add the weight values of the three-dimensional points in the sub-region and on the mesh surface obtained by the hole filling process to obtain the current benefit value of the candidate scanning point posture.
[0084] It can be understood that directly determining the corresponding weight value based on the current weight value corresponding to the three-dimensional point in the sub-area corresponding to the candidate scanning point posture in the current weight field has small calculation amount and fast processing speed, which is conducive to quickly obtaining the current benefit value of the candidate scanning point posture.
[0085] S133. Based on the current benefit values respectively corresponding to the multiple candidate scanning point postures, select at least one from the multiple scanning point postures in the preset solution space as the scanning point posture of the next scanning path.
[0086] In some embodiments, S133 may include: sorting the current benefit values corresponding to multiple candidate scanning point postures to obtain a sorting result; based on the sorting result, at least taking the candidate scanning point posture corresponding to the maximum benefit value as the scanning point posture of the next scanning path.
[0087] Specifically, the current benefit values corresponding to the multiple candidate scanning point postures are sorted from large to small (or small to large) to obtain a sorting result. Then, the candidate scanning point posture corresponding to the maximum benefit value is used as the scanning point posture of the next scanning path.
[0088] It can be understood that by setting at least the candidate scanning point posture corresponding to the maximum gain value as the scanning point posture of the next scanning path, the most unreliable sub-area of the current three-dimensional model can be rescanned to greatly improve the accuracy and completeness of the three-dimensional model corresponding to the scanned object.
[0089] In other embodiments, S133 may include: for a plurality of candidate scanning point postures, respectively corresponding to the current gain value, if it is greater than a third preset threshold, determining the corresponding candidate scanning point posture as the scanning point posture of the next scanning path.
[0090] S140: Update the current scanning path based on the next scanning path.
[0091] Specifically, the next scanning path is used as the current scanning path.
[0092] S150: Scan the scan object based on the updated scan point posture of the current scan path, and update the current three-dimensional model corresponding to the scanned object.
[0093] Specifically, by scanning the scan object based on the scan point posture of the updated current scan path, updated current scan data can be obtained, and by performing gridding processing based on the updated current scan data, or performing gridding processing and hole filling processing based on the updated current scan data, an updated current three-dimensional model can be obtained.
[0094] Optionally, after S150, the method may further include: based on the updated current three-dimensional model, updating the current gain values corresponding to multiple candidate scanning point postures respectively; if the updated current gain values corresponding to multiple candidate scanning point postures meet preset conditions, ending the scanning, otherwise returning to execute S130.
[0095] Specifically, the preset conditions may include: the maximum value of the updated current revenue values corresponding to multiple candidate scanning point postures is less than the first preset revenue value, and / or the average value of the updated current revenue values corresponding to multiple candidate scanning point postures is less than the second preset revenue value, etc., but are not limited to this.
[0096] It can be understood that in the relevant technologies for automatically planning scanning paths, the heuristic method generally starts from the nearest scanning point and scans. The posture of the next scan is searched near the posture of the previous scan. The goal of the search is to ensure that the next scan does not overlap with the previous scan. However, all existing technologies do not take into account the inherent characteristics of the scanned object. The object may not be able to obtain three-dimensional information through scanning due to material and other issues. In this case, the existing method may fall into an infinite loop or fail to end the scanning process, or simply jump out of the loop by setting the maximum number of iterations, which often leads to incomplete scanning or repeated scanning data. However, the disclosed embodiment can control the global benefit value based on the global preset weight field and jump out of the local optimum. Therefore, the risk of falling into an infinite loop or failing to end the scan due to the inability to jump out of the local optimum can be reduced, thereby improving the efficiency of three-dimensional scanning. In addition, it is possible to automatically obtain the optimal scanning path and obtain the most complete three-dimensional model corresponding to the scanned object with the least scanning data.
[0097] The automated three-dimensional scanning method provided by the embodiment of the present disclosure is described below with reference to a specific example.
[0098] 1. Establish a solution space for global scanning of the scanned object (i.e., the set of all candidate scanning point poses of the scanner) and a preset weight field under the solution space.
[0099] 2. During the first scanning process, multiple candidate scanning point postures are uniformly selected from multiple candidate scanning point postures to obtain the current scanning path.
[0100] 3. Scan the object to be scanned based on the current scanning path to obtain the current three-dimensional model.
[0101] 4. Based on the current 3D model, determine the current revenue values corresponding to multiple candidate scanning point positions.
[0102] Specifically, the current 3D model is passed to the renderer for rendering (stereoscopic simulation rendering, stereoscopic scanning simulator based on shadow mapping), and the benefit graph under each candidate scanning point posture is rendered in turn according to the solution space.
[0103] 5. Sort the current benefit values corresponding to the multiple candidate scanning point postures to obtain a sorting result, and based on the sorting result, at least use the candidate scanning point posture corresponding to the maximum benefit value as the scanning point posture of the next scanning path.
[0104] 6. Update the current scan path based on the next scan path.
[0105] 7. Scan the scanned object based on the updated scan point pose of the current scan path, and update the current three-dimensional model corresponding to the scanned object.
[0106] The disclosed embodiment controls the global benefit value through a global preset weight field to escape from the local optimum, establishes the relationship between color and three-dimensional space through color picking, and obtains a benefit graph based on a binocular occlusion rendering simulator based on a shadow map. In this way, it is possible to automatically escape from the situation where scanning is impossible due to material problems. The GPU accelerates the physical simulation of binocular scanning, the result is accurate and reliable, and the scanning process is fully automated, without the need for human intervention and is not affected by the scanned object.
[0107] Figure 3 is a schematic diagram of the structure of an automated three-dimensional scanning device provided by an embodiment of the present disclosure, and the automated three-dimensional scanning device can be understood as the above-mentioned electronic device or a part of the functional modules in the above-mentioned electronic device. Figure 3 As shown, the automated three-dimensional scanning device 300 includes:
[0108] A first acquisition module 310 is used to acquire a current scanning path, where the current scanning path includes at least one scanning point posture;
[0109] A first scanning module 320, configured to scan the scanned object based on the scanning point positions of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object;
[0110] A first determination module 330, configured to determine a next scanning path based on the current three-dimensional model, wherein the next scanning path includes at least one scanning point posture;
[0111] A first updating module 340, configured to update the current scanning path based on the next scanning path;
[0112] The second updating module 350 is used to scan the scanned object based on the updated scanning point posture of the current scanning path, and update the current three-dimensional model corresponding to the scanned object.
[0113] In another embodiment of the present disclosure, the current scanning path includes a preset scanning path, and the preset scanning path includes at least one preset scanning point posture;
[0114] The first scanning module 320 is specifically used to scan the scanned object based on the preset scanning point posture of the preset scanning path to obtain a current three-dimensional model corresponding to the scanned object.
[0115] In another embodiment of the present disclosure, the first scanning module 320 is specifically used to scan the scanned object based on a preset scanning point posture of a preset scanning path to obtain current scanning data; and perform gridding and hole filling processing based on the current scanning data to obtain a current three-dimensional model.
[0116] In yet another embodiment of the present disclosure, the current scanning path includes an updated scanning path, and the updated scanning path includes at least one updated scanning point pose;
[0117] The first scanning module 320 is specifically used to scan the scanned object based on the updated scanning point posture of the updated scanning path, and update the three-dimensional model corresponding to the scanned object obtained by the previous scanning to obtain the current three-dimensional model corresponding to the scanned object.
[0118] In another embodiment of the present disclosure, the first determining module 330 includes:
[0119] A first acquisition submodule is used to acquire a preset solution space, wherein the solution space includes a plurality of candidate scanning point positions;
[0120] A first determination submodule is used to determine the current benefit values corresponding to the plurality of candidate scanning point postures based on the current three-dimensional model, wherein the current benefit value is used to characterize the degree of scanning completeness of the sub-area corresponding to the candidate scanning point posture on the current three-dimensional model;
[0121] The first selection submodule is used to select at least one scanning point posture from multiple candidate scanning point postures as the scanning point posture of the next scanning path based on the current benefit values respectively corresponding to the multiple candidate scanning point postures.
[0122] In yet another embodiment of the present disclosure, the first determining submodule includes:
[0123] A first acquisition unit is used to acquire a current weight field, wherein the current weight field includes a plurality of voxel points and weight values of the plurality of voxel points, and the current three-dimensional model is located in the current weight field;
[0124] a rendering unit, for rendering, for mesh face patches on the current three-dimensional model, mesh face patches obtained by meshing the current scan data into a preset first color, and for mesh face patches obtained by hole filling processing, determining their corresponding colors according to a preset coding principle based on their IDs and rendering them into corresponding colors, wherein the color corresponding to each mesh face patch obtained by hole filling processing is different from the colors corresponding to other mesh face patches on the current three-dimensional model;
[0125] A first determination unit is used to determine, for a candidate scanning point posture, a sub-region corresponding thereto on the current three-dimensional model, and generate a current gain map corresponding to the sub-region, wherein the pixel points in the current gain map have a corresponding relationship with the mesh surface patches on the current three-dimensional model;
[0126] A second determination unit is used to determine the corresponding ID of the pixel point in the current revenue map according to the color, determine the three-dimensional point corresponding to the pixel point in the current weight field based on the pixel point and the corresponding ID, and use the current weight value corresponding to the three-dimensional point in the current weight field as the weight value of the pixel point;
[0127] The first adding unit is used to add the weight values of the pixel points in the current benefit map corresponding to the mesh patches obtained by the hole filling process to obtain the benefit value of the current benefit map, and use the benefit value of the current benefit map as the current benefit value of the corresponding candidate scanning point posture.
[0128] In yet another embodiment of the present disclosure, the first determining submodule includes:
[0129] A first acquisition unit is used to acquire a current weight field, wherein the current weight field includes a plurality of voxel points and current weight values of the plurality of voxel points, and the current three-dimensional model is located in the current weight field;
[0130] A third determination unit is used to determine a sub-region corresponding to the candidate scanning point posture on the current three-dimensional model, and use the current weight value corresponding to the three-dimensional point in the sub-region in the current weight field as the weight value of the three-dimensional point;
[0131] The second adding unit is used to add the weight values of the three-dimensional points in the sub-region and on the mesh surface obtained by the hole filling process to obtain the current benefit value of the candidate scanning point posture.
[0132] In another embodiment of the present disclosure, the first acquisition unit may include:
[0133] A first scanning subunit is used to scan the scanned object based on the scanning point posture of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object;
[0134] A first acquisition subunit is used to acquire an initial weight field, wherein the initial weight field includes a plurality of voxel points and initial weight values of the plurality of voxel points, and the current three-dimensional model is located in the initial weight field;
[0135] The first updating subunit is used to update the initial weight field based on the current three-dimensional model to obtain the current weight field.
[0136] In another embodiment of the present disclosure, the first update subunit is specifically used to determine the voxel points in the initial weight field and reduce the corresponding initial weight values to the first weight values for the part of the current three-dimensional model acquired by the camera scanning based on the scanning point posture located in the current scanning path; for the current three-dimensional model, determine the voxel points through which the line connecting it and the camera located in the scanning point posture of the current scanning path passes in the initial weight field, and reduce the weight values corresponding to the passed voxel points to the second weight values; and update the initial weight field to obtain the current weight field.
[0137] In another embodiment of the present disclosure, for a pixel point in the current revenue map, a corresponding ID of the pixel point is determined according to the color, and a three-dimensional point corresponding to the pixel point is determined in the current weight field based on the pixel point and the corresponding ID, including:
[0138] For the pixel points in the current yield map, the mesh patch ID corresponding to the pixel point is determined according to the color, and linear interpolation is performed on the mesh patch of the corresponding ID based on the pixel coordinates of the pixel point to obtain the three-dimensional point corresponding to the pixel point.
[0139] In yet another embodiment of the present disclosure, the first determining submodule further includes:
[0140] The identification unit is used to distinguish mesh face patches obtained by meshing processing and mesh face patches obtained based on hole filling processing by using different types of identification for the current three-dimensional model.
[0141] In another embodiment of the present disclosure, the first selection submodule is specifically used to sort the current revenue values corresponding to the multiple candidate scanning point postures to obtain a sorting result;
[0142] Based on the sorting result, at least the candidate scanning point pose corresponding to the maximum benefit value is used as the scanning point pose of the next scanning path.
[0143] The device provided in this embodiment can execute the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.
[0144] An embodiment of the present disclosure further provides an electronic device, which includes: a memory, in which a computer program is stored; and a processor, which is used to execute the computer program. When the computer program is executed by the processor, the method of any of the above embodiments can be implemented.
[0145] For example, Figure 4 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 4 , which shows a schematic diagram of the structure of an electronic device 400 suitable for implementing the embodiment of the present disclosure. The electronic device 400 in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0146] like Figure 4 As shown, the electronic device 400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage device 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the electronic device 400 are also stored. The processing device 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0147] Typically, the following devices may be connected to the I / O interface 405: an input device 406 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 409. The communication device 409 may allow the electronic device 400 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4The electronic device 400 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0148] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 409, or installed from the storage device 408, or installed from the ROM 402. When the computer program is executed by the processing device 401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0149] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0150] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0151] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0152] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: obtains a current scanning path, where the current scanning path includes at least one scanning point posture;
[0153] Scanning the scanned object based on the scanning point posture of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object;
[0154] Determine a next scanning path based on the current three-dimensional model, where the next scanning path includes at least one scanning point posture;
[0155] updating the current scan path based on the next scan path;
[0156] The scanned object is scanned based on the updated scan point position of the current scan path, and the current three-dimensional model corresponding to the scanned object is updated.
[0157] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0158] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0159] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0160] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0161] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0162] The embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.
[0163] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0164] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An automated three-dimensional scanning method, characterized in that: include: Obtaining a current scanning path, where the current scanning path includes at least one scanning point posture; Scanning the scanned object based on the posture of each scanning point in the current scanning path to obtain a current three-dimensional model corresponding to the scanned object, wherein the current three-dimensional model is obtained after meshing and hole filling processing; Determine a next scanning path based on the current three-dimensional model, where the next scanning path includes at least one scanning point posture; updating the current scan path based on the next scan path; Scanning the scanned object based on the updated scan point pose of the current scan path, and updating the current three-dimensional model corresponding to the scanned object; Determine the next scanning path based on the current 3D model, including: Obtaining a preset solution space, wherein the solution space includes a plurality of candidate scanning point poses; Based on the current three-dimensional model, current benefit values corresponding to a plurality of candidate scanning point postures are determined, wherein the current benefit values are used to characterize the degree of scanning completeness of the sub-area corresponding to the candidate scanning point postures on the current three-dimensional model; Based on the current 3D model, the current revenue values corresponding to multiple candidate scanning point positions are determined, including: Obtaining a current weight field, wherein the current three-dimensional model is located in the current weight field; Rendering mesh patches of the current three-dimensional model, wherein the color corresponding to the mesh patches obtained by the hole filling process is different from the colors corresponding to other mesh patches on the current three-dimensional model; For the candidate scanning point pose, determine the corresponding sub-region on the current 3D model after rendering, and generate the current revenue map corresponding to the sub-region; Determine the pixel points in the current revenue map corresponding to the mesh patch obtained by the hole filling process according to the color; Determine the benefit value of the current benefit map based on the weight values corresponding to the pixel points in the current benefit map corresponding to the mesh patches obtained by the hole filling process in the current weight field; Based on the current revenue values respectively corresponding to the multiple candidate scanning point postures, at least one is selected from the multiple candidate scanning point postures as the scanning point posture of the next scanning path.
2. The method according to claim 1, characterized in that The current scanning path includes a preset scanning path, and the preset scanning path includes at least one preset scanning point posture; The scanned object is scanned based on the scanning point position of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object, including: The scanned object is scanned based on the preset scanning point positions of the preset scanning path to obtain a current three-dimensional model corresponding to the scanned object.
3. The method according to claim 1, characterized in that The current scan path includes an updated scan path, and the updated scan path includes at least one updated scan point pose; The scanned object is scanned based on the scanning point position of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object, including: The scanned object is scanned based on the updated scanning point positions of the updated scanning path, and the three-dimensional model corresponding to the scanned object obtained in the previous scanning is updated to obtain the current three-dimensional model corresponding to the scanned object.
4. The method according to claim 1, characterized in that The scanned object is scanned based on the scanning point position of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object, including: Scanning the scanned object based on the preset scanning point posture of the preset scanning path to obtain current scanning data; Meshing and hole filling are performed based on the current scan data to obtain the current three-dimensional model.
5. The method according to claim 1, characterized in that Based on the current 3D model, the current revenue values corresponding to multiple candidate scanning point positions are determined, including: Obtaining a current weight field, wherein the current weight field includes a plurality of voxel points and current weight values of the plurality of voxel points, and the current three-dimensional model is located in the current weight field; For mesh patches on the current three-dimensional model, the mesh patches obtained by meshing the current scan data are rendered as a preset first color, and the mesh patches obtained by hole filling are determined according to their IDs according to a preset coding principle and rendered as corresponding colors, wherein the color corresponding to each mesh patch obtained by hole filling is different from the colors corresponding to other mesh patches on the current three-dimensional model; For the candidate scanning point pose, determine the sub-region corresponding to it on the current three-dimensional model, and generate the current benefit map corresponding to the sub-region, wherein the pixel points in the current benefit map have a corresponding relationship with the mesh surface on the current three-dimensional model; for the pixel points in the current benefit map, determine the corresponding ID of the pixel point according to the color, determine the three-dimensional point corresponding to the pixel point in the current weight field based on the pixel point and the corresponding ID, and use the current weight value corresponding to the three-dimensional point in the current weight field as the weight value of the pixel point; The weight values of the pixel points in the current benefit map corresponding to the mesh patches obtained by the hole filling process are added together to obtain the benefit value of the current benefit map, and the benefit value of the current benefit map is used as the current benefit value of the corresponding candidate scanning point posture.
6. The method according to claim 1, characterized in that Based on the current 3D model, the current revenue values corresponding to multiple candidate scanning point positions are determined, including: Obtaining a current weight field, wherein the current weight field includes a plurality of voxel points and current weight values of the plurality of voxel points, and the current three-dimensional model is located in the current weight field; For the candidate scanning point pose, determine the sub-region corresponding to it on the current 3D model, and use the current weight value corresponding to the 3D point in the sub-region in the current weight field as the weight value of the 3D point; The weight values of the three-dimensional points in the sub-region and on the mesh patch obtained by the hole filling process are added together to obtain the current benefit value of the candidate scanning point pose.
7. The method according to claim 5 or 6, characterized in that Get the current weight field, including: Scanning the scanned object based on the scanning point posture of the current scanning path to obtain a current three-dimensional model corresponding to the scanned object; Acquire an initial weight field, wherein the initial weight field includes a plurality of voxel points and initial weight values of the plurality of voxel points, and the current three-dimensional model is located in the initial weight field; The initial weight field is updated based on the current three-dimensional model to obtain the current weight field.
8. The method according to claim 7, characterized in that The initial weight field is updated based on the current three-dimensional model to obtain the current weight field, including: For a portion of the current three-dimensional model acquired by camera scanning based on the scanning point posture located in the current scanning path, determine the voxel point in the initial weight field and reduce the corresponding initial weight value to a first weight value; For the current three-dimensional model, determine the voxel points that the line connecting the current three-dimensional model and the camera at the scanning point position of the current scanning path passes through in the initial weight field, and reduce the weight value corresponding to the passed voxel point to the second weight value; The initial weight field is updated to obtain the current weight field.
9. The method according to claim 5, characterized in that For the pixel points in the current income map, the corresponding ID of the pixel points is determined according to the color, and the three-dimensional point corresponding to the pixel point is determined in the current weight field based on the pixel points and the corresponding ID, including: For the pixel points in the current yield map, the mesh patch ID corresponding to the pixel point is determined according to the color, and linear interpolation is performed on the mesh patch of the corresponding ID based on the pixel coordinates of the pixel point to obtain the three-dimensional point corresponding to the pixel point.
10. The method according to claim 5, characterized in that Also includes: For the current three-dimensional model, different types of identifiers are used to distinguish between mesh patches obtained by meshing and mesh patches obtained based on hole filling.
11. The method according to claim 5, characterized in that Selecting at least one of the plurality of candidate scanning point poses as a scanning point pose of a next scanning path includes: Sort the current revenue values corresponding to multiple candidate scanning point positions and postures to obtain a sorting result; Based on the sorting result, at least the candidate scanning point pose corresponding to the maximum benefit value is used as the scanning point pose of the next scanning path.
12. An automated three-dimensional scanning device, characterized in that: include: A first acquisition module, used to acquire a current scanning path, where the current scanning path includes at least one scanning point posture; A first scanning module, used to scan the scanned object based on the posture of each scanning point in the current scanning path to obtain a current three-dimensional model corresponding to the scanned object, wherein the current three-dimensional model is obtained after meshing and hole filling processing; A first determination module, configured to determine a next scanning path based on the current three-dimensional model, wherein the next scanning path includes at least one scanning point posture; A first updating module, configured to update a current scanning path based on a next scanning path; A second updating module is used to scan the scanned object based on the updated scanning point posture of the current scanning path, and update the current three-dimensional model corresponding to the scanned object; The first determination module includes: A first acquisition submodule is used to acquire a preset solution space, wherein the solution space includes a plurality of candidate scanning point positions; A first determination submodule is used to determine the current benefit values corresponding to the plurality of candidate scanning point postures based on the current three-dimensional model, wherein the current benefit value is used to characterize the degree of scanning completeness of the sub-area corresponding to the candidate scanning point posture on the current three-dimensional model; The first determining submodule includes: A first acquisition unit is used to acquire a current weight field, wherein the current three-dimensional model is located in the current weight field; A rendering unit, used for rendering mesh patches of the current three-dimensional model, wherein the color corresponding to the mesh patches obtained by the hole filling process is different from the colors corresponding to other mesh patches on the current three-dimensional model; A first determination unit is used to determine, for the candidate scanning point pose, a sub-region corresponding thereto on the rendered current three-dimensional model, and generate a current gain map corresponding to the sub-region; A second determination unit is used to determine, according to the color, the pixel point in the current yield map corresponding to the mesh surface obtained by the hole filling process; A third determining unit is used to determine the benefit value of the current benefit map based on the weight values corresponding to the pixel points in the current benefit map corresponding to the mesh surface obtained by the hole filling process in the current weight field; The first selection submodule is used to select at least one scanning point posture from multiple candidate scanning point postures as the scanning point posture of the next scanning path based on the current benefit values respectively corresponding to the multiple candidate scanning point postures.
13. An electronic device, characterized in that: include: A processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 11.
14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Point cloud three-dimensional model reestablishing method and system
CN104063894A
Scanning path adjusting method and device, automatic scanning system and computer equipment
CN114739405A