# Design and Validation of a Camera-Based Safety System for Fenceless Robotic Work Cells
## 3 Design of the Image-Based Safety System
### Image Characterization of the Camera(s) at Optimal and Nonoptimal Locations  
Before the validation experiments of the proposed design, the solution of the optimization problem needs to be verified. The leftmost image in Figure 11 shows the area scanned by a camera at optimal placement. The two images in the upper right show the red areas that occur with the positive and negative change of the camera orientation angle. The two images in the lower right show the red areas with the positive and negative variation of the camera height. As can be seen from the figure, there is a difference between the blue area to be scanned and the red areas formed as a result of the changes. To express this difference technically, an artificial intelligence algorithm is designed to give the similarity between the reference image and the altered images.  
Eight different image classes were generated based on images taken from modified (increased and decreased) nonoptimal camera heights and orientation angles. About 500 images were taken from each of these 8 classes. These images were used to train the ResNet-152 deep  
layers increases and the prediction accuracy increases, the optimization becomes more comfortable, and the disappearing gradient problem is solved. Therefore, this architecture is preferred for the comparison of the reference image with the trained algorithm. The aim here is to provide more realistic results by including the noisy images affected by vibration, light flashes, and pollution in the industrial environment instead of comparing a taken optimally placed camera image. Thus, it has been demonstrated that the optimal solution is the most accurate solution that completely covers the robotic work cell. The ResNet architecture provides a deeper link-hopping network added to the feed-forward network layers. Therefore, shortcut links and properties are learned by adding x (input value) to F(x) instead of learning directly from F(x) [30]. With the block approach, the output is not given directly to the block; instead, x + F(x) from the ReLu operation is feedback. The working principle of the classification and comparison algorithm is shown in Figure 12.  
Finally, the trained datasets in eight related classes were compared with the visuals taken at the optimal setup. As a result of this comparison, the difference between the images taken from the cameras placed at the optimal parameters is expressed as a percentage. These eight classes and differences are shown in Tables 1 and 2.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Camera Height Difference** & **Percentage of Similarity to Optimal Placed Camera Image** \\ \hline \(10\%\) Decreased & 58\% \\ \(5\%\) Decreased & 60\% \\ \(5\%\) Increased & 55\% \\ \(10\%\) Increased & 41\% \\ \hline \hline \end{tabular}
\end{table}
Table 1: Percentage of similarity between the images from the optimally placed camera with the image from the changed camera height.  
Figure 12: Flowchart of the deep learning algorithm.  
Table 1 shows that the deviation from the optimal image increases depending on the deviation of camera height. Table 2 shows that the difference from the optimal image increases depending on the increase and decrease in the camera placement angle. The referenced image is the one that excludes unwanted areas where the robot arm is visible, scanning all safety zones. Therefore, the increase in the difference to this reference means that the unwanted regions cannot be scanned, and the desired regions cannot be scanned partially. In comparing nonoptimal parameters using deep learning algorithms, the accuracy of the parameters obtained with the fundamental optimization methods was proven.