## 3 Materials and Methods
In this respect, after applying the camera calibration described by the translation vector \(t_{cam}\), the rotation matrix \(R_{cam}\) (Equations (1) and (2)) and the pixel to mm ratio of 7.942, which transform the position from the camera coordinates to the workobject coordinates, as illustrated in Figure 5, the vision system offers information in mm about the location of the recognized handled object in the learned workobject. This information is used to perform the handling of the object. \[t_{cam}=\left[ \begin{array}{cc}104\\ 67\end{array} \right],\qquad R_{cam}=\left[ \begin{array}{cc}0.9996845&-0.0251 177\\ 0.0251177&0.9996845\end{array} \right] \tag{1}\]  
\[\left[ \begin{array}{cc}Y_{Wobj}\\ X_{Wobj}\end{array} \right]=R_{cam}*\left(\left[ \begin{array}{cc}X_{Cam}\\ Y_{Cam}\end{array} \right]-t_{cam}\right) \tag{2}\]  
The workobject is defined by the translation vector \(t\) and the rotation quaternions \(q\), as seen in Equation (3). The transformation matrix \(T\) is computed as Equation (4) and can be used to transform a point from the vision plane to the robot plane as shown in Equation (5), where \(p_{v}\) is the point in the vision plane, and \(p_{r}\) is the point in the robot plane. The inverse operation can be performed as in Equation (6) using the inverse of the transformation matrix \(T^{-1}\), as seen in Equation (7). Figure 5: Transforming from camera coordinates to workpiece coordinates. \[t=\left[ \begin{array}{c}511.899\\ 346.439\\ 158.981\end{array} \right],\ \ \ \ \ \ q=\left[ \begin{array}{c}0.0036446\\ 0.999819\\ 0.0160233\\ -0.00954639\end{array} \right] \tag{3}\]  
\[T=\left[ \begin{array}{ccc}0.99930263&0.03211039&-0.01897253&511.899\\ 0.03197121&-0.99945994&-0.00759381&346.439\\ -0.01920612&0.00698195&-0.99979117&158.981\\ 0&0&0&1\end{array} \right] \tag{4}\]  
\[\left[ \begin{array}{c}p_{r}\\ 1\end{array} \right]=T\times\left[ \begin{array}{c}p_{v}\\ 1\end{array} \right] \tag{5}\]  
\[\left[ \begin{array}{c}p_{v}\\ 1\end{array} \right]=T^{-1}\times\left[ \begin{array}{c}p_{r}\\ 1\end{array} \right] \tag{6}\]  
\[T^{-1}=\left[ \begin{array}{ccc}0.9993058&0.0319712&0.0192061&511.566\\ 0.0321104&-0.9994599&0.0069819&328.704\\ -0.0189725&-0.0075938&0.9997911&171.2906\\ 0&0&0&1\end{array} \right] \tag{7}\]  
The experiments consist of evaluating robot-vision accuracy through both methods, Microsoft Azure Custom Vision and MVTec Merlic, and then comparing the results to see how the cloud service performs against industrial solutions. A robot trajectory, which uses 12 points on the vision plane, was implemented. The robot put the test target (which can be one of the five objects) on the vision plane and the coordinates were stored. The target was left on the vision plane, and its position was computed using the vision system. The image processing time was also measured at the consumer side, from the time a command was issued to the moment the result was received (i.e., from the time the image was sent to the cloud to the moment the results were received). For each object, 12 experiments were performed, under different illuminations, first in similar conditions to the images used for training, i.e., with natural light and then under artificial light. The difference in lighting can be seen in Figure 6 Comparative results are illustrated in the next section. Figure 6: (**a**) Image taken of the hexagonal object under natural light. (**b**) Image taken of the hexagonal object under artificial light.