# Concrete Crack Width Measurement Using a Laser Beam and Image Processing Algorithms
## 2 Materials and Methods
### Crack Width Calculation  
The images resulting from the image processing step are then further processed by skeletonization of the crack. Skeletonization is conducted using a method known as medial axis transform, which converts an object shape into a single-pixel-wide representation, thus clearly outlining the crack's topology. The maximum crack width is measured in pixels as the maximum distance from the center of the medial axis to the two edges of the crack on either side of the medial axis, as shown in Figure 4.  
The medial axis is calculated by using the distance transform a technique that assigns to each pixel in the image the minimum distance to the nearest non-zero pixel. The crack width in pixels is converted to millimeters by multiplying it by the conversion factor derived in Equation (5), as shown in Equation (8).  
\[C_{w}\ \left(\mathrm{mm}\right)=Cw_{p}\times\alpha_{c}=Cw_{p}\times\frac{ \varnothing_{real}}{\varnothing_{px}} \tag{8}\]  
where \(C_{w}\) is the crack width in millimeters, \(Cw_{p}\) is the crack width in pixels and \(\alpha_{c}\) is the conversion factor in (mm/pixels).  
Table 2 shows a comparison of the necessary parameters required by different methods to calculate crack width in millimeters. It can be seen that the proposed method only depends on one parameter, which is the distance to the measuring plane. The distance to the measuring plane is unaffected by lens size and zooming, unlike focal length, which is used in other studies. Therefore, this promotes flexibility and higher accuracy as this minimizes accumulative error due to multiple parameters, which may not also be readily known. The proposed method allows the quick use of any available camera device to capture images with cracks.  
\begin{table}
\begin{tabular}{c c c} \hline \hline
**References** & **Method** & **User Parameters** \\ \hline
[6] & \(C\mathrm{W}\left(\mathrm{mm}\right)=\mathit{Pixel width}\times\frac{(L-f) \cdot d}{f\cdot D}\mathit{cos\theta}\) & \([L,f,d,D,\theta]\)1 \\ \hline
[19; 27] & \(W_{r}\left(\mathrm{mm}\right)=D_{p}W_{p}=\frac{10}{D_{w}W_{p}}{L_{f}L_{f}}\) & \([D_{w},P_{c},L_{f}]\)2 \\ \hline
[29] & \(C\mathrm{W}\left(\mathrm{mm}\right)=\left(\frac{L-f}{f}\times\frac{S_{S}}{S_{ k}}\right)\times N_{m}\) & \([L,f,S_{s},S_{R}]\)3 \\ \hline Proposed method in & \(Crack\ width\ \left(\mathrm{mm}\right)=Cw_{p}\times\alpha_{c}\) & \(\begin{array}{c}\mathrm{Distance to measuring plane}\\ \mathrm{(used to calculate}\ \alpha_{c})\end{array}\) \\ \hline \hline \end{tabular}  
* Where \(L=\mathrm{distance}\), \(f=\mathrm{ focal}\) length, \(d=\mathrm{longer}\) dimension of image sensor, \(D=\mathrm{number}\) of pixels along long side of image sensor, \(\theta=\mathrm{corrected}\) and angle of measuring plane. 2 Where \(D_{w}=\mathrm{Working}\) distance, \(P_{c}=\mathrm{pixels}\) per centimeter of camera, \(L_{f}=\mathrm{ focal}\) length, 3 Where \(L=\mathrm{Working}\) distance, \(f=\mathrm{ focal}\) length, \(S_{s}=\mathrm{horizontal}\) or vertical dimensions of sensor, \(S_{R}=\mathrm{horizontal}\) or vertical resolution of sensor.  
\end{table}
Table 2: Comparison of image-based crack width measurement methods.  
Figure 4: Calculation of maximum crack width based on medial axis.