## 4 Core Algorithm
### Picture Number Estimation Function  
In each iteration of the algorithm, the camera moves to a new node with location \(P^{C}\), and the algorithm evaluates the number of pictures \(N^{C}\) needed at this location. The node \((Node_{index})\) is then set to be explored and saved in a set \(S_{explored}\). Each node that has been explored in iterations is one-on-one paired with the values of the location and picture numbers of that node. All pairs that are expressed as \(Node_{index}^{explored}\): \((P_{index}^{explored},N_{index}^{explored})\) are saved in a hash map \(M_{explored}\). Then, \(M_{explored}\) is used to develop an estimation function that can estimate the number of pictures needed for the rest of the unexplored nodes. The estimated picture number calculated for all nodes in space is denoted as \(S_{N}^{\sim}\). Expressions of any element in \(S_{N}^{\sim}\) are:  
Figure 6: (**a**) The operational space of the camera is an arbitrary closed 3D geometry in the space shown in the plot. The gridded area is in 3D (blue dashed lines). (**b**) Four initial nodes are chosen so that their connection lines (red dashed line) are perpendicular. The picture number of Node 5 can be estimated by Equation (4) from four initial explored nodes. \(\overline{ED}\) represents Euclidean distance (green line).  
For any node index \(x\) in the Total Node Set: \(S_{total}=\{Node_{x}|x\in(1,2,\ldots m)\}\), where \(m\) is the total number of nodes.  
\[\widetilde{N}_{x}=\begin{cases}\sum_{i\in S_{index}-exp}\frac{(\overline{ED} \big{(}P_{i}^{exp},P_{x}\big{)}(-K_{est}))}{(\overline{ED}\big{(}P_{j}^{exp}P_ {x}\big{)}(-K_{est}))}N_{i}^{explored}\\ N_{x}^{explored},\;\;if\;Node_{x}\;\in S_{explored}\end{cases},\;if\;Node_{x} \;\
otin S_{explored} \tag{4}\]  
\[\text{Then}:\;S_{\widetilde{N}}=\;\{\widetilde{N}_{x}\,|x\in(1,2,\ldots m)\,\} \tag{5}\]  
where \(K_{est}\) is a positive constant parameter.  
\[S_{index-exp}=\;\{index\,|Node_{index}\in S_{explored}\,\}, \tag{6}\]  
\[\overline{ED}(P_{a},P_{b})=\sqrt{(P_{ax}-P_{bx})^{2}+(P_{ay}-P_{by})^{2}+(P_{ az}-P_{bz})^{2}},\]  
\[\text{with}\;P_{a},P_{b}\;\text{are 3D locations of}\;Node_{a}\;and\;Node_{b}: \tag{7}\]  
\[P_{a}=\big{(}P_{ax},P_{ay},P_{az}\big{)}\;and\;P_{b}=(P_{bx},P_{by},P_{bz})\]  
Equation (4) is a weighted function concerning each explored node. If one explored node \(Node_{i}^{explored}\) is closer to the node \(Node_{x}^{explored}\), its picture number \(N_{i}^{explored}\) has a larger weight (effect) on the estimation of \(\widetilde{N}_{x}\). Thus, a minus sign of \(K_{est}\) is utilized to indicate the negative correlation between the Euclidean distance and weight.  
Equation (4) shows that at least some initial nodes are required to be explored before their values can be used to estimate the picture numbers in other nodes. For the estimation function to work properly by covering all nodes in the camera operational space, four initial nodes are selected in the following steps:  
1. Find the first two nodes on the boundary of operational space so that the Euclidean distance between these two nodes is the largest;
2. Select the other two nodes whose connection line is perpendicular to the previous connection line, where the Euclidean distance between these two nodes is also the largest among all possible node pairs;
3. Move the camera to these four nodes in space with proper orientation. Take a single image at each location and estimate the number of pictures required at those locations. Save all four nodes in \(S_{explored}\) and their values in \(M_{explored}\).  
Figure 6b shows the selection of four initial nodes in a camera operational space and an example of the use of the estimation function to estimate the picture number in one node.