## 3 The key Technology of the Multi-DOF Automatic Image Acquisition System
### Random Acquisition Path Optimization  
The random distribution of acquisition points in the system space is the premise of simulating actual shooting situations. More specifically, the common shooting angle is generally in a certain range with the top of the object as the center point, and the probability of the occurrence of large-angle tilt is relatively small. Therefore, the random points on the \(x\)- and \(y\)-axes were set to obey normal distribution, and then the coordinates of \(z\)-, \(a\)-, \(b\)-axes were obtained according to the above calculation method of camera space pose. At this time, the coordinate points of the five axes of \(x\), \(y\), \(z\), \(a\), and \(b\) constitute the random acquisition points that obey normal distribution in the system space, as shown in Figure 8.  
After generating random acquisition points, a \"detour\" will occur when the system collects images in the order of generating random points, the acquisition time will be consumed. Therefore, it is necessary to optimize the path of the generated random acquisition points, so that the system can complete image acquisition in a short time. According to the actual acquisition requirements, the camera is required to start from the origin (initial position), then pass through all acquisition points only once. Eventually, it takes the least time to return to the original acquisition point, which is in line with the travelling salesman problem (TSP) proposed by [PERSON] et al. [27]. The algorithm has two path optimization methods: local optimization and global optimization as shown in Figure 9. The advantages and disadvantages of these two algorithms are shown in Table 3. Although the path obtained by the global optimal search method is optimal, its algorithm takes a long time and has high computational complexity, which is not suitable for the case of hundreds or even thousands of points. Therefore, the system adopts the local optimal search method to optimize the acquisition path.  
Comparative experiments before and after path optimization are carried out to evaluate the impact of path optimization algorithm on system acquisition time. The number of acquisition points is set as 5, 10, 15,..., 100 (spacing is 5). Recording the acquisition time of the system before and after the path optimization of the acquisition algorithm. Each point is tested three times to get the average value. The final acquisition time is shown in Figure 10. The search principle of the above TSP path  
Figure 8: Random sampling points with the normal distribution.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**Index** & **Local Optimal** & **Global Optimal** \\ \hline Time-consuming & Less & More \\ Optimal path & No & Yes \\ Algorithm complexity & \(n\) & \(n!\) \\ \hline \hline \end{tabular}
\end{table}
Table 3: Comparison of local optimal algorithm and global optimal algorithm.  
optimization algorithm is the shortest distance between two points. However, when the system uses the optimal path search, the distance between two points in space is not the shortest path of the axis movement. The reason is that under the condition of the same speed of each axis, when the point with the largest distance among the five coordinate points moves, the remaining coordinate points will also complete the movement. Hence, we take the maximum distance max (\(x,y,z,a,b\)) of five coordinate points as the search principle.  
As can be seen from Figure 10, the system acquisition time is increasing with the increase in the number of acquisition points. The path acquisition time before optimization increases significantly. However, the path acquisition time after optimization increases slowly. Meanwhile, it can be seen from Figure 10 that the time consumption of path acquisition before the optimization is about 1.6 times of that after optimization. In conclusion, it is very necessary to optimize the acquisition path when the number of acquisition points is large, the path optimization algorithm adopted in this paper had an obvious effect.