# A Vision Servo System for Automated Harvest of Sweet Pepper in Korean Greenhouse Environment
## 3 Results and Discussion
### The Result of Harvest Experiment  
The harvest experiment was carried out in three steps. After completing each step, results were examined \begin{table}
\begin{tabular}{c c c c} \hline
**No.** & **Error x (pixel)** & **Error y (pixel)** & **Control Count** \\ \hline
1 & 0 & 5 & 3 \\
2 & \(-1\) & 7 & 4 \\
3 & \(-1\) & 0 & 4 \\
4 & \(-6\) & 10 & 3 \\
5 & \(-10\) & 5 & 3 \\
6 & 9 & 4 & 3 \\
7 & \(-2\) & 7 & 3 \\
8 & 1 & \(-3\) & 8 \\
9 & 3 & 1 & 3 \\
10 & 6 & 3 & 5 \\
11 & \(-2\) & \(-5\) & 3 \\
12 & \(-5\) & 5 & 3 \\
13 & \(-5\) & 2 & 4 \\
14 & 3 & \(-9\) & 6 \\
15 & \(-3\) & 9 & 6 \\
16 & 4 & 2 & 7 \\
17 & \(-9\) & 1 & 5 \\
18 & \(-2\) & 7 & 3 \\
19 & 2 & 3 & 3 \\
20 & 9 & 1 & 4 \\ Average & \(-0.45\) & 2.75 & 4.15 \\ \hline \end{tabular}
\end{table} 
Table 2: Test results of a sweet pepper’s position controlling. Figure 19: The error of pixels in the image according to the number of repetitive controls that occurs when moving the end-effector to the target point. Figure 20 presents the result of realizing the algorithm to move the position of the end-effector to the center of the harvesting sweet pepper using the rotation axis, and of practicing the algorithm. In order to calculate the real coordinates, the sweet pepper that appeared in the image was checked and then the pulse of the manipulator was inputted by 500 units, thus matching centers and calculating angles using distances. After moving the coordinate of the end-effector based on the algorithm, the pulse measured was presented. The error of angle was 1.2\({}^{\circ}\) in maximum and 0.77\({}^{\circ}\) on average, and standard deviation of errors of angle was 0.2652. The distance-based error was 11.3 mm in maximum and 6.22 mm on average, and standard deviation of distance-based errors was 2.0368. When the error of the X-axis was 11.3 mm, the horizontal length of the end-effector was 120 mm and the average diameter of the sweet pepper was 80.92 mm. Figure 21 presents the result of realizing the algorithm to move the position of the end-effector to the bottom of the harvesting sweet pepper using the vertical axis manipulator, and of practicing the algorithm. The maximal error was 17.1 mm and the average error was 8.205 mm, and standard deviation was 5.5497. The reason why the maximal error was bigger than the horizontal error seems to be derived from the fact that the aspect ratio of the image was small and therefore the number of pixels was relatively small as well. In the process of searching for the position of the sweet pepper and moving the end-effector to the target position, there occurred a maximum 11.3 mm error horizontally, and maximum 17.1 mm error vertically. The error occurred in the detection of sweet pepper and the set-up of the ROI generates the control error, and position was revised by extracting the pose of sweet pepper and by carrying out harvesting works. Figure 20: Field experiment results of sweet pepper’s position extraction algorithm (rotation axis). The results of the experiment to acquire information on the depth from the system to the sweet pepper, namely the second step harvest algorithm, is presented in Figure 22. Z means a real coordinate of distance and signifies a calculated coordinate of distance. The result of executing the algorithm of extracting information on depth presents the fact that the maximal error was 39 mm and the average error was 10.05 mm, and standard deviation was 12.1595. Compared with the result of indoor experiments of which maximal error was 31 mm and average error was 8.44 mm, the errors were bigger. These bigger errors seem to be because the natural light interferes with the laser light source that was used to extract feature points. The process of transferring the end-effector to harvest sweet peppers was examined by classifying it into the thickness, length, and angle of the peduncle, in order to make the end-effector approach to the portion of cutting.