# Research on an Optimal Path Planning Method Based on A* Algorithm for Multi-View Recognition
## 3 Optimal Path Planning for Multi-View Recognition Based on the A\({}^{*}\) Algorithm  
### Geometric Model for Target Observation  
To search for the best path for accurate identification of multi-view targets, a geometry model for target observation is first built. Then, the best path search problem is transformed into a solving optimization problem.  
Within the working space of the robot arm, the observation geometry model is constructed as large as possible to obtain a better observation path. For meeting the requirements, an outer envelope sphere of the target is constructed. The radius range of the observation model is 3-5 times the radius of the outer envelope sphere. The hemispherical ring observation model shown in Figure 2 is constructed based on the target center position. The minimum and maximum observation circle radii of the observation area boundary are R\({}_{\text{min}}\) and R\({}_{\text{max}}\), respectively. Suppose that the target centroid is located at the origin of coordinates \(O\)(0,0,0) and R is the distance of the camera viewpoint from the coordinate origin, that is, arc radius of perspective. Due to the specificity of the target observation model, a spherical coordinate system is used for position representation. Then, the viewpoint imaging coordinates of point P are denoted as P (R, \(\lambda\), \(\theta\),), \(\lambda\) is the angle between the positive direction of z-axis and the directed line segment OP, \(0\leq\lambda\leq\pi/2\), and \(\theta\) (\(0\leq\theta\leq 2\pi\)) is the angle between the positive direction of the x-axis and the projection of the directed line segment \(OP\) on the \(xOy\) plane. The right-angle coordinate system is converted as:  
\[\left\{\begin{array}{l}x=R\sin\lambda\cos\theta\\ y=R\sin\lambda\sin\theta\\ z=R\cos\lambda\end{array}\right. \tag{9}\]  
The conversion relation from a right-angle coordinate system to a spherical coordinate system is  
\[\left\{\begin{array}{l}R=\sqrt{x^{2}+y^{2}+z^{2}}\\ \lambda=\arccos\frac{\pi}{x}\\ \theta=\arctan\frac{\pi}{x}\end{array}\right. \tag{10}\]  
The location of the optimal viewpoint is optimized by MHWOA, and the camera observation path passes through a series of imaging points and is planned as a polynomial function for interpolation to form a smooth curve. The camera observation path can be expressed as a sequence of coordinates as:  
Figure 2: Geometric model of hemispherical ring observation.  
\[\mathrm{P}_{c}=\left\{\mathrm{P}_{1}^{\mathrm{z}},\mathrm{Q}_{1},\mathrm{Q}_{2}, \ldots,\mathrm{Q}_{n_{1}},\mathrm{P}_{2}^{\mathrm{z}},\mathrm{Q}_{n_{1}+1}, \mathrm{Q}_{n_{1}+2},\ldots,\mathrm{Q}_{n_{2}},\ldots,\mathrm{P}_{k-1}^{\mathrm{ z}},\mathrm{Q}_{n_{k-2}+1},\ldots,\mathrm{Q}_{n_{k-1}},\mathrm{P}_{k}^{\mathrm{z}}\right\} \tag{11}\]  
where \(\mathrm{P}_{p}^{\mathrm{z}}\) = (\(R\)p, \(\theta\)p, \(\lambda\)p), \(p\) = 1, 2,..., k, are the coordinates of each imaging point, \(\mathrm{Q}_{q}\) = (\(\theta_{q}\), \(\lambda_{q}\), \(R_{q}\)) (\(q\) = 1, 2,..., \(n_{k-1}\)) are coordinates of the interpolation points between each imaging point.  
The coordinate set of obstacles in the observation scene are set as B = (B1,B2,..., BE), where Be = (\(\mathrm{Re}\), \(\lambda\)e, \(\mathrm{Re}\)), (e = 1, 2,..., E) is the position coordinate of the \(e\)th surface obstacle. As one of the important measurement parameters, the influence range of obstacles on the path of manipulator can be expressed as parameter vector \(\beta\) (\(\beta_{1}\), \(\beta_{2}\),..., \(\beta_{\mathrm{E}}\)).  
The observation area is uniformly divided according to the latitude and longitude regions. Assuming that the longitude direction is uniformly divided into M\({}_{lo}\) regions, and the dimensional direction is uniformly divided into M\({}_{la}\) regions, then the observation model is divided into M\({}_{lo}\)\(\times\) M\({}_{la}\) arc cone regions, and at most one imaging point is defined to exist in each arc region.