# Detection of Household Furniture Storage Space in Depth Images
## 4 Evaluation
### Ground Truth Annotation  
Annotation of storage volumes on the depth images of real scenes is one of the contributions made in this paper. The ground truth annotation algorithm provides the center, size, and heading angle of each bounding box. The proposed annotation method requires a 3D triangular mesh of the scene created from a depth image acquired by an RGB-D camera. At least six points in a scene must be selected by the user to define the bounding box of a storage volume. The selected points are defined as follows: the first two points, \(T_{1}\) and \(T_{2}\), must lie on a horizontal edge of the storage volume. This edge is shared by two of six planes defining the storage volume. Each of the remaining points \(T_{3},T_{4},\ldots,T_{6}\) must lie in one of the remaining four planes of the storage space. The first two points, \(T_{1}\) and \(T_{2}\), defined as \(T_{1}=(x_{1},y_{1},z_{1})\) and \(T_{2}=(x_{2},y_{2},z_{2})\), are used to define the \(x\)-axis of the coordinate system of the bounding box, defined by \(x=\dfrac{\overline{T_{1}T_{2}}}{|\overline{T_{1}T_{2}}|}\). We assume that the \(z\)-axis is the vertical axis of the coordinate system of the scene. The orthogonality of the \(x\) and \(z\)-axes is assured by aligning the scene mesh with the vertical axis. Given \(x\) and \(z\)-axes, the \(y\)-axis is defined as \(y=z\times x\). The obtained \(x\), \(y\), and \(z\)-axes define the orientation of the bounding box coordinate system. The sides and edges of the bounding box are aligned with these axes. Rotation matrix \({}^{BB}R_{S}=[x\,y\,z]^{T}\), where \(x\), \(y\), and \(z\) are unit vectors defined above, is a matrix for transforming coordinates of the selected points originally represented in the coordinate system of the scene (S) to the coordinate system of bounding box. Let \(X\), \(Y\), and \(Z\) be the sets of the coordinates of the selected points with respect to the bounding box coordinate system defined as follows: \(X=\{x_{1},x_{2},\ldots,x_{n}\}\), \(Y=\{y_{1},y_{2},\ldots,y_{n}\}\) and \(Z=\{z_{1},z_{2},\ldots,z_{n}\}\), where \(n\) is number of the selected points. Let \(x_{min}\), \(x_{max}\), \(y_{min}\), \(y_{max}\), \(z_{min}\), and \(z_{max}\) be the minimum and maximum values of the sets \(X\), \(Y\), and \(Z\), respectively. The center of the bounding box is defined as  
\[{}^{BB}C=\bigg{(}\dfrac{x_{min}+x_{max}}{2},\dfrac{y_{min}+y_{max}}{2},\dfrac {z_{min}+z_{max}}{2}\bigg{)}. \tag{1}\]  
The center of the bounding box represented with respect to the scene coordinate system is obtained by transforming the bounding box center computed by (1) using the rotation matrix \({}^{S}R_{BB}\). The size of the bounding box, i.e., its length, width, and height, are defined by vector  
\[s=(|x_{max}-x_{min}|,|y_{max}-y_{min}|,|z_{max}-z_{min}|).\]  
The heading angle defining the orientation of the bounding box with respect to the scene coordinate system is defined as the angle \(\alpha\) between the \(x\)-axis of the coordinate system of the scene and the \(x\)-axis of the coordinate system of the bounding box. The final result of the proposed algorithm is a set of bounding boxes, where each bounding box is defined by \({}^{BB}C\), \(s\) and \(\alpha\). Some storage volumes are defined by design of the furniture, such as storage volume inside of the shelf, as shown in Figure 7(b). However, the top of some furniture, such as a cabinet or table, might be used for the disposal of items as well. Hence, the volume on the top of such furniture whose base is defined by its top surface can be considered as a storage volume. An example is given in Figure 7(a). The height of such storage volumes is not defined by the design of the furniture but depends on how much space is between the top of the furniture and the ceiling. Furthermore, in some scenes the top of the furniture is outside of the camera's field of view, so it is not visible in the image. In such cases, we define the heights of such storage volumes as the maximum heights of the items that are to be placed in storage volumes.