# Fiber Orientation Reconstruction from SEM Images of Fiber-Reinforced Composites
## 2 Materials and Methods
### Cylindrical Fitting Method  
The fiber column surface equations are matched to the extracted fiber contour 3D point cloud to obtain the axial information of the fiber. The equations of the fiber column surface are fitted in this article using a coordinate transformation-based cylinder fitting approach from the literature [12]. Rotating and translating a cylinder with an axis parallel to the z-axis may produce any orientation in space. The axis preceding the cylinder's movement is set as the z-axis in the local coordinate system. The conversion from the local coordinate system to Cartesian coordinates may therefore be stated as:  
\[X=X_{0}+RY \tag{2}\]  
where \(X=(x,y,z)^{T}\) is the coordinate of the 3D point in the local coordinate system, and \(Y(x^{\prime},y^{\prime},z^{\prime})^{T}\) is the coordinate of the 3D point in the Cartesian coordinate system. \(X_{0}=(x_{0},y_{0},\)\(z_{0})^{T}\) is the translation vector, and the rotation matrix is \(R=R_{1}(\alpha)R_{2}(\beta)R_{3}(\gamma)\), where \(R_{1}(\alpha)\), \(R_{2}(\beta)\), and \(R_{3}(\gamma)\) denote the rotation matrices with \(\alpha,\)\(\beta,\) and \(\gamma\) angles of rotation about the x, y, and z axes, respectively, as:  
\[\left\{\begin{array}{l}R_{1}(\alpha)=\begin{bmatrix}1&0&0\\ 0&\cos\alpha&-\sin\alpha\\ 0&\sin\alpha&\cos\alpha\end{bmatrix}\\ R_{2}(\beta)=\begin{bmatrix}\cos\beta&0&-\sin\beta\\ 0&1&0\\ 0&\sin\beta&\cos\beta\end{bmatrix}\\ R_{3}(\gamma)=\begin{bmatrix}\cos\gamma&-\sin\gamma&0\\ \sin\gamma&\cos\gamma&0\\ 0&0&1\end{bmatrix}\end{array}\right. \tag{3}\]  
Figure 3: Fiber orientation diagram.  
For a cylinder in the Cartesian coordinate system, Y can be defined as a graph whose distance to the z\({}^{\prime}\) axis is equal to the radius r and whose equation is:  
\[{x^{\prime}}^{2}+{y^{\prime}}^{2}=r^{2} \tag{4}\]  
The basic cylindrical equation is independent of the vertical coordinate. Hence z\({}_{0}\) can be freely selected throughout the translation. Moreover, the angles \(\alpha\), \(\beta\), and \(\gamma\) are related. Assuming \(\gamma=0^{\circ}\), the cylinder in the Cartesian coordinate system may be turned into a cylinder of any orientation by simply rotating around the x and y axes. In this method, the five parameters x\({}_{0}\), y\({}_{0}\), \(\alpha\), \(\beta\), and r may uniquely define a cylinder of any orientation in space.  
Using the distance between the measurement point and the surface of the column in the Cartesian coordinate system as the residual, the error equation may be described as follows:  
\[\mathrm{v_{i}}=\sqrt{{x_{i}^{\prime}}^{2}+{y_{i}^{\prime}}^{2}}-\mathrm{r} \tag{5}\]  
The above equation is expressed in matrix form:  
\[\mathrm{v_{i}}=\sqrt{{Y_{i}^{T}}\begin{bmatrix}1&0&0\\ 0&1&0\\ 0&0&1\end{bmatrix}{Y_{i}}-\mathrm{r}} \tag{6}\]  
R is an orthogonal matrix, which is known from Equation (2):  
\[{Y_{i}}=\mathrm{R}^{-1}({X_{i}}-{X_{0}})=\mathrm{R}^{T}({X_{i}}-{X_{0}}) \tag{7}\]  
Substituting Equation (7) into Equation (6) yields:  
\[\mathrm{v_{i}}=\sqrt{({X_{i}}-{X_{0}})^{T}\begin{bmatrix}1&0&0\\ 0&1&0\\ 0&0&1\end{bmatrix}\mathrm{R}^{T}({X_{i}}-{X_{0}})-\mathrm{r}} \tag{8}\]  
The final problem of fitting to the cylindrical surface is then converted into an optimization problem of determining the sum of squares of the errors of the k measurement sites in the column:  
\[\mathrm{min}\sum_{i=1}^{k}\mathrm{v_{i}^{2}}\big{(}{x_{0}},{y_{0}},\alpha, \beta,\mathrm{r}\big{)} \tag{9}\]  
Given the 3D coordinates of at least 5 points on the surface of the cylinder, the 5 parameters x\({}_{0}\), y\({}_{0}\), \(\alpha\), \(\beta\), and r of the cylinder can be solved using the ordinary least squares (OLS) method.