# Vision-Guided Six-Legged Walking of Little Crabster Using a Kinect Sensor
## 3 Camera-Robot Coordinate Transformation
### Image Post-Processing  
Image post-processing was additionally conducted to enhance the accuracy and reliability of the 3D ground data because the initial 3D ground data obtained from the Tsai algorithm included noise and vertical ground offset between the robot-fixed coordinate frame and the ground. First, the vertical ground offset was experimentally measured when the robot was \begin{table}
\begin{tabular}{c c c c c c c c c c c} \hline \hline \multicolumn{2}{c}{**Camera-Fixed Coord.**} & \multicolumn{3}{c}{**Actual Robot-Fixed Coord.**} & \multicolumn{3}{c}{**Calculated Robot-Fixed Coord.**} & \multicolumn{3}{c}{**Error (mm)**} \\  & **(mm)** & & & **(mm)** & & & **(mm)** & & & **Error (mm)** \\ \hline
**X** & **Y** & **Z** & **X** & **Y** & **Z** & **X** & **Y** & **Z** & **X** & **Y** & **Z** \\ \hline
1168.92 & 211.39 & 455.32 & 1200.00 & 200.00 & 300.00 & 1198.11 & 196.97 & 293.45 & 1.89 & 3.03 & 6.55 \\
1189.03 & \(-\)191.32 & 449.28 & 1200.00 & \(-\)200.00 & 250.00 & 1197.13 & \(-\)205.03 & 255.51 & 2.87 & 5.03 & 5.51 \\
1017.83 & 12.58 & 339.53 & 1000.00 & 0.00 & 300.00 & 1002.41 & 0.93 & 296.39 & 2.41 & 0.93 & 3.61 \\
1343.23 & 11.99 & 567.23 & 1400.00 & 0.00 & 250.00 & 1696.72 & \(-\)4.54 & 252.37 & 3.28 & 4.54 & 2.37 \\
1057.88 & 159.83 & 372.49 & 1068.40 & 141.40 & 300.00 & 1058.62 & 147.33 & 302.04 & 9.98 & 5.93 & 2.06 \\
1304.08 & \(-\)128.39 & 549.29 & 1341.40 & \(-\)141.40 & 250.00 & 1351.31 & \(-\)144.80 & 257.74 & 9.91 & 3.40 & 7.74 \\
1059.32 & \(-\)129.58 & 398.53 & 1068.60 & \(-\)141.40 & 300.00 & 1068.20 & \(-\)143.35 & 306.15 & 0.40 & 1.95 & 6.15 \\
1295.87 & 159.99 & 519.23 & 1341.40 & 141.40 & 250.00 & 1333.96 & 144.92 & 255.03 & 7.44 & 3.52 & 5.03 \\
1262.80 & \(-\)123.11 & 571.88 & 1341.40 & \(-\)141.40 & 300.00 & 1335.42 & \(-\)141.48 & 302.19 & 5.98 & 0.08 & 2.19 \\
1101.85 & 153.52 & 332.01 & 1068.60 & 141.40 & 250.00 & 1064.69 & 143.93 & 242.43 & 3.91 & 2.53 & 7.66 \\
1279.34 & 153.20 & 559.23 & 1341.40 & 141.40 & 300.00 & 1347.76 & 135.80 & 295.60 & 6.36 & 5.60 & 4.40 \\
1106.23 & \(-\)139.76 & 361.39 & 1068.60 & \(-\)141.40 & 250.00 & 1078.57 & \(-\)150.73 & 246.82 & 9.97 & 9.33 & 3.18 \\  & & & & & & & Max & 9.98 & 9.33 & 7.74 \\  & & & & & & & & Avg & 6.28 & 4.51 & 5.10 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Results of coordinate transformation. Figure 6: Final transformation matrix \(T_{C}^{R}\) between robot-fixed coordinate frame and camera-fixed coordinate frame. placed on flat level ground in a walking-ready posture. More specifically, the initial 3D ground data on the flat level ground were captured and saved, and then the 3D ground data with respect to the ground level were obtained by subtracting the initially saved 3D ground data from the measured 3D ground data. Figure 7 provides a comparison of 3D ground data with or without vertical ground offset. Through the processes above, more reliable 3D ground data with respect to ground level were obtained, as shown in Figure 7b. Second, even after the ground offset is eliminated, when the 3D ground data are obtained from a Kinect sensor, noises can occur due to external light sources and irregular reflections, as shown in Figure 8a. In order to remove the noise with a high rate of change and to preserve the object's edges with a low rate of change, filtering of the 3D ground data was performed using a 1 st spatial low-pass filter. As shown in Figure 8c, spatial low-pass filtering in the \(x\) and \(y\) directions is applied sequentially to the obtained image according to Equations (10) and (11). \[H_{(x,y+1)}=H_{(x,y)}+a\Big{(}Z_{(x,y+1)}-H_{(x,y)}\Big{)} \tag{10}\]  
\[H_{(x+1,y)}=H_{(x,y)}+a\Big{(}Z_{(x+1,y)}-H_{(x,y)}\Big{)} \tag{11}\]  
In the equations, \(H\) is the filtered depth, \(Z\) is the original depth, and \(a\) is the smoothing factor. The factor \(a\) was experimentally determined to remove the noises and preserve the object edges. If the smoothing factor is close to 1, the filtering effect becomes minimal.