# Construction of Robotics and Application of the Optical-Flow Algorithm in Determining Robot Motions
## 2 Methodology
### Experimental Setup and Process to Determine System Parameters
#### 3.3.2 Application Models for Determining Scaling Factor  
In this subsection, the scaling parameter is determined for application of the other object. The operating space of the recognized objects needs to be within the camera's observation range. In reality, this operating space is quite large. However, the goal is to develop an observation, detection, and recognition system for autonomous robots operating indoors, on streets, or in spaces with limited observation ranges. Therefore, in this study, we limited the research scope to identifying objects operating within 100 m of the observation camera. However, even with such a space, creating a training space as shown in Figure 7a in reality is still very challenging. To overcome this, the authors propose creating a smaller training space and using sample objects similar to the actual objects to be recognized (ensuring proportional scale) during the training process. Figure 7a shows a training space established with dimensions of 720 \(\times\) 480 cm. In the camera's observation area, 77 fixed reference points are pre-established (with these points, we have determined the actual distance d and the actual angular deviation \(\alpha\) to the observation camera). This training space is scaled down relative to the desired observation space in reality (here, the scale is set to 1/10). Accordingly, the authors created and used sample objects with corresponding proportions for recognition. For example, Figure 10 shows three objects to be recognized at distances of up to 100 m from the observation camera: a person (actual height 1.5 m) modeled at 15 cm height, a truck (actual height 2.2 m) modeled at 22 cm height, and a car (actual height 1.1 m) modeled at 11 cm height. These objects will be used in the training process in subsequent steps. The next step is to create a scaling factor \(k_{dt}\) for each object to be recognized based on the relative proportions of the actual objects. For example, to recognize a person with an average height of 1.5 m compared to the standard sample object of 1 m, the scaling factor will be calculated as \(k_{person}=1.5\). The data set, including the two standard distance estimation functions \(d(h)\) and the standard movement angle estimation functions \(\alpha(\Delta x)\), along with the scaling factor \(k_{dt}\) for each object to be recognized relative to the standard object (an object with a height of 1 m), will be incorporated into the program to calculate and determine the position and direction of the object. For the experiment, we selected three sample objects: a truck model (22 cm tall); a person model (15 cm tall); and a car model (11 cm). Using a standard model (10 cm tall) as a  
Figure 10: Correlation between the size of the real object and the training object. reference, we calculated the corresponding correlation coefficients: \(k_{truck}=2.2\); \(k_{person}=1.5\); \(k_{car}=1.1\). Thus, we have:  
\[ \begin{split}& d_{truck}(h)=*d(h/k_{truck})=16249\times\left( \frac{h}{22}\right)^{-0.989}\\ & d_{person}(h)=*d(h/k_{person})=16249\times\left(\frac{h}{1.5} \right)^{-0.989}\\ & d_{car}(h)=*d(h/k_{car})=16249\times\left(\frac{h}{1.7}\right)^ {-0.989}\\ &\alpha_{truck}=\alpha_{human}=\alpha_{car}=*\alpha(\Delta x)=0.0 0335\times\Delta x-0.027\end{split}  \tag{9}\]  
Note that the position and velocity can be affected when the geometry of the object is changed, such as tall vs short people. However, this study focuses on fixed tall (standard) objects, currently. Since this study focuses on the development of the algorithm and robot design, we did not change the height of the object. Additionally, only a different model height was considered for the test, and the results can  
With this promising result, the approach is well-suited for target tracking tasks in indoor and urban environments for autonomous robots. Therefore, Equation (9) can be effectively used with the estimated function of the object model, which is established based on the scale factor of the target object for calculation, localization, and trajectory planning.