## 3 Proposed Algorithmic Procedure  
### Dimension Measurement Principle  
We model boxes as parallelepipeds in the present work, although real boxes may present some bent edges, missing corners, and asymmetries. The dimension of a box can be computed from the 3D coordinates of these key points (Dot V\({}_{1}\), V\({}_{2}\), V\({}_{3}\), V\({}_{4}\), D\({}_{1}\), D\({}_{2}\), D\({}_{3}\), D\({}_{4}\) and O, as shown in Figure 6b) on the silhouette edges of the captured two laser-box images. Thus, before the dimension of the measured box can be obtained, the box silhouettes (Section 3.3.1) and the 2D coordinates of these key points (Section 3.3.2) should be extracted. The camera and the cross-line laser are used to acquire laser-box images of the measured box, forming a cross-line laser strip line embedding the profile structured edge information of the box face, as shown in Figure 6b. If the parameter equation of the laser plane and the camera (in Section 3.2) is known, the equations of the box face can be computed by intersecting the image rays with the laser planes. Thus, the 3D coordinates of the key points can also be obtained easily. Figure 5: Workflow of the developed measurement system. Figure 6: (**a**) Perspective projection model of the visual sensor and (**b**) key points in the image. Here, we define the camera coordinate system as the fiducial coordinate system. The equation of the laser light planes that describe the location of the laser planes in the camera coordinate system is assumed as follows:  
\[\left\{ \begin{array}{l}\mathrm{a_{1}x_{c}+b_{1}y_{c}+c_{1}z_{c}+1=0}\\ \mathrm{a_{2}x_{c}+b_{2}y_{c}+c_{2}z_{c}+1=0}\end{array} \right. \tag{1}\]  
where \(\mathrm{a_{i}}\), \(\mathrm{b_{i}}\), and \(\mathrm{c_{i}}\), (\(\mathrm{i=1,2}\)) are the coefficients of the two laser planes in our system. Therefore, a camera is modeled via the usual pinhole model to describe the projection relation between the 3D object space and the 2D image [23]. Thus, as shown in Figure 6a, four coordinate systems are established. These systems include the image pixel coordinate system (unit: pixel), the image physical coordinate system (unit: mm), the camera coordinate system (unit: mm), and the world coordinate system (unit: mm). The relationship between a 3D point P(\(\mathrm{X_{w}}\),\(\mathrm{Y_{w}}\),\(Z_{w}\)) and its image projection P(u,v) is given by:  
\[\mathrm{s}\left[ \begin{array}{c}\mathrm{u}\\ \mathrm{v}\\ 1\end{array} \right]=\mathrm{A[R,t]}\left[ \begin{array}{c}\mathrm{X_{w}}\\ \mathrm{Y_{w}}\\ \mathrm{Z_{w}}\\ 1\end{array} \right]\mathrm{with~{}A=}\left[ \begin{array}{ccc}\alpha&0& \mathrm{u_{0}}\\ 0&\beta&\mathrm{v_{0}}\\ 0&0&1\end{array} \right] \tag{2}\]  
where s is an arbitrary scale factor, (R, t), called the extrinsic parameters, are the rotation matrix and translation vector, respectively, which relate the camera coordinate system to the world coordinate system, A is the camera intrinsic matrix, and (u\({}_{0}\),v\({}_{0}\)) is the principal point in the image pixel coordinate system. \(\alpha\) and \(\beta\) are the scale factors in image u and v axes, and \(\gamma\) is the parameter describing the skew of the two image axes. Equation (3) represents the transformation relationship of the point P between the camera coordinate system (\(\mathrm{X_{c}}\),\(\mathrm{Y_{c}}\),\(Z_{\mathrm{c}}\)) and the image pixel coordinate system (u,v):  
\[\left[ \begin{array}{c}\mathrm{u}\\ \mathrm{v}\\ 1\end{array} \right]=\mathrm{A}\left[ \begin{array}{c}\mathrm{X_{c}}/Z_{ \mathrm{c}}\\ \mathrm{Y_{c}}/Z_{\mathrm{c}}\\ 1\end{array}