Methods and related equipment for continuous sampling measurement path optimization for 3D scanners

By improving the ant colony algorithm to optimize the measurement path of the 3D scanner and combining measurement coverage and quality weights, the problems of low path planning efficiency and insufficient accuracy in the existing technology are solved, and efficient and reliable 3D scanning results are achieved.

CN120651141BActive Publication Date: 2025-10-28CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511159531.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-08-19
Publication Date
2025-10-28
Estimated Expiration
2045-08-19

AI Technical Summary

Technical Problem

Existing 3D scanners suffer from low efficiency, insufficient accuracy, and poor real-time performance in measurement path planning. In particular, when scanning complex objects, traditional methods struggle to optimize paths to meet the high requirements of real-time performance, accuracy, and robustness.

Method used

An improved ant colony algorithm is used to optimize the measurement path of a 3D scanner. By constructing a weighted graph with viewpoints as vertices, the improved ant colony algorithm optimizes the viewpoint connection order and combines the weights of measurement coverage and measurement quality to optimize the measurement path.

Benefits of technology

It improves the practicality and reliability of measurement paths, ensures comprehensive coverage and high-quality measurement of complex objects, reduces redundant data, and improves measurement efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120651141B_ABST
    Figure CN120651141B_ABST
Patent Text Reader

Abstract

This invention provides a continuous sampling measurement path optimization method and related equipment for 3D scanners, relating to the field of automated measurement technology. The method includes: acquiring surface contour data and viewpoint data of the object being scanned; constructing a weighted graph by treating each viewpoint as a vertex and the path between every two viewpoints as an edge; inputting the weighted graph into an improved ant colony algorithm to optimize the connection order of the vertices in the weighted graph, thereby obtaining the optimized measurement path result for the object being scanned; and the 3D scanner performing a scanning task on the object based on the optimized measurement path result. Compared with existing technologies, this invention improves the practicality and reliability of the measurement path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automated measurement technology, and in particular to a method and related equipment for optimizing continuous sampling measurement paths for 3D scanners. Background Technology

[0002] Automated 3D scanner measurement involves a multi-DOF (typically 6-DOF) robot carrying a laser 3D scanner, moving along a planned path to scan and measure an object from multiple viewpoints, thereby obtaining complete 3D data. However, the 3D data obtained during the measurement process is significantly influenced by the viewpoints, as the viewpoints directly determine the measurement position and orientation of the 3D scanner. Simultaneously, the robot drives the scanner along a measurement path that passes through all viewpoints; therefore, the measurement path determines the feasibility and efficiency of the measurement task. Measurement path planning typically involves two steps: first, planning a discrete set of viewpoints that can cover the surface of the object being measured; second, connecting these viewpoints to form a continuous measurement path.

[0003] Many objects being measured have complex structures, requiring numerous measurement viewpoints and complex measurement paths due to visual occlusion, which increases measurement time. Traditionally, experienced personnel teach the robot based on their experience to determine the connection order of the measurement viewpoints. This process is very time-consuming, and manual planning lacks reference methods and guidelines. Relying solely on experience makes it difficult to accurately select the most suitable viewpoint connection order, resulting in poor scanning results and requiring repeated modifications and adjustments to the viewpoint connection order. This adds unnecessary measurement time and fails to maximize the efficiency of automated measurement equipment. Therefore, there is an urgent need for a method that automatically plans the viewpoint connection order to improve measurement efficiency and accuracy.

[0004] Existing technologies provide a method for planning measurement paths, which uses the Robotics module of the scanner control software provided by the scanner manufacturer to generate the robot's scanning motion trajectory offline. Based on the shape characteristics of the product under test, the robot's end effector laser scanner is controlled to move and generate path point labels. The Robotics module automatically stores the path and generates a list. However, for 3D scanning of complex objects, problems such as unreasonable scanning path planning, large data redundancy, and low real-time processing efficiency are often encountered, making it difficult to meet the high requirements for real-time performance, accuracy, and robustness in practical applications.

[0005] With the rapid development of artificial intelligence, AI technology has been applied to the field of measurement path optimization for robotic 3D scanners. Some researchers have tried to use an ant colony algorithm to optimize measurement paths. However, in the process of path optimization, traditional ant colony algorithms usually rely only on path length for heuristic information and path weights, ignoring the importance of measurement quality and measurement integrity for path optimization. Summary of the Invention

[0006] This invention provides a method and related equipment for optimizing continuous sampling measurement paths for 3D scanners, with the aim of improving the practicality and reliability of measurement paths.

[0007] To achieve the above objectives, the present invention provides a method for optimizing the continuous sampling measurement path for a 3D scanner, comprising:

[0008] Step 1: Collect surface contour data and viewpoint data of the object being scanned. The surface contour data includes multiple surface patches, and the viewpoint data includes multiple viewpoints. The surface patches of the object being scanned correspond one-to-one with the viewpoints.

[0009] Step 2: Construct a weighted graph by treating each viewpoint as a vertex and the path between any two viewpoints as an edge;

[0010] Step 3: Input the weighted graph into the improved ant colony algorithm to optimize the connection order of vertices on the weighted graph, and obtain the measurement path optimization result of the scanned object. The 3D scanner performs the scanning task on the scanned object based on the measurement path optimization result.

[0011] Furthermore, by inputting the weighted graph into the improved ant colony algorithm, the connection order of the vertices on the weighted graph is optimized to obtain the optimized measurement path results for the scanned object, including:

[0012] Initialize the pheromone distribution matrix, heuristic information matrix, number of iterations, and historical best weights, and begin iteration;

[0013] After numbering all ants, randomly place them on any vertex of the weighted graph, and initialize the path record, the number of vertices visited, and the set of vertex indices that have not been visited for each ant;

[0014] All ants randomly select the next vertex according to an equal probability distribution or a probability distribution determined by heuristic information, until all vertices in the weighted graph have been traversed.

[0015] Calculate the weight of each ant on its path and update the historical best weights based on the weights.

[0016] Calculate the weight ranking and pheromone increment matrix for each ant;

[0017] The heuristic information matrix is ​​updated based on the weight ranking and pheromone increment matrix to obtain the updated heuristic information matrix.

[0018] The process is repeated iteratively based on the updated heuristic information matrix until the number of iterations is too high or the weights do not improve after a certain exponential number of iterations. Then, the path corresponding to the optimal weight is taken as the measurement path optimization result of the scanned object.

[0019] Furthermore, calculating the weight each ant receives on its path includes:

[0020] The path between any two adjacent vertices for each ant is defined as the edge traversed by each ant, and the edge weight is calculated.

[0021] Calculate the vertex weight of each vertex reached by each ant along the path;

[0022] The total weight of each ant on the path it traverses is calculated based on edge weights and vertex weights.

[0023] Furthermore, the expression for calculating edge weights is:

[0024] ;

[0025] in, Represents edge weight, Represents vertices With vertex The edge between, Represents vertices To the top The process of movement, Indicates the path length. This represents the maximum motion cost that can be generated by any combination of two vertices.

[0026] Furthermore, the expression for calculating vertex weights is:

[0027] ;

[0028] in, Represents vertices The weight, Indicates entering and leaving the vertex. The trajectory and These represent the scanner's execution trajectory. Then the serial number is Surface segmentation Measurement accuracy and measurement coverage, This indicates the preset minimum measurement coverage.

[0029] Furthermore, the total weight that each ant receives on the path it traverses is:

[0030] ;

[0031] in, Indicates the path traversed The total weight obtained above, This represents the percentage of the cost of exercise. This indicates the percentage of the measurement effect.

[0032] Furthermore, the expression for updating the heuristic information matrix is:

[0033] ;

[0034] ;

[0035] ;

[0036] in, This represents the updated two-dimensional heuristic information matrix. This represents the updated three-dimensional heuristic information matrix. Indicates when the scanner is located At that time, leading to The amount of heuristic information along the path, Indicates when the scanner is from arrive Afterwards, leading to The amount of heuristic information along the path, Indicates the number of vertices. Indicates the probability of achieving coverage targets. Indicates from vertex To the top The path leads to the apex. The increase in pheromone concentration along the path.

[0037] The present invention also provides a continuous sampling measurement path optimization device for a 3D scanner, comprising:

[0038] The acquisition module is used to acquire surface contour data and viewpoint data of the scanned object. The surface contour data includes multiple surface patches, and the viewpoint data includes multiple viewpoints. The surface patches of the scanned object correspond one-to-one with the viewpoints.

[0039] The building module is used to construct a weighted graph, with each viewpoint as a vertex and the path between any two viewpoints as an edge.

[0040] The optimization module is used to input the weighted graph into the improved ant colony algorithm to optimize the connection order of vertices on the weighted graph, thereby obtaining the measurement path optimization result of the scanned object. The 3D scanner performs the scanning task on the scanned object based on the measurement path optimization result.

[0041] The present invention also provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a continuous sampling measurement path optimization method for a 3D scanner.

[0042] The present invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a continuous sampling measurement path optimization method for a 3D scanner.

[0043] The above-described solution of the present invention has the following beneficial effects:

[0044] This invention collects surface contour data and viewpoint data of the object being scanned; constructs a weighted graph by treating each viewpoint as a vertex and the path between every two viewpoints as an edge; inputs the weighted graph into an improved ant colony algorithm to optimize the connection order of the vertices on the weighted graph, and obtains the optimized measurement path result of the object being scanned. The 3D scanner performs the scanning task on the object being scanned based on the optimized measurement path result. Compared with the prior art, this invention improves the practicality and reliability of the measurement path.

[0045] Other beneficial effects of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0046] Figure 1 This is a flowchart illustrating an embodiment of the present invention;

[0047] Figure 2 This is a flowchart of the improved ant colony algorithm in an embodiment of the present invention;

[0048] Figure 3 This is a schematic diagram of the continuous sampling measurement path optimization device in an embodiment of the present invention;

[0049] Figure 4 This is a schematic diagram of the structure of the terminal device in an embodiment of the present invention. Detailed Implementation

[0050] To make the technical problems, solutions, and advantages of this invention clearer, a detailed description will be provided below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0051] In the description of this invention, it should be noted that the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0052] Furthermore, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0053] This invention addresses existing problems by providing a method and related equipment for optimizing continuous sampling measurement paths for 3D scanners.

[0054] like Figure 1 As shown, an embodiment of the present invention provides a method for optimizing a continuous sampling measurement path for a 3D scanner, comprising:

[0055] Step 1: Collect surface contour data and viewpoint data of the object being scanned. The surface contour data includes multiple surface patches, and the viewpoint data includes multiple viewpoints. The surface patches of the object being scanned correspond one-to-one with the viewpoints.

[0056] Step 2: Construct a weighted graph by treating each viewpoint as a vertex and the path between any two viewpoints as an edge;

[0057] Step 3: Input the weighted graph into the improved ant colony algorithm to optimize the connection order of vertices on the weighted graph, and obtain the measurement path optimization result of the scanned object. The 3D scanner performs the scanning task on the scanned object based on the measurement path optimization result.

[0058] In this embodiment of the invention, the surface contour data of the scanned object is represented by a surface point set. express, Represents a point in space. It is a surface point coordinates, subscript The index of the vertex; each surface piece They are all surface point sets A subset of all surface pieces The union of the subscripts covers all surfaces on the target that need to be measured. Represents the sequence number of the surface patch, each surface patch Corresponding to a viewpoint viewpoint Indicates surface segmentation The location of the scanner used for measurement. These are the scanner's position coordinates. It is the Euler angle of the scanner's orientation, from all viewpoints. Composition of viewpoint data .

[0059] Specifically, weighted graph Depend on and constitute, It is the set of vertices of a graph, the vertex... represent viewpoint , and One-to-one correspondence; Describes the edge set of a weighted graph, where each edge... Representative from viewpoint To viewpoint The process of movement.

[0060] Specifically, the weighted graph is input into the improved ant colony algorithm to optimize the connection order of vertices in the weighted graph, resulting in the optimized measurement path of the scanned object, including:

[0061] Initialize the pheromone distribution matrix, heuristic information matrix, number of iterations, and historical best weights, and begin iteration;

[0062] After numbering all ants, randomly place them on any vertex of the weighted graph, and initialize the path record, the number of vertices visited, and the set of vertex indices that have not been visited for each ant;

[0063] All ants randomly select the next vertex according to an equal probability distribution or a probability distribution determined by heuristic information, until all vertices in the weighted graph have been traversed.

[0064] Calculate the weight of each ant on its path and update the historical best weights based on the weights.

[0065] Calculate the weight ranking and pheromone increment matrix for each ant;

[0066] The heuristic information matrix is ​​updated based on the weight ranking and pheromone increment matrix to obtain the updated heuristic information matrix.

[0067] The above iterative process is repeated based on the updated heuristic information matrix until the number of iterations is too high or the weights do not improve after a certain exponential number of iterations. Then, the path corresponding to the optimal weight is taken as the measurement path optimization result of the scanned object.

[0068] In embodiments of the present invention, such as Figure 2 As shown, the specific process of the improved ant colony algorithm is as follows:

[0069] Step 3.1 Initialize the pheromone distribution matrix For shape A matrix of all 1s Indicates the number of viewpoints. Indicates from arrive Afterwards, leading to Pheromones concentration along the path, heuristic information matrix , Number of iterations Historical optimal weights ;

[0070] Step 3.2 Then iterate:

[0071] Step 3.2.1 will An ant is randomly placed at any vertex. ,Record This indicates the vertex number where the ant is currently located. All ants are numbered, with the number being... Ants are represented as Create a path record for each ant. ,in ~ This is the first to the second ant. The vertices that have been visited will Assigned value To record the first randomly placed vertex, ~ Initialize to 0, indicating the number of vertices already initialized. The set of vertex indices that each ant has not visited is 1. , Include The index of unvisited vertices, because Placed Therefore from Delete ;

[0072] Step 3.2.2 Repeat the following steps, after each iteration... Increase by 1, Increase from 2 to Then the loop ends, and in each iteration, all ants move to the next vertex;

[0073] Repeat the following steps, after each iteration Increase by 1, Increase from 1 to The loop ends after each iteration, allowing one ant to move to the next vertex.

[0074] The system randomly selects a Boolean value. or ;

[0075] if for ,Do: Randomly go to An untouched peak ;

[0076] if for ,Do:

[0077] if That is, when the ant is at the first vertex and about to move to the second vertex... Go to Uncharted Peak The probability is Since the ant does not have a "previous vertex", it is handled specially and uses a separate heuristic information matrix. ;

[0078] if That is, when the ant moves to the third to the last vertex, Go to Uncharted Peak The probability is ;

[0079] The above two probabilities are represented as follows: The probability of reaching a previously unvisited vertex is equal to the heuristic information of that vertex across all previously unvisited vertices (i.e., ...). The proportion of the sum of heuristic information of the vertices in the equation.

[0080] Perform the following steps to record The summit to be reached :Will Assign to in , and then from Delete , meaning when Choose to go The vertex index needs to be changed from from Unpassed vertex set Move out, move in Path records In this context, moving out is implemented by deletion, and moving in is implemented by assignment overwriting.

[0081] It should be noted that in step 3.2.2, for The current vertex number. for The previous vertex index, and from Search in the middle, that is The Middle The element and the first One element; for The index of the next possible vertex to go to is undecided and needs to be traversed. The possible vertices that can be reached are recorded in the data.

[0082] Step 3.2.3 Calculate the number of each ant Record of the path it took The total weight obtained above :

[0083] Each path from arrive This represents the ants passing through the edge. Obtain edge weights ; Each of them This represents the ant reaching the top. Obtain vertex weights ; Calculate the total weight based on edge weights and vertex weights ;

[0084] Step 3.2.4 If the weights of the optimal path generated in this iteration Less than Then Assign to ;

[0085] Step 3.2.5 If In recent No decrease in the next iteration, or If the condition is met, the iteration terminates; otherwise, the iteration continues.

[0086] Step 3.2.6 Calculate the weight ranking of each ant. ;

[0087] Step 3.2.7 Calculate the shape as follows Pheromones increment matrix , From arrive Afterwards, leading to Increment in pheromone concentration along the path:

[0088] If a certain ant The first path is arrive ,but Increase Since the first path segment does not have a previously visited vertex, therefore... Take all values ​​(i.e.) )of All increase pheromones;

[0089] If a certain ant The path from the second to the last paragraph is from arrive Then, walk towards ,but Increase ;

[0090] Step 3.2.8 will Assign to , ;

[0091] Step 3.2.9 Update the heuristic information matrix and set the iteration count. Updated to ;

[0092] Step 3.3 generates of The corresponding vertices are traversed in order as follows: , This is the optimal scan path output.

[0093] Specifically, the total weight of each ant on its path is calculated, including:

[0094] Define the path traversed by each ant from vertex to vertex as an edge traversed by each ant, and calculate the edge weight. ;

[0095] Calculate the vertex weight of each vertex reached by each ant along the path. ;

[0096] Based on edge weight and vertex weight Calculate the total weight each ant receives along the path it traverses. .

[0097] Specifically, the expression for calculating edge weights is:

[0098] ;

[0099] in, Represents edge weight, Represents vertices With vertex The edge between, Represents vertices To the top The process of movement, Indicates the path length. This represents the maximum motion cost that can be generated by any combination of two vertices.

[0100] Specifically, the expression for calculating vertex weights is:

[0101] ;

[0102] in, Represents vertices The weight, Indicates measurement accuracy. and These represent the scanner's execution trajectory. Then the serial number is Surface segmentation Measurement accuracy and measurement coverage are defined. Used for characterization execution back The accuracy of the measurement results Indicates the measurement coverage. Indicates entering and leaving the vertex. The trajectory, for The starting point in Only includes ants leaving trajectory The end point in the middle, Only includes ants entering The trajectory This represents the preset minimum measurement coverage, defining the measurement coverage. To execute back The proportion of the area measured in the middle.

[0103] In this embodiment of the invention, vertex weights are affected by measurement accuracy. and measurement coverage Combined effects. Measurement accuracy. and measurement coverage The measurement accuracy is a function determined by the performance and characteristics of the actual 3D scanner used, provided by the manufacturer. It should reflect the accuracy of the scanner's measurement results on a surface after performing a certain scanning action; the higher the accuracy, the better. The higher the value, the better the coverage measurement. It should reflect the completeness of the measurement results of a surface slice by a 3D scanner after performing a certain scanning action; the more complete the result, the better. The higher the value, the better.

[0104] Specifically, the total weight that each ant receives on the path it traverses is:

[0105] ;

[0106] in, Indicates the path traversed The total weight obtained above, This represents the percentage of the cost of exercise. This indicates the percentage of the measurement effect. .

[0107] Specifically, the heuristic information matrix is ​​represented as and ,in Used to guide the selection of the second vertex. The value of the heuristic information matrix, used to guide the selection of subsequent vertices, is related to the measurement accuracy. and measurement coverage It shows a positive correlation with pheromone concentration and path length. The expression for updating the heuristic information matrix is ​​as follows: (The heuristic information matrix is ​​negatively correlated.)

[0108] ;

[0109] ;

[0110] ;

[0111] in, This represents the updated two-dimensional heuristic information matrix. This represents the updated three-dimensional heuristic information matrix. Indicates when the scanner is located At that time, leading to The amount of heuristic information along the path, Indicates when the scanner is from arrive Afterwards, leading to The amount of heuristic information along the path, Indicates the number of vertices. Indicates the probability of achieving coverage targets. Represents vertices To the top The process of movement, Indicates from vertex To the top The path leads to the apex. The increase in pheromone concentration along the path.

[0112] In the measurement path planning for an example scanned object, the motion cost and measurement coverage of the measurement path obtained using the method provided in the embodiments of the present invention and existing methods are shown in Table 1 below:

[0113] Table 1. Motion cost and measurement coverage of the measurement path

[0114] ;

[0115] As can be seen from Table 1 above, compared with existing methods, the embodiments of the present invention can improve the measurement coverage from 70%~90% to near-complete coverage. However, since the embodiments of the present invention add constraints on the measurement coverage and exclude some shorter but harmful measurement paths, the motion cost generated by the embodiments of the present invention is increased.

[0116] This invention collects surface contour data and viewpoint data of the object being scanned; constructs a weighted graph by treating each viewpoint as a vertex and the path between every two viewpoints as an edge; inputs the weighted graph into an improved ant colony algorithm to optimize the connection order of the vertices on the weighted graph, obtaining the optimized measurement path result for the object being scanned; and the 3D scanner performs the scanning task on the object based on the optimized measurement path result. Compared with the prior art, this invention adds vertex weights that reflect measurement coverage and measurement quality to the total weight, encouraging the ant colony to find a viewpoint connection order that satisfies the measurement coverage constraint and has better motion cost and measurement quality, avoiding the damage to measurement coverage and measurement quality caused by the prior art's pursuit of only the shortest path. It also defines a three-dimensional pheromone matrix and a heuristic information matrix, which, compared with the two-dimensional matrix of the prior art, can reflect the characteristics of measurement coverage and measurement quality related to historical paths, providing the ant colony with path selection guidance information related to historical paths, accelerating the ant colony's convergence to the optimal viewpoint connection order, improving the coverage and measurement quality of the measurement path, ensuring that all parts of the object to be measured are measured without omission and with high quality, and guaranteeing the practicality and reliability of the measurement path.

[0117] Corresponding to the continuous sampling measurement path optimization method for 3D scanners described in the above embodiments, such as Figure 3 As shown, this embodiment of the invention also provides a continuous sampling measurement path optimization device 100 for a 3D scanner, the continuous sampling measurement path optimization device 100 comprising:

[0118] The acquisition module 101 is used to acquire surface contour data and viewpoint data of the scanned object. The surface contour data includes multiple surface patches, and the viewpoint data includes multiple viewpoints. The surface patches of the scanned object correspond one-to-one with the viewpoints.

[0119] Module 102 is used to construct a weighted graph by using each viewpoint as a vertex and the path between every two viewpoints as an edge.

[0120] The optimization module 103 is used to input the weighted graph into the improved ant colony algorithm to optimize the connection order of vertices on the weighted graph, thereby obtaining the measurement path optimization result of the scanned object. The 3D scanner performs the scanning task on the scanned object based on the measurement path optimization result.

[0121] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0122] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0123] This invention also provides a terminal device, such as... Figure 4 As shown, the terminal device D10 of this embodiment includes: at least one processor D100 ( Figure 4 The diagram shows only one processor, a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100. When the processor D100 executes the computer program D102, it implements the above-described continuous sampling measurement path optimization method for a 3D scanner.

[0124] The terminal device D10 can be a desktop computer, laptop, handheld computer, server, server cluster, or cloud server, etc. This terminal device may include, but is not limited to, a processor D100 and a memory D101. Those skilled in the art will understand that... Figure 4This is merely an example of terminal device D10 and does not constitute a limitation on terminal device D10. It may include more or fewer components than shown in the figure, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0125] The processor D100 can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0126] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may be an external storage device of the terminal device D10, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal device D10. Furthermore, the memory D101 may include both internal and external storage units of the terminal device D10. The memory D101 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory D101 can also be used to temporarily store data that has been output or will be output.

[0127] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0128] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0129] This invention also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements a continuous sampling measurement path optimization method for a 3D scanner.

[0130] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a building device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks.

[0131] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for optimizing continuous sampling measurement paths for a 3D scanner, characterized in that, include: Step 1: Collect surface contour data and viewpoint data of the scanned object. The surface contour data includes multiple surface patches, and the viewpoint data includes multiple viewpoints. The surface patches of the scanned object correspond one-to-one with the viewpoints. Step 2: Construct a weighted graph by treating each viewpoint as a vertex and the path between any two viewpoints as an edge; Step 3: Input the weighted graph into the improved ant colony algorithm to optimize the connection order of vertices on the weighted graph, and obtain the measurement path optimization result of the scanned object. The 3D scanner performs the scanning task on the scanned object based on the measurement path optimization result. The step of inputting the weighted graph into the improved ant colony algorithm to optimize the connection order of vertices on the weighted graph and obtaining the measurement path optimization result of the scanned object includes: Initialize the pheromone distribution matrix, heuristic information matrix, number of iterations, and historical best weights, and begin iteration; After numbering all ants, randomly place them on any vertex of the weighted graph, and initialize the path record, the number of vertices visited, and the set of vertex indices not visited for each ant; All ants randomly select the next vertex according to an equal probability distribution or a probability distribution determined by heuristic information, until all vertices in the weighted graph have been traversed; Calculate the weight of each ant on its path, and update the historical best weight based on the weight; Calculate the weight ranking and pheromone increment matrix for each ant; The heuristic information matrix is ​​updated based on the weight ranking and the pheromone increment matrix to obtain the updated heuristic information matrix. The process is repeated iteratively based on the updated heuristic information matrix until the number of iterations is too high or the weights do not improve after a certain exponential number of iterations. The path corresponding to the optimal weight is then taken as the measurement path optimization result of the scanned object. The step of calculating the weight of each ant on its path includes: The path between any two adjacent vertices for each ant is defined as the edge traversed by each ant, and the edge weight is calculated. Calculate the vertex weight of each vertex reached by each ant along the path; The total weight obtained by each ant on the path it traverses is calculated based on the edge weights and vertex weights.

2. The method for optimizing continuous sampling measurement path for a 3D scanner according to claim 1, characterized in that, The expression for calculating the edge weight is: ; in, Represents edge weight, Represents vertices With vertex The edge between, Represents vertices To the top The process of movement, Indicates the path length. This represents the maximum motion cost that can be generated by any combination of two vertices.

3. The method for optimizing continuous sampling measurement path for a 3D scanner according to claim 2, characterized in that, The expression for calculating the vertex weight is: ; in, Represents vertices The weight, Indicates entering and leaving the vertex. The trajectory and These represent the scanner's execution trajectory. Then the serial number is Surface segmentation Measurement accuracy and measurement coverage, This indicates the preset minimum measurement coverage.

4. The method for optimizing continuous sampling measurement path for a 3D scanner according to claim 3, characterized in that, The total weight that each ant receives on the path it traverses is: ; in, Indicates the path traversed The total weight obtained above, This represents the percentage of the cost of exercise. This indicates the percentage of the measurement effect.

5. The method for optimizing continuous sampling measurement path for a 3D scanner according to claim 4, characterized in that, The expression for updating the heuristic information matrix is: ; ; ; in, This represents the updated two-dimensional heuristic information matrix. This represents the updated three-dimensional heuristic information matrix. Indicates when the scanner is located At that time, leading to The amount of heuristic information along the path, Indicates when the scanner is from arrive Afterwards, leading to The amount of heuristic information along the path, Indicates the number of vertices. Indicates the probability of achieving coverage targets. Indicates from vertex To the top The path leads to the apex. The increase in pheromone concentration along the path.

6. A continuous sampling measurement path optimization device for a 3D scanner, used to execute the continuous sampling measurement path optimization method for a 3D scanner as described in claim 1, characterized in that, include: The acquisition module is used to acquire surface contour data and viewpoint data of the scanned object. The surface contour data includes multiple surface patches, and the viewpoint data includes multiple viewpoints. The surface patches of the scanned object correspond one-to-one with the viewpoints. The building module is used to construct a weighted graph, with each viewpoint as a vertex and the path between any two viewpoints as an edge. The optimization module is used to input the weighted graph into the improved ant colony algorithm to optimize the connection order of vertices on the weighted graph, thereby obtaining the measurement path optimization result of the scanned object. The 3D scanner performs a scanning task on the scanned object based on the measurement path optimization result.

7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the continuous sampling measurement path optimization method for a 3D scanner as described in any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the continuous sampling measurement path optimization method for a 3D scanner as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Multi-operation plant protection unmanned aerial vehicle path planning method based on improved ant colony algorithm

    CN113703488A

  • Three-dimensional measurement robot scanning trajectory optimization method based on feature guidance

    CN114707253A