%Version 3 December 2023
% See section 11 of the User Manual for version history
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                                                 %%
%% Please do not use \input{...} to include other tex files.       %%
%% Submit your LaTeX manuscript as one .tex document.              %%
%%                                                                 %%
%% All additional figures and files should be attached             %%
%% separately and not embedded in the \TeX\ document itself.       %%
%%                                                                 %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%\documentclass[referee,sn-basic]{sn-jnl}% referee option is meant for double line spacing

%%=======================================================%%
%% to print line numbers in the margin use lineno option %%
%%=======================================================%%

%%\documentclass[lineno,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style

%%======================================================%%
%% to compile with pdflatex/xelatex use pdflatex option %%
%%======================================================%%

%%\documentclass[pdflatex,sn-basic]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style


%%Note: the following reference styles support Namedate and Numbered referencing. By default the style follows the most common style. To switch between the options you can add or remove Numbered in the optional parenthesis. 
%%The option is available for: sn-basic.bst, sn-vancouver.bst, sn-chicago.bst%  
 
%%\documentclass[pdflatex,sn-nature]{sn-jnl}% Style for submissions to Nature Portfolio journals
% \documentclass[pdflatex,sn-basic,iicol,Numbered]{sn-jnl}% Basic Springer Nature Reference Style/Chemistry Reference Style
\documentclass[pdflatex,sn-mathphys-num,iicol]{sn-jnl}%  Math and Physical Sciences Numbered Reference Style 
% \documentclass[pdflatex,sn-mathphys-ay]{sn-jnl}% Math and Physical Sciences Author Year Reference Style
%%\documentclass[pdflatex,sn-aps]{sn-jnl}% American Physical Society (APS) Reference Style
%%\documentclass[pdflatex,sn-vancouver,Numbered]{sn-jnl}% Vancouver Reference Style
%%\documentclass[pdflatex,sn-apa]{sn-jnl}% APA Reference Style 
%%\documentclass[pdflatex,sn-chicago]{sn-jnl}% Chicago-based Humanities Reference Style

%%%% Standard Packages
%%<additional latex packages if required can be included here>

\usepackage{graphicx}%
\usepackage{multirow}%
\usepackage{amsmath,amssymb,amsfonts}%
\usepackage{amsthm}%
\usepackage{mathrsfs}%
\usepackage[title]{appendix}%
\usepackage{xcolor}%
\usepackage{textcomp}%
\usepackage{manyfoot}%
\usepackage{booktabs}%
\usepackage{algorithm}%
\usepackage{algorithmicx}%
\usepackage{algpseudocode}%
\usepackage{listings}%
%%%%

%%%%
% Personally added packages
\usepackage[justification=centering]{caption} % Control the caption


%%%%%=============================================================================%%%%
%%%%  Remarks: This template is provided to aid authors with the preparation
%%%%  of original research articles intended for submission to journals published 
%%%%  by Springer Nature. The guidance has been prepared in partnership with 
%%%%  production teams to conform to Springer Nature technical requirements. 
%%%%  Editorial and presentation requirements differ among journal portfolios and 
%%%%  research disciplines. You may find sections in this template are irrelevant 
%%%%  to your work and are empowered to omit any such section if allowed by the 
%%%%  journal you intend to submit to. The submission guidelines and policies 
%%%%  of the journal take precedence. A detailed User Manual is available in the 
%%%%  template package for technical guidance.
%%%%%=============================================================================%%%%

%% as per the requirement new theorem styles can be included as shown below
\theoremstyle{thmstyleone}%
\newtheorem{theorem}{Theorem}%  meant for continuous numbers
%%\newtheorem{theorem}{Theorem}[section]% meant for sectionwise numbers
%% optional argument [theorem] produces theorem numbering sequence instead of independent numbers for Proposition
\newtheorem{proposition}[theorem]{Proposition}% 
%%\newtheorem{proposition}{Proposition}% to get separate numbers for theorem and proposition etc.

\theoremstyle{thmstyletwo}%
\newtheorem{example}{Example}%
\newtheorem{remark}{Remark}%

\theoremstyle{thmstylethree}%
\newtheorem{definition}{Definition}%

\raggedbottom
%%\unnumbered% uncomment this for unnumbered level heads

\begin{document}

\title[Article Title]{A novel approach for surface defect classification based on 3D point cloud data with hybrid filters}

%%=============================================================%%
%% GivenName	-> \fnm{Joergen W.}
%% Particle	-> \spfx{van der} -> surname prefix
%% FamilyName	-> \sur{Ploeg}
%% Suffix	-> \sfx{IV}
%% \author*[1,2]{\fnm{Joergen W.} \spfx{van der} \sur{Ploeg} 
%%  \sfx{IV}}\email{iauthor@gmail.com}
%%=============================================================%%

\author[1]{\fnm{Dongqing} \sur{Yan}}%\email{yando@oregonstate.edu}

\author*[1]{\fnm{Zhaoyan} \sur{Fan}}\email{zhaoyan.fan@oregonstate.edu}
% \equalcont{These authors contributed equally to this work.}

% \author[1,2]{\fnm{Third} \sur{Author}}\email{iiiauthor@gmail.com}
% \equalcont{These authors contributed equally to this work.}

\affil*[1]{\orgdiv{School of Mechanical, Industrial, and Manufacturing Engineering}, \orgname{Oregon State University}, \orgaddress{\street{204 Rogers Hall}, \city{Corvallis}, \postcode{97331}, \state{Oregon}, \country{US}}}

% \affil[2]{\orgdiv{Department}, \orgname{Organization}, \orgaddress{\street{Street}, \city{City}, \postcode{10587}, \state{State}, \country{Country}}}

% \affil[3]{\orgdiv{Department}, \orgname{Organization}, \orgaddress{\street{Street}, \city{City}, \postcode{610101}, \state{State}, \country{Country}}}

%%==================================%%
%% Sample for unstructured abstract %%
%%==================================%%

\abstract{
Surface defect identification is one of the critical topics in manufacturing for ensuring product quality and performance. The conventional methodology of surface defect identification applies the visible light imaging technique, but struggles with variations in lighting conditions. The lack of depth information of the visible light imaging technique makes the detailed surface morphology analysis and classification task challenging. This study proposes a novel method leveraging 3D point cloud data and corresponding surface normal vectors to classify surface defects. A hybrid filtering approach, combining Gaussian and Gabor filters, is applied to the surface normal vectors to enhance defect-related features extraction while mitigating noise. The processed vectors are then transformed into RGB images, enabling the use of ResNet 18 for effective feature extraction and classification via transfer learning. Experimental results demonstrate that the proposed method achieves 90\% accuracy in classifying surface defects with real-world datasets. Compared to existing approaches, the proposed method eliminates the dependence on lighting conditions while leveraging the advancement of Convolution Neural Network (CNN) in the field of image processing. This research contributes a scalable and efficient framework for surface defect inspection in modern manufacturing environments.
}


\keywords{3D Point Cloud Data, Gaussian Filter, Gabor Filter, CNN, classification}

%%\pacs[JEL Classification]{D8, H51}

%%\pacs[MSC Classification]{35A01, 65L10, 65L12, 65L20, 65L70}

\maketitle

\section{Introduction}\label{Section: Introduction}

Managing surface defects is a common challenge across various manufacturing techniques, posing significant obstacles for both the production process and final product quality\cite{kostenetskiy_real-time_2019,li_deep_2023}. Meanwhile, the increasing prevalence of automated manufacturing processes requires the integration of automatic surface defect detection and classification systems. Identifying and addressing surface defects based on their specific types is essential for improving production efficiency and automation levels while ensuring high-quality manufacturing outcomes.

In recent years, advancements in machine learning and deep learning have led to the development of various methods for detecting and classifying surface defects. One widely adopted approach involves utilizing a visible light sensor (camera) to capture images of target surfaces, followed by image processing and computer vision techniques to identify defects\cite{sundarrajan_explainable_2023,chen_surface_2023,feng_resnet50-based_2021}. Gyimah et al. \cite{kankam_gyimah_robust_2021} introduced the Robust Completed Local Binary Pattern (RCLBP) framework based on the Northeastern University (NEU) steel surface defect database. This framework integrates multiple image processing techniques, including filtering and thresholding, to extract relevant features from captured images. Conventional machine learning classifiers, such as K-Nearest Neighbor (KNN), Support Vector Machine (SVM), Decision Tree (DT), Gaussian Naive Bayes (GNB), and Random Forest (RF), were then employed for defect classification. While this approach demonstrated a successful defect detection, its performance is inherently constrained by the reliance on adaptive thresholding, which is highly sensitive to illumination variations and image noise, particularly in low signal-to-noise ratio (SNR) scenarios. Also, the machine learning classifiers require extensive feature engineering and manual tuning, which limits their generalization ability for real-world applications.
Efforts have been made to address these challenges. Zaghdoudi et al. \cite{zaghdoudi_steel_2024} proposed utilizing the local concave-and-convex micro-structure pattern (LCCMSP) and dual cross pattern (DCP) for feature extraction, followed by SVM and RF for classification. Instead of directly classifying defects, a Bayesian fusion rule was applied to refine classification outputs, resulting in improved accuracy. Other than conventional machine learning classifiers, deep learning techniques attract a lot of attention due to their ability to offer feature extraction and classification accuracy. Chen et al. \cite{chen_surface_2023} proposed a high-precision defect detection model based on the YOLOv5 algorithm, which effectively identifies and localizes surface defects. Using the NEU dataset, their approach improved detection accuracy by 7.2\% compared to the standard YOLOv5 algorithm. For classification tasks, Convolutional Neural Networks (CNNs) have been widely adopted in manufacturing research. Xing and Jia \cite{xing_convolutional_2021} developed a CNN-based framework for workpiece surface defect detection, featuring a symmetric convolutional network (SCN) as the backbone for feature extraction and an optimized intersection-over-union loss function (XIoU) to improve defect localization accuracy. The proposed method was validated on both the NEU public datasets and a self-constructed aluminum casting dataset, achieving superior classification accuracy and mean average precision compared to other models. The results demonstrate its effectiveness and generalizability for automated surface defect inspection in manufacturing environments. ResNet, an advanced CNN-based architecture developed by He et al. \cite{he_deep_2016}, mitigates the vanishing gradient problem, enhancing deep learning model performance. Feng et al. \cite{feng_resnet50-based_2021} introduced a ResNet50-based deep learning scheme incorporating FcaNet and the Convolutional Block Attention Module (CBAM) for classifying surface defects in hot-rolled strip steel, achieving an accuracy of 93.87\%, outperforming models such as AlexNet and VGG16. A similar study has been conducted by Bouguettaya and Zarzour \cite{bouguettaya_cnn-based_2024} to test a wide spectrum of modern CNN-based machine learning techniques to classify the defects based on visible light images. In their comparison study, MobileNet and ResNet-based CNN model achieves superior performance in classifying defects on hot-rolled steel strip surface. Despite advancements in classification techniques, these studies remain reliant on camera-captured images, making them sensitive to illumination conditions, hue, and noise. Since models are trained on public datasets with inherent illumination and noise limitations, their performance in real-world applications with different illumination conditions remains uncertain.

To overcome the limitations of visible light imaging, laser scanning devices have been increasingly utilized for surface morphology studies in the field of manufacturing. The laser scanner projects high-precision laser beams onto surfaces and analyzes the reflected signals to determine geometries and surface metrology. Unlike conventional imaging, laser scanning is independent of ambient lighting conditions and provides detailed three-dimensional (3D) geometric information, particularly in the depth direction, which is absent in 2D camera photos. Jovančević et al. \cite{jovancevic_3d_2017} employed point cloud data, leveraging curvature and surface normal information alongside the Region Growing Segmentation Algorithm (RGSA) and thresholding techniques to detect defects on airplane surfaces. From their study, Lee et al. \cite{lee_new_2023} introduced a new technique, which uses a Surface Normal Gabor Filter (SNGF) to process surface normal vectors in point cloud data from a laser profilometer to identify defects or irregularities on a surface. While this approach demonstrated enhanced stability and computational efficiency compared to RGSA, due to its superior performance of edge detection, it lacked the capability to distinguish between convex and concave features on a surface. Additionally, Yan et al.\cite{yan_surface_2020} proposed a vision system that incorporated both structured laser light and multi-angle illumination visible light imaging to detect defects on welding seams. The structured laser light system captures the depth profile of the welding bead, which is subsequently analyzed with the 2D grayscale image acquired by the visible light imaging system. The system is complex, but the results showed successful detection of surface defects. Xu et al. \cite{xu_defect_2023} proposed the Gear-PcNet++ model, a Multi-Layer Perceptron (MLP)-based network designed for detecting defects in gear components using point cloud data. The proposed model showed excellent accuracy specifically for detecting the defect on the gear with point cloud data. However, the model was trained exclusively with simulated gear models with simulated surface defects. Lack of the real-world data makes the model's generalization for real-world applications remain uncertain.

To address these challenges, this paper presents a novel approach for processing 3D point cloud data to classify surface defects into their respective categories. The proposed method utilizes point cloud data and corresponding surface normal vectors to effectively capture surface morphology in 3D. A hybrid filtering technique, combining Gaussian and Gabor filters, is applied to the surface normal vectors to identify the surface defects' shape and location. The filtered surface normal vectors are then converted into RGB standard color images, enabling feature extraction using CNN-based classification models. The key contributions of this research are as follows:

\begin{enumerate}
    \item The utilization of surface normal vectors from point cloud data eliminates the dependency on lighting conditions in visible light imaging, ensuring more consistent defect classification.
    \item The proposed hybrid filtering technique effectively suppresses noise in high signal-to-noise ratio scenarios, improving defect feature distinction.
    \item The model is trained on both simulated and real-world datasets containing diverse defect types, enhancing its generalizability to real-world applications.
    \item The integration of CNNs facilitates accurate defect classification through transfer learning, enabling the model to extract and learn meaningful features from processed surface normal vectors.
\end{enumerate}

The remainder of this paper is structured as follows. Section \ref{Section: Methodology} introduces the proposed hybrid filtering method, detailing the application of Gabor and Gaussian filters to surface normal vector signals. Section \ref{Section: Database Establishment and Model Training} describes the establishment of the dataset used for ResNet model training. Section \ref{Section: Results and Discussion} presents the training results and corresponding analysis. Finally, Section \ref{section: Conclusion} provides the conclusions of the study.


\section{Methodology}\label{Section: Methodology}

The overall workflow of the proposed defect classification method contains seven steps as shown in Fig. \ref{fig: Flowchart of the proposed defect classification process}. 1) Scan the surface and acquire the raw point could data, 2) Point cloud data rasterization, 3) Surface normal calculation, 4) Apply the proposed hybrid wavelet filter to the surface normal, 5) Synthesis of the filtered surface normal into RGB images, 6) CNN model training, 7) Perform the classification task. The first step of the point cloud data acquisition can be achieved by different types of instruments, such as a laser profilometer, a camera, or an industrial optical metrology solution. The essential differences between instruments are the accuracy and resolution of the measurement. Therefore, the second step of data rasterization is necessary to ensure the consistency of the data and the computational performance of the algorithm  \cite{riveiro_automatic_2016}. An example of the rasterized surface is shown in Fig. \ref{fig: SN calculation} (a). During the data rasterization process, the point cloud data are projected onto uniformly spaced grids distributed across the $X-Y$ plane. In this study, the Matlab built-in function \textit{griddata} with the option of \textit{natural} is adopted to perform the raw point cloud data rasterization process. This method is a triangulation-based method to calculate the interpolated values at the points based on their natural neighbors (adjacent points). Compared with linear interpolation, this method provides a smoother transition between interpolated points. Meanwhile, it requires less computational power than the cubic interpolation method \cite{matlab_griddata_2024}.

\begin{figure*}
    \centering
    \includegraphics[width=0.8\linewidth]{Figure_Flowchart_V2.pdf}
    \captionsetup{justification=centering} % Ensures the caption is centered
    \caption{Flowchart of the proposed defect classification process}
    \label{fig: Flowchart of the proposed defect classification process}
\end{figure*}

\subsection{Surface Normal Calculation}\label{Subsection: Surface Normal Calculation}

The surface normal is a unit vector oriented perpendicular to the tangent plane of a surface at a specific point. Surface normal describes the orientation of the surface, thus, it indicates the surface morphology such as geometry, roughness, and defects on the surface. Conventionally, the surface normal is described by $X$, $Y$, and $Z$ in a Cartesian coordinate system as shown in Fig. \ref{fig: SN calculation} (b). 
\begin{figure}
    \centering
    \includegraphics[width=0.8\linewidth]{Figure_SurfaceNormal_Calculation.pdf}
    \caption{(a) Example of a rasterized surface from raw point cloud data (b) Illustration of surface normal calculation}
    \label{fig: SN calculation}
\end{figure}
The surface normal is calculated based on the rasterized point cloud data and a moving window. The moving window is moving along with the target point to determine a local cluster of neighborhood points for the surface normal calculation. The target point is located at the center of the moving window, which is defined as a circular shape as shown in Fig. \ref{fig: SN calculation} (b). The encompassed points within the moving window are considered as the selected local neighborhood points. Based on the selected local neighborhood points, the covariance matrix $\Sigma$ can be defined as:
\begin{equation}
    \Sigma = \frac{1}{N} \sum_{i=1}^{N} (p_i - \bar{p})(p_i - \bar{p})^T
\end{equation}
where $N$ is the number of points in the moving window, $p_i$ is the coordinate vector of the selected local neighborhood points, which is expressed as:
\begin{equation}
    p_i=[x_i,   y_i,   z_i]
\end{equation}
$\bar{p}$ is the mean position of the selected local neighborhood points, which is expressed as:
\begin{equation}
    \bar{p}=\frac{1}{N}\sum_{i=1}^{N}p_i
\end{equation}
The covariance matrix's eigenvector ($\nu$) and eigenvalues ($\lambda$) is defined as:
\begin{equation}
    \Sigma\cdot\nu_k = \lambda_k\cdot\nu_k ,  k\in\{0,1,2\}
\end{equation}
The eigenvectors define the principle axes of the selected local neighborhood points and the eigenvalues quantify the amount of variance along these axes. Considering the sequential order of the eigenvalues, $\lambda_0\leq\lambda_1\leq\lambda_2$, corresponds to the eigenvectors in the same order. The tangent plane of the moving window ($P$) has a relationship with the eigenvector $\lambda_0$:
\begin{equation}
    \lambda_0\cdot(P-\bar{p}) = 0
\end{equation}
Therefore, the surface normal ($N$) of the target point within the consideration of the selected local neighborhood points can be defined as:
\begin{equation}
    N(p_i) = {\lambda_0}^T = [n_X \quad n_Y \quad n_Z]
    \label{equ: surface normal}
\end{equation}

As seen in Equation \ref{equ: surface normal}, the surface normal vector contains three components along $X$, $Y$, and $Z$ directions. To further process the surface normal, representing the surface normal as an image provides additional flexibility and effectiveness compared with processing the surface normal directly. A standard color image consists of three channels, Red (R), Green (G), and Blue (B). The three components of the surface normal can be mapped to these channels separately, with each component assigned to a specific channel of an image. Specifically, the component $n_X$ maps to the R channel, the component $n_Y$ maps to the G channel, and the component $n_Z$ maps to the B channel. This approach allows the surface normal to be effectively encoded within a single image without losing any information. Fig. \ref{fig: Simulated point cloud and surface normal} shows examples of three types of defects on simulated surfaces with random and pattern noise, i.e., bump, dent, and scratch type of defects on surfaces and the corresponding encoded surface normal images. A detailed explanation of the simulated surface is presented in section \ref{Section: Database Establishment and Model Training}.
\begin{figure}
    \centering
    \includegraphics[width=1\linewidth]{Figure_Simulated Surface and surface normal.pdf}
    \caption{Simulated point cloud surface with different types of defects and noise (a) Bump (b) Surface normal encoded bump image (c) Dent (d) Surface normal encoded dent image (e) Scratch (d) Surface normal encoded scratch image}
    \label{fig: Simulated point cloud and surface normal}
\end{figure}

The surface normal in 3D Cartesian space is a vector with a unit length of 1. The magnitude of $n_Z$ can be reversely calculated from $n_X$ and $n_Y$. Therefore, the images that exclude the B channel are generated, as shown in Fig. \ref{fig: Simulated point cloud and surface normal} (g) - (i).  By examining the images, it is evident that the critical characteristics present in the R and G channels correspond closely to those in the complete RGB image. As shown in Fig. \ref{fig: Simulated point cloud and surface normal}(d) and (g), the bump features a red coloration at the top of the feature with and without the B channel. On the contrary, from Fig. \ref{fig: Simulated point cloud and surface normal} (e) and (h), the dent exhibits a red coloration at the bottom of the feature with and without the B channel. Noted here that the colorization of the features is determined by the surface normal, i.e., the red coloration location of the feature is determined by the feature type and remains unaffected by the feature deformation or rotation. Meanwhile, as shown in Fig. \ref{fig: Simulated point cloud and surface normal} (f) and (i), the main geometric structure of scratch is preserved when excluding the B channel. Hence, the images that exclude the component $n_Z$ are carried over for further processing.

\subsection{Gabor Filter}\label{Subsection: Gabor Filter}

Conventionally, a Gabor filter is an effective filter that processes grayscale images in both spatial and frequency domains, which makes the Gabro filter widely applied in the texture analysis and detection of objective edges in images. Most applications of the Gabor filter are involved in feature identification and defect classification \cite{cieszczyk_application_2024,qin_fabric_2023}. However, feature identification and defect classification are mainly based on the optical images and edge shapes rather than the morphology of the object. To expand the possibility of applications of the Gabor filter, the research group developed a Surface Normal Gabor Filter (SNGF) in the previous study \cite{lee_new_2023}. This study adopts the same methodology to process the surface normal information. The key principles and equations are highlighted as follows.

Using a Gabor filter to process the surface normal requires both real and imaginary part of the Gabor filter. The complex Gabor filter is expressed as: 
\begin{equation}
    G(x, y) = G_{\text{real}}(x, y) + i \cdot G_{\text{imag}}(x, y)
    \label{equ: Complex}
\end{equation}
where,
\begin{equation}
    G_{\text{real}}(x, y) = \exp\left(-\frac{x{\prime}^2 + \gamma^2 y{\prime}^2}{2 \sigma^2}\right) \cos\left(2\pi \frac{x{\prime}}{\lambda} + \psi\right)
    \label{equ: Real}
\end{equation}

\begin{equation}
    G_{\text{imag}}(x, y) = \exp\left(-\frac{x{\prime}^2 + \gamma^2 y{\prime}^2}{2 \sigma^2}\right) \sin\left(2\pi \frac{x{\prime}}{\lambda} + \psi\right)
    \label{equ: Imaginary}
\end{equation}
Here in Equation \ref{equ: Real} and \ref{equ: Imaginary},
\begin{equation}
\begin{bmatrix}
x' \\ y'
\end{bmatrix}
=
\begin{bmatrix}
\cos\theta & \sin\theta \\
-\sin\theta & \cos\theta
\end{bmatrix}
\begin{bmatrix}
x \\ y
\end{bmatrix}
\label{equ: prime x and y}
\end{equation}
and $\gamma$  defines the spatial aspect ratio of the filter kernel, the parameter  $\sigma$  determines the standard deviation of the Gaussian envelope. The wavelength of the sinusoidal wave is represented by  $\lambda$, while $\psi$  indicates the phase offset relative to the center of the Gabor kernel. In Equation \ref{equ: prime x and y}, $\theta$  specifies the orientation of the Gabor function. As explained in the section \ref{Subsection: Surface Normal Calculation}, the surface normal $n_X(x,y)$ and $n_Y(x,y)$ have been calculated to represent the surface normal at each rasterized point. Therefore, the surface normal is converted to a complex format as $n_X+in_Y$ to match the Gabor filter. To carry the complex number input to the Gabor filter, the real and imaginary components of the Gabor filter are:
\begin{equation}
\begin{split}
        G_{C,R}(x,y) = \sum_{m=-k}^{k} \sum_{l=-k}^{k}[g_r(m,l) \cdot n_X(x+m,y+l) \\ 
- g_i(m,l) \cdot n_Y(x+m,y+l)]
\end{split}
\end{equation}
\begin{equation}
\begin{split}
        G_{C,I}(x,y) = \sum_{m=-k}^{k} \sum_{l=-k}^{k}[g_i(m,l) \cdot n_X(x+m,y+l) \\ 
+ g_r(m,l) \cdot n_Y(x+m,y+l)]
\end{split}
\end{equation}
where $k=4\sigma$, m and l are the indices of a kernel window with a size of $(2k+1)\cdot(2k+1)$, and the notation $C$ represents the spatial domain of 3D Cartesian space. To determine the captured features from the Gabor filter, the Gabor energy, $G_{C,E}(x,y)$, is calculated via the Equation \ref{equ: Gabor Energy} as follows:
\begin{equation}
    G_{C,E}(x,y) = G_{C,R}(x,y)^2 + G_{C,I}(x,y)^2
    \label{equ: Gabor Energy}
\end{equation}
Based on Equation \ref{equ: Real}-\ref{equ: prime x and y}, the wavelength $\lambda$ and orientation $\theta$ are the parameters that define the Gabor filter. Different combinations of the parameters lead to varying sensitivities of the Gabor filter to specific spatial features. In the application of surface defect detection, defects appear on the surface as irregularities with random shapes, locations, and orientations. To effectively detect the defects, a set of Gabor filters with different parameter combinations, known as a Gabor filter bank, is employed to comprehensively analyze the surface. By applying the Gabor filter bank, regions with high Gabor energy, which correspond to surface defects, can be identified.
As shown in Fig. \ref{fig. Gabor bank}, a Gabor filter bank containing 24 filters is employed, generating 24 grayscale images corresponding to each combination of spatial frequencies $\lambda$ and orientations $\theta$. 

\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{Figure_Gabor_Bank.pdf}
    \caption{Gabor bank}
    \label{fig. Gabor bank}
\end{figure}

An example of the Gabor filter bank results is shown in Fig. \ref{fig. Gabor bank example} with simulated defects on a surface. Detailed information on simulation is provided in section \ref{Section: Database Establishment and Model Training}.
\begin{figure}
    \centering
    \includegraphics[width=0.9\linewidth]{Figure_GB_bank_filtered_example.pdf}
    \caption{Gabor bank filtered example of a simulated surface with scratch defects}
    \label{fig. Gabor bank example}
\end{figure}
To detect surface defects, Principal Component Analysis (PCA) is applied to identify the principal components that highlight defect-related features across these images. Through this process, the 24 grayscale images are reduced to a single grayscale image that captures the maximum variance associated with the defects. An example of a defect identified using PCA is presented in Fig. \ref{fig. Gabor bank example}(b). The Gabor bank and PCA method effectively detect the abnormal features on the surface but lose critical information about the direction information from the surface normal (Equation \ref{equ: Gabor Energy}). The limitation indicates the Gabor filter is effective at detecting scratching-type defects but may confuse bumps and dents. To address this, another filter (Gaussian filter) is required to ensure the direction information from the surface normal is preserved. The detailed description of the Gaussian filter is presented in selection \ref{Subsection: Gaussian Filter}. The single Gabor-filtered grayscale image is assigned to the blue channel of an RGB image, while the red and green channels are reserved for a parallel input of Gaussian-filtered images. 


\subsection{Gaussian Filter}\label{Subsection: Gaussian Filter}

The Gaussian filter is one of the common filters that is widely used in data processing and image processing to smooth the data and reduce the noise. The Gaussian filter is selected in this study to smooth the noise from the surface roughness and the sensor data acquisition process while retaining the surface normal's directionality to complement the Gabor filter. In 2D image processing, the Gaussian kernel is defined as:
\begin{equation}
    G(x, y) = \frac{1}{\sqrt{2\pi\sigma^2}} \exp\left(-\frac{x^2 + y^2}{2\sigma^2}\right)
    \label{equ: Gaussian General}
\end{equation}
where $G(x,y)$ is the Gaussian kernel value at location $(x,y)$, $\sigma$ is the standard deviation of the Gaussian distribution which controls the spread of the Gaussian distribution. In practice, the Gaussian filter is implemented to the 2D image as a convolution as:
\begin{equation}
    I_{\text{f}}(a, b) = \sum_{i}\sum_{j} I_{\text{org}}(a-i, b-j) \cdot G(i, j)
    \label{equ: Gaussian Convolution}
\end{equation}
where $I_{\text{f}}(a, b)$ is the image that is filtered by the Gaussian filter, $I_{\text{org}}(a,b)$ is the original image at pixel $(a,b)$, and $G(i,j)$ is the Gaussian kernel value. The convolution process involves using a moving window to slide across the whole image. The window size ($W$) is determined by the standard deviation $\sigma$ of the Gaussian filter as:
\begin{equation}
    W = 4\sigma+1
    \label{equ: Gaussian window size}
\end{equation}
where the final value of $W$ is always rounded up to the nearest integer due to the processing of discretized pixels of images. 
Based on Equation \ref{equ: Gaussian General}- \ref{equ: Gaussian window size}, the standard deviation $\sigma$ is the critical parameter that determines the performance of a Gaussian filter in image processing. A larger $\sigma$ leads to a greater spreading of the Gaussian function resulting in a greater blurring of the image. The Gaussian filter essentially is a low-pass filter, allowing the low-frequency components to pass through the filter while attenuating high-frequency components. The noise from the surface roughness and the data acquisition process are high-frequency components that will be reduced by the Gaussian filter. Meanwhile, the window size $W$ defines the dimensions of the filter matrix applied during convolution. Using a Gaussian filter with a window size of $4\sigma+1$ ensures accurate and efficient filtering by capturing nearly the entire effective range of the Gaussian function while discarding negligible values beyond $4\sigma$. Meanwhile, the symmetrical window aligns with the pixel being filtered, thereby providing consistent and unbiased filtering along both directions of 2D images. 
The surface normal components $X$ and $Y$ are isolated into separate grayscale images, an example of the grayscale images is shown in Fig. \ref{fig: SN XY Example Gaus Flt}(a). 
\begin{figure}
    \centering
    \includegraphics[width=1\linewidth]{Figure_Gaus_XY.pdf}
    \caption{Surface normal component}
    \label{fig: SN XY Example Gaus Flt}
\end{figure}
The grayscale images are processed individually using the Gaussian filter to reduce the noise and other high-frequency signals, with the resulting filtered images shown in Fig. \ref{fig: SN XY Example Gaus Flt}(b). Subsequently, the filtered $X$ and $Y$ grayscale images are assigned to the Red and Green channels that are reserved from the Gabor filtering process as shown in Fig. \ref{fig: Gaus_Both}(a). An example of the synthesized RGB image, combining the filtered images from both Gabor and Gaussian filtering processes,  is shown in Fig. \ref{fig: Gaus_Both}(b).
\begin{figure}
    \centering
    \includegraphics[width=1\linewidth]{Figure_Gaus_Both.pdf}
    \caption{Gaussian filtered surface normal and synthesized RGB image of Gabor and Gaussian filter}
    \label{fig: Gaus_Both}
\end{figure}

\section{Database Establishment and Model Training}\label{Section: Database Establishment and Model Training}

The database is constructed from two sources: simulated surfaces with designed defects and scanned surfaces from real-world applications. Both the simulated and scanned surfaces are processed using the aforementioned methodology to compute surface normals and generate synthesized RGB images. These synthesized RGB images, labeled according to defect type, constitute the database used for model training.

Transfer learning is a methodological approach wherein knowledge acquired from a previously learned task is utilized to improve the performance and efficiency of a model on a new, related task \cite{bouguettaya_deep_2023}. Transfer learning is applied to train the model to classify and distinguish between different defect types based on the synthesized RGB images to overcome the constraint of limited database size. The pre-trained Convolution Neural Network (CNN) Rest-net 18 has been applied with the transfer learning approach.

\subsection{Simulated Surface with Designed Defects}\label{Subsection: Simulated Surface with Designed Defects}

A simulated surface with a footprint area of $10\times10 mm$ is generated in the form of point cloud data to represent the topological features of real-world surfaces. Three types of defects are designed and incorporated into the simulated surface, including bumps, dents, and scratches, to mimic the real defects encountered in practical applications, as shown in Fig. \ref{fig: Simulated point cloud and surface normal}. In order to mathematically describe the defects, the three defect types are categorized into round-shaped (bumps and dents) and stripe-shaped (scratches) defects.  Meanwhile, stripe-shaped defects can be conceptualized as round-shaped defects (dents) that extend along a specific curvature. Therefore, the mathematical representation of bumps and dents is:
\begin{equation}
    F = I_F\sqrt{x_c-r}
\end{equation}
where $F$ is the feature, $I_F$ is the intensity of the feature, denotes the feature magnitude, $x_c$ is the center of the feature, and $r$ is the feature radius. When the intensity $I_F$ is positive, the feature protrudes above the surface, resulting in a bump feature. Conversely, when the intensity is negative, the feature lies below the surface, leading to a dent feature. With a description of the dent feature, the scratch feature can be modeled by extending the dent along a specific curvature. The curvature is described as the sinusoidal function of:
\begin{equation}
    C = 0.25\cdot\sin{(2(P_s-P_e))}
\end{equation}
where the $P_s$ is the starting point and $P_e$ is the ending point of the sinusoidal curvature, respectively. The relatively low value of the scale factor (0.25) of the sinusoidal function and the random radius and intensity of the initial dent feature ensure the simulated scratches do not show a perfect pattern of a sinusoidal wave. The detailed parameters applied in this study are shown in Table \ref{tab: Simulated defects parameters and signal-to-noise ratio (SNR)}. The features' magnitude has a normal distribution within the shown range with a resolution of 0.01 mm. The features' radius also has a normal distribution within the shown range with a resolution of 0.1 mm.

\begin{table}[h]
\caption{Simulated defect parameters and signal-to-noise ratio (SNR)}
\label{tab: Simulated defects parameters and signal-to-noise ratio (SNR)}
    % \centering
    \begin{tabular}{p{12mm}p{15mm}p{12mm}p{12mm}}
    \toprule
                &  Magnitude $I_F$ (mm) & Radius r (mm) & SNR Range   \\
    \midrule
         Bump   &  0.40 - 0.60          &  0.5 - 2.0    & 5 - 10      \\
         Dent   &  0.40 - 0.60          &  0.5 - 2.0    & 5 - 10      \\
         Scratch&  0.60 - 1.00          &  0.5 - 1.3    & 7.5 - 16.7  \\
    \bottomrule
    \end{tabular}
\end{table}

To enhance realism and improve the performance of the model training, two types of noise: random noise and pattern noise, are embedded into the simulated point cloud surface with defects. In real-world applications, the random noise typically comes from the data acquisition process and the surface roughness, while the patterned noises are commonly found in both additive manufacturing (printing tracks) and conventional subtractive manufacturing processes (cutting trajectories). In this study, the added random noise follows a normal distribution and the pattern noise is represented as a sinusoidal wave along the $x$ direction. The signal-to-noise ratio (SNR) is determined by the relative magnitudes of the features and noise. A higher SNR indicates that defects are more distinguishable to both human observers and computer vision systems. Therefore, filters that perform effectively under low SNR conditions are expected to perform well under higher SNR scenarios. Based on the conventional Rose criterion \cite{rose_vision_1973} and the variation of the feature magnitudes, the random noise's magnitude is set to 0.06 mm and the pattern noise's magnitude is set to 0.08 mm with a frequency of 10. As a result, the SNR in this study varies between 5 and 16.7, depending on the feature and noise magnitudes. A total of 100 surfaces are generated for each defect type, with the defects randomly located on the surfaces and varying in size. Additionally, 100 defect-free surfaces containing only noise are simulated to serve as a representation of non-defective surfaces.

\subsection{Scanned Surface}\label{Subsection: Scanned Surface}

For the real surface, an industrial optical metrology solution, ATOS 5 Scanbox, has been applied to acquire surface metrology data. The sensor has a high resolution of 12 million points per scan to ensure the surface defects are captured effectively. The scanned surfaces with different types of defects are shown in Fig. \ref{fig: Scanned_Real_Surface}. The scanned surface (a)-(c) are fabricated through Laser Direct Energy deposition (L-DED) with 316 L stainless steel wire. Surface (d) is fabricated by Laser Powder Bed Fusion (LPBF) with 316 L stainless steel powder. Surface (e) and (f) are commercial aluminum blocks with defects of dents and scratches. As shown in Fig. \ref{fig: Scanned_Real_Surface}, the defects on the scanned surfaces are randomly distributed with a variety of sizes and shapes. Additionally, the scanned surfaces have varying footprint areas from $10\times15 mm$ to $65\times65 mm$. The scanned surface with variations in footprint size, defect distribution, and defect geometry, makes it more intricate than the simulated surfaces. To align the scanned real surfaces with the simulated surfaces and expand the database, the scanned surfaces are cropped to a consistent footprint of $10\times 10 mm$ after scanning. In total, 67 cropped surfaces with different types of defects were acquired from the scanned real surfaces,  comprising 10 surfaces with bump defects, 20 with dent defects, 17 with scratch defects, and the remaining 20 surfaces free of defects. The cropped scanned surfaces undergo the same processing as the simulated surfaces. The resulting filtered surface normal images from the simulated surfaces and real surfaces form a database for machine learning model training. 

\begin{figure}
    \centering
    \includegraphics[width=1\linewidth]{Figure_Scanned_Real_Surface.pdf}
    \caption{Scanned surfaces with defects (a) Laser Direct Energy Deposition (L-DED) printed 316L surface with bump, (b) L-DED printed 316L surface with bump and dents, (c) L-DED printed 316L surface with bump and scratches, (d) Laser Powder Bed Fusion (L-PBF) printed 316 L surface with bumps, (e) Partially milled aluminum block with dents and scratches, (f) Aluminum block with scratches}
    \label{fig: Scanned_Real_Surface}
\end{figure}

\subsection{Model Training}\label{Subsection: Model Training}

 The model has been utilized in this study is a pre-trained ResNet-18 Convolution Neural Network (CNN). Four types of databases have been tested in this study, including 1) raw surface normal images (hereafter referred to as Raw SN), 2) Surface normal images filtered by Gabor filter only (hereafter referred to as Gabor Database), 3) Surface normal images filtered by Gaussian filter only (hereafter referred to as Gaussian Database), and 4) Surface normal images filtered by both Gabor and Gaussian filters (hereafter referred to as Hybrid Filter Database). The database includes surface normal images from both simulated and scanned real surfaces with the classes of bump, dent, scratch, and free of defects. Each image is resized to $224 \times 224$ pixels to meet the input size requirements of the ResNet-18 model. As mentioned in the previous section, a total of 67 surfaces are acquired from the real part. To demonstrate the effectiveness of the proposed methods, the real surfaces are randomly divided into 2 groups, one is for the model training and validation with the combination with simulated surfaces, and the remaining real surfaces are for the testing. There are no simulated surfaces for the testing process. As a result, 4 surfaces with bump defects, 6 surfaces with dent defects, 5 surfaces with scratch defects, and 5 surfaces with no defects on the surface have been collected for testing. 4 trained models are all tested with the same images to ensure the models are compared with the same condition. The purpose of model training is to classify the defects in the real world application, therefore, testing the model performance with simulated surfaces is omitted.
The model is trained with a transfer learning technique based on the same pre-trained ResNet-18 model. The detailed hyperparameters are listed in Table \ref{tab: Hyperparameters}. The model is trained with a Stochastic Gradient Descent with Momentum (sgdm) optimizer with an initial learning rate of $0.01$ to ensure a better generalization compared with other adaptive optimizers. A batch size of 64 is used, and training is performed for 120 epochs with early stopping applied based on validation loss. Regularization techniques, including dropout layers and L2 regularization factor of 0.01, are employed to enhance model robustness and prevent overfitting of the database. 
\begin{table}[h]
 \caption{Hyperparameters Setup of ResNet-18}
 \label{tab: Hyperparameters}
    \begin{tabular}{p{50mm}p{15mm}}
        \toprule
         Hyperparameters           & Value         \\
        \midrule
         Optimizer                 & sgdm\\
         Max Epochs                & 120    \\
         Initial Learning Rate     & 0.01     \\
         Learning Rate Drop Factor & 0.75     \\
         Learning Rate Drop Period & 30     \\
         Mini Batch Size           & 64     \\
         L2 Regularization         & 0.01  \\
         Early Stop Patience       & 12\\
        \bottomrule
    \end{tabular}
\end{table}


\section{Results and Discussion}\label{Section: Results and Discussion}

The testing accuracy of the trained ResNet-18 models is presented in Table \ref{tab: Test results}.
\begin{table}[h]
 \caption{Testing accuracy of trained ResNet-18 models}
 \label{tab: Test results}
    \begin{tabular}{p{30mm}p{12mm}p{6mm}p{12mm}}
        \toprule
         Database                             & Average Accuracy (\%) & STD & Highest Accuracy (\%)\\
        \midrule
         Raw surface normal(SN) images        & 69   & 4.6 & 75 \\
         SN images filtered by Gabor          & 52   & 11.1& 65   \\
         SN images filtered by Gaussian       & 78.5 & 5.8 & 85    \\
         SN images filtered by hybrid filters & 81   & 6.1 & 90  \\
        \bottomrule
    \end{tabular}
\end{table}
To ensure the stability of the test results, each model was trained and tested 10 times to migrate the effect of the limited size of each database. The results show that surface normal images processed with the Hybrid Filter Database achieve the highest average accuracy of 81\%. In comparison with the unfiltered Raw SN Database, the hybrid-filtering approach enhances accuracy by $(81-69)/69 = 17\%$. Compared with the testing result of the model trained by the Gabor Database, the Hybrid Filter Database results in a significant improvement of $(81-52)/52 = 55\%$. Furthermore, compared with the Gaussian Database, the Hybrid Filter Database approach improves accuracy by $(81-78.5)/78.5 = 3\%$. Additionally, the highest testing accuracy obtained with the Hybrid Filter Database is 90\%, whereas the Gaussian Database yields a comparable result of maximum accuracy of 85\%. The results indicate that the Hybrid Filter Database enhances model performance by leveraging the complementary strengths of multiple filtering techniques, leading to improved defect classification accuracy and robustness in surface normal image processing.
Further analysis of the observed accuracy improvements is presented through confusion matrices derived from the best-performing models across 10 training iterations. The confusion matrices for each model are shown in Fig. \ref{fig: Confusion Chart}.

\begin{figure}
    \centering
    \includegraphics[width=1\linewidth]{Figure_ConfusionChart.pdf}
    \caption{Confusion chart of the best-performed models trained with different databases. (a) Raw SN database, (b) Gabor database, (c) Gaussian database, (d) Hybrid Filter database}
    \label{fig: Confusion Chart}
\end{figure}

When using the Raw SN Database for training, the confusion matrix in Fig. \ref{fig: Confusion Chart}(a) shows that all defect-free surfaces are correctly predicted. However, the model tends to misclassify bump defects as dent defects and exhibits a bias toward predicting surfaces as either dented or defect-free. The confusion matrix for the Gabor Database, shown in Fig. \ref{fig: Confusion Chart}(b), highlights the difficulty in distinguishing between bump and dent defects. This is attributed to the Gabor filter's ability to emphasize edge features while simultaneously filtering out directional information from the surface normal images. However, the Gabor-filtered approach is effective in detecting scratch-type defects and correctly identifying defect-free surfaces. The models trained with Gaussian Database and Hybrid Databases, shown in Fig. \ref{fig: Confusion Chart}(c) and (d), respectively, demonstrate improved performance in identifying scratch defects compared to the Raw SN Database trained model, while all the defect free surfaces are correctly classified. Compared with the Gaussian Database trained model, the hybrid filter enhances the model's ability to classify scratch defects due to the combined effect of Gabor and Gaussian filtering.

Despite these improvements, all models fail to correctly classify two bump defect images, as shown in Fig. \ref{fig: Error Images}. In the first case (Fig. \ref{fig: Error Images}(a)), the bump is the most distinguishable feature on the surface, but additional features appear at the image's edges due to artifacts introduced during surface normal calculation. Referring to Fig. \ref{fig: Scanned_Real_Surface}(b), the bump is located near the edge of the printed surface, which suggests that when capturing the bump features, the edge of the printed surface is also detected. As a result, the calculated surface normal at the edge exhibits characteristics similar to those of a scratch. Additionally, the bump feature measures approximately 0.4 mm in height, confirming the correctness of the label. However, predictions vary across models: the raw SN-trained model classifies it as defect-free, while the Gabor-, Gaussian-, and hybrid-trained models classify it as a scratch defect. The prediction results suggest that raw surface normal images alone are less effective in capturing distinct features than filtered surface normal images. Additionally, the classification bias toward scratch-type defects is attributed to the imbalance in the dataset, as there are 17 real surfaces with scratch defects compared to only 10 surfaces with bump defects. In the second misclassified case (Fig. \ref{fig: Error Images}(b)), the surface normal image indicates a bump feature (a spike). However, the absolute height of the bump is less than 0.02 mm, suggesting that it may should be considered as noise. All models classify this surface as defect-free, inferring that the assigned label for this image could be reconsidered.

\begin{figure}
    \centering
    \includegraphics[width=1\linewidth]{Figure_ErrorImage.pdf}
    \caption{Misclassified defect surfaces. The upper images show the scanned real surface, while the lower images display the hybrid-filtered surface normal images. (a) Labeled as a bump defect, (b) Labeled as a bump defect.}
    \label{fig: Error Images}
\end{figure}


\section{Conclusion}\label{section: Conclusion}

In this paper, a novel approach for surface defect classification using 3D point cloud data was introduced. The proposed method leverages surface normal vectors derived from point cloud data to capture detailed surface morphology, and eliminates dependencies on illumination conditions, ensuring consistent defect classification performance. A hybrid filtering technique combining Gaussian and Gabor filters was applied to enhance defect representation by reducing noise and improving feature distinction, particularly in high signal-to-noise ratio scenarios. The filtered surface normal vectors were then transformed into RGB standard color images, facilitating efficient feature extraction using transfer learning based on CNN-based ResNet classification models. Additionally, the training dataset incorporates both simulated and real-world defect instances, enhancing the model’s generalizability to practical manufacturing applications.

Future research directions may explore the integration of more advanced deep learning architectures to further enhance classification performance. The development of a more extensive and diverse defect dataset, incorporating data from different manufacturing environments, would contribute to improving model robustness. Additionally, incorporating an advanced control scheme to fix the identified and classified defects could enable broader industrial applications. 

In summary, the proposed approach provides an effective solution for surface defect classification in manufacturing, addressing key challenges associated with illumination variability and noise sensitivity. By leveraging 3D point cloud data, hybrid filtering techniques, and deep learning techniques, this framework presents a promising step toward fully automated and intelligent defect detection systems in manufacturing settings.

% \section{Equations}\label{sec4}

% Equations in \LaTeX\ can either be inline or on-a-line by itself (``display equations''). For
% inline equations use the \verb+$...$+ commands. E.g.: The equation
% $H\psi = E \psi$ is written via the command \verb+$H \psi = E \psi$+.

% For display equations (with auto generated equation numbers)
% one can use the equation or align environments:
% \begin{equation}
% \|\tilde{X}(k)\|^2 \leq\frac{\sum\limits_{i=1}^{p}\left\|\tilde{Y}_i(k)\right\|^2+\sum\limits_{j=1}^{q}\left\|\tilde{Z}_j(k)\right\|^2 }{p+q}.\label{eq1}
% \end{equation}
% where,
% \begin{align}
% D_\mu &=  \partial_\mu - ig \frac{\lambda^a}{2} A^a_\mu \nonumber \\
% F^a_{\mu\nu} &= \partial_\mu A^a_\nu - \partial_\nu A^a_\mu + g f^{abc} A^b_\mu A^a_\nu \label{eq2}
% \end{align}
% Notice the use of \verb+\nonumber+ in the align environment at the end
% of each line, except the last, so as not to produce equation numbers on
% lines where no equation numbers are required. The \verb+\label{}+ command
% should only be used at the last line of an align environment where
% \verb+\nonumber+ is not used.
% \begin{equation}
% Y_\infty = \left( \frac{m}{\textrm{GeV}} \right)^{-3}
%     \left[ 1 + \frac{3 \ln(m/\textrm{GeV})}{15}
%     + \frac{\ln(c_2/5)}{15} \right]
% \end{equation}
% The class file also supports the use of \verb+\mathbb{}+, \verb+\mathscr{}+ and
% \verb+\mathcal{}+ commands. As such \verb+\mathbb{R}+, \verb+\mathscr{R}+
% and \verb+\mathcal{R}+ produces $\mathbb{R}$, $\mathscr{R}$ and $\mathcal{R}$
% respectively (refer Subsubsection~\ref{subsubsec2}).

% \section{Tables}\label{sec5}

% Tables can be inserted via the normal table and tabular environment. To put
% footnotes inside tables you should use \verb+\footnotetext[]{...}+ tag.
% The footnote appears just below the table itself (refer Tables~\ref{tab1} and \ref{tab2}). 
% For the corresponding footnotemark use \verb+\footnotemark[...]+

% \begin{table}[h]
% \caption{Caption text}\label{tab1}%
% \begin{tabular}{@{}llll@{}}
% \toprule
% Column 1 & Column 2 & Column 3 & Column 4\\
% \midrule
% row 1    & data 1   & data 2  & data 3  \\
% row 2    & data 4   & data 5\footnotemark[1]  & data 6  \\
% row 3    & data 7   & data 8  & data 9\footnotemark[2]  \\
% \botrule
% \end{tabular}
% \footnotetext{Source: This is an example of table footnote. This is an example of table footnote.}
% \footnotetext[1]{Example for a first table footnote. This is an example of table footnote.}
% \footnotetext[2]{Example for a second table footnote. This is an example of table footnote.}
% \end{table}

% \noindent
% The input format for the above table is as follows:

% %%=============================================%%
% %% For presentation purpose, we have included  %%
% %% \bigskip command. Please ignore this.       %%
% %%=============================================%%
% \bigskip
% \begin{verbatim}
% \begin{table}[<placement-specifier>]
% \caption{<table-caption>}\label{<table-label>}%
% \begin{tabular}{@{}llll@{}}
% \toprule
% Column 1 & Column 2 & Column 3 & Column 4\\
% \midrule
% row 1 & data 1 & data 2	 & data 3 \\
% row 2 & data 4 & data 5\footnotemark[1] & data 6 \\
% row 3 & data 7 & data 8	 & data 9\footnotemark[2]\\
% \botrule
% \end{tabular}
% \footnotetext{Source: This is an example of table footnote. 
% This is an example of table footnote.}
% \footnotetext[1]{Example for a first table footnote.
% This is an example of table footnote.}
% \footnotetext[2]{Example for a second table footnote. 
% This is an example of table footnote.}
% \end{table}
% \end{verbatim}
% \bigskip
% %%=============================================%%
% %% For presentation purpose, we have included  %%
% %% \bigskip command. Please ignore this.       %%
% %%=============================================%%

% \begin{table}[h]
% \caption{Example of a lengthy table which is set to full textwidth}\label{tab2}
% \begin{tabular*}{\textwidth}{@{\extracolsep\fill}lcccccc}
% \toprule%
% & \multicolumn{3}{@{}c@{}}{Element 1\footnotemark[1]} & \multicolumn{3}{@{}c@{}}{Element 2\footnotemark[2]} \\\cmidrule{2-4}\cmidrule{5-7}%
% Project & Energy & $\sigma_{calc}$ & $\sigma_{expt}$ & Energy & $\sigma_{calc}$ & $\sigma_{expt}$ \\
% \midrule
% Element 3  & 990 A & 1168 & $1547\pm12$ & 780 A & 1166 & $1239\pm100$\\
% Element 4  & 500 A & 961  & $922\pm10$  & 900 A & 1268 & $1092\pm40$\\
% \botrule
% \end{tabular*}
% \footnotetext{Note: This is an example of table footnote. This is an example of table footnote this is an example of table footnote this is an example of~table footnote this is an example of table footnote.}
% \footnotetext[1]{Example for a first table footnote.}
% \footnotetext[2]{Example for a second table footnote.}
% \end{table}

% In case of double column layout, tables which do not fit in single column width should be set to full text width. For this, you need to use \verb+\begin{table*}+ \verb+...+ \verb+\end{table*}+ instead of \verb+\begin{table}+ \verb+...+ \verb+\end{table}+ environment. Lengthy tables which do not fit in textwidth should be set as rotated table. For this, you need to use \verb+\begin{sidewaystable}+ \verb+...+ \verb+\end{sidewaystable}+ instead of \verb+\begin{table*}+ \verb+...+ \verb+\end{table*}+ environment. This environment puts tables rotated to single column width. For tables rotated to double column width, use \verb+\begin{sidewaystable*}+ \verb+...+ \verb+\end{sidewaystable*}+.

% \begin{sidewaystable}
% \caption{Tables which are too long to fit, should be written using the ``sidewaystable'' environment as shown here}\label{tab3}
% \begin{tabular*}{\textheight}{@{\extracolsep\fill}lcccccc}
% \toprule%
% & \multicolumn{3}{@{}c@{}}{Element 1\footnotemark[1]}& \multicolumn{3}{@{}c@{}}{Element\footnotemark[2]} \\\cmidrule{2-4}\cmidrule{5-7}%
% Projectile & Energy	& $\sigma_{calc}$ & $\sigma_{expt}$ & Energy & $\sigma_{calc}$ & $\sigma_{expt}$ \\
% \midrule
% Element 3 & 990 A & 1168 & $1547\pm12$ & 780 A & 1166 & $1239\pm100$ \\
% Element 4 & 500 A & 961  & $922\pm10$  & 900 A & 1268 & $1092\pm40$ \\
% Element 5 & 990 A & 1168 & $1547\pm12$ & 780 A & 1166 & $1239\pm100$ \\
% Element 6 & 500 A & 961  & $922\pm10$  & 900 A & 1268 & $1092\pm40$ \\
% \botrule
% \end{tabular*}
% \footnotetext{Note: This is an example of table footnote this is an example of table footnote this is an example of table footnote this is an example of~table footnote this is an example of table footnote.}
% \footnotetext[1]{This is an example of table footnote.}
% \end{sidewaystable}

% \section{Figures}\label{sec6}

% As per the \LaTeX\ standards you need to use eps images for \LaTeX\ compilation and \verb+pdf/jpg/png+ images for \verb+PDFLaTeX+ compilation. This is one of the major difference between \LaTeX\ and \verb+PDFLaTeX+. Each image should be from a single input .eps/vector image file. Avoid using subfigures. The command for inserting images for \LaTeX\ and \verb+PDFLaTeX+ can be generalized. The package used to insert images in \verb+LaTeX/PDFLaTeX+ is the graphicx package. Figures can be inserted via the normal figure environment as shown in the below example:

% %%=============================================%%
% %% For presentation purpose, we have included  %%
% %% \bigskip command. Please ignore this.       %%
% %%=============================================%%
% \bigskip
% \begin{verbatim}
% \begin{figure}[<placement-specifier>]
% \centering
% \includegraphics{<eps-file>}
% \caption{<figure-caption>}\label{<figure-label>}
% \end{figure}
% \end{verbatim}
% \bigskip
% %%=============================================%%
% %% For presentation purpose, we have included  %%
% %% \bigskip command. Please ignore this.       %%
% %%=============================================%%

% \begin{figure}[h]
% \centering
% \includegraphics[width=0.9\textwidth]{fig.eps}
% \caption{This is a widefig. This is an example of long caption this is an example of long caption  this is an example of long caption this is an example of long caption}\label{fig1}
% \end{figure}

% In case of double column layout, the above format puts figure captions/images to single column width. To get spanned images, we need to provide \verb+\begin{figure*}+ \verb+...+ \verb+\end{figure*}+.

% For sample purpose, we have included the width of images in the optional argument of \verb+\includegraphics+ tag. Please ignore this. 

% % \section{Algorithms, Program codes and Listings}\label{sec7}

% % Packages \verb+algorithm+, \verb+algorithmicx+ and \verb+algpseudocode+ are used for setting algorithms in \LaTeX\ using the format:

% % %%=============================================%%
% % %% For presentation purpose, we have included  %%
% % %% \bigskip command. Please ignore this.       %%
% % %%=============================================%%
% % \bigskip
% % \begin{verbatim}
% % \begin{algorithm}
% % \caption{<alg-caption>}\label{<alg-label>}
% % \begin{algorithmic}[1]
% % . . .
% % \end{algorithmic}
% % \end{algorithm}
% % \end{verbatim}
% % \bigskip
% % %%=============================================%%
% % %% For presentation purpose, we have included  %%
% % %% \bigskip command. Please ignore this.       %%
% % %%=============================================%%

% % You may refer above listed package documentations for more details before setting \verb+algorithm+ environment. For program codes, the ``verbatim'' package is required and the command to be used is \verb+\begin{verbatim}+ \verb+...+ \verb+\end{verbatim}+. 

% % Similarly, for \verb+listings+, use the \verb+listings+ package. \verb+\begin{lstlisting}+ \verb+...+ \verb+\end{lstlisting}+ is used to set environments similar to \verb+verbatim+ environment. Refer to the \verb+lstlisting+ package documentation for more details.

% % A fast exponentiation procedure:

% % \lstset{texcl=true,basicstyle=\small\sf,commentstyle=\small\rm,mathescape=true,escapeinside={(*}{*)}}
% % \begin{lstlisting}
% % begin
% %   for $i:=1$ to $10$ step $1$ do
% %       expt($2,i$);  
% %       newline() od                (*\textrm{Comments will be set flush to the right margin}*)
% % where
% % proc expt($x,n$) $\equiv$
% %   $z:=1$;
% %   do if $n=0$ then exit fi;
% %      do if odd($n$) then exit fi;                 
% %         comment: (*\textrm{This is a comment statement;}*)
% %         $n:=n/2$; $x:=x*x$ od;
% %      { $n>0$ };
% %      $n:=n-1$; $z:=z*x$ od;
% %   print($z$). 
% % end
% % \end{lstlisting}

% % \begin{algorithm}
% % \caption{Calculate $y = x^n$}\label{algo1}
% % \begin{algorithmic}[1]
% % \Require $n \geq 0 \vee x \neq 0$
% % \Ensure $y = x^n$ 
% % \State $y \Leftarrow 1$
% % \If{$n < 0$}\label{algln2}
% %         \State $X \Leftarrow 1 / x$
% %         \State $N \Leftarrow -n$
% % \Else
% %         \State $X \Leftarrow x$
% %         \State $N \Leftarrow n$
% % \EndIf
% % \While{$N \neq 0$}
% %         \If{$N$ is even}
% %             \State $X \Leftarrow X \times X$
% %             \State $N \Leftarrow N / 2$
% %         \Else[$N$ is odd]
% %             \State $y \Leftarrow y \times X$
% %             \State $N \Leftarrow N - 1$
% %         \EndIf
% % \EndWhile
% % \end{algorithmic}
% % \end{algorithm}

% % %%=============================================%%
% % %% For presentation purpose, we have included  %%
% % %% \bigskip command. Please ignore this.       %%
% % %%=============================================%%
% % \bigskip
% % \begin{minipage}{\hsize}%
% % \lstset{frame=single,framexleftmargin=-1pt,framexrightmargin=-17pt,framesep=12pt,linewidth=0.98\textwidth,language=pascal}% Set your language (you can change the language for each code-block optionally)
% % %%% Start your code-block
% % \begin{lstlisting}
% % for i:=maxint to 0 do
% % begin
% % { do nothing }
% % end;
% % Write('Case insensitive ');
% % Write('Pascal keywords.');
% % \end{lstlisting}
% % \end{minipage}

% \section{Cross referencing}\label{sec8}

% Environments such as figure, table, equation and align can have a label
% declared via the \verb+\label{#label}+ command. For figures and table
% environments use the \verb+\label{}+ command inside or just
% below the \verb+\caption{}+ command. You can then use the
% \verb+\ref{#label}+ command to cross-reference them. As an example, consider
% the label declared for Figure~\ref{fig1} which is
% \verb+\label{fig1}+. To cross-reference it, use the command 
% \verb+Figure \ref{fig1}+, for which it comes up as
% ``Figure~\ref{fig1}''. 

% To reference line numbers in an algorithm, consider the label declared for the line number 2 of Algorithm~\ref{algo1} is \verb+\label{algln2}+. To cross-reference it, use the command \verb+\ref{algln2}+ for which it comes up as line~\ref{algln2} of Algorithm~\ref{algo1}.

% \subsection{Details on reference citations}\label{subsec7}

% Standard \LaTeX\ permits only numerical citations. To support both numerical and author-year citations this template uses \verb+natbib+ \LaTeX\ package. For style guidance please refer to the template user manual.

% Here is an example for \verb+\cite{...}+: \cite{bib1}. Another example for \verb+\citep{...}+: \citep{bib2}. For author-year citation mode, \verb+\cite{...}+ prints Jones et al. (1990) and \verb+\citep{...}+ prints (Jones et al., 1990).

% All cited bib entries are printed at the end of this article: \cite{bib3}, \cite{bib4}, \cite{bib5}, \cite{bib6}, \cite{bib7}, \cite{bib8}, \cite{bib9}, \cite{bib10}, \cite{bib11}, \cite{bib12} and \cite{bib13}.


% % \section{Examples for theorem like environments}\label{sec10}

% % For theorem like environments, we require \verb+amsthm+ package. There are three types of predefined theorem styles exists---\verb+thmstyleone+, \verb+thmstyletwo+ and \verb+thmstylethree+ 

% % %%=============================================%%
% % %% For presentation purpose, we have included  %%
% % %% \bigskip command. Please ignore this.       %%
% % %%=============================================%%
% % \bigskip
% \begin{tabular}{|l|p{19pc}|}
% \hline
% \verb+thmstyleone+ & Numbered, theorem head in bold font and theorem text in italic style \\\hline
% \verb+thmstyletwo+ & Numbered, theorem head in roman font and theorem text in italic style \\\hline
% \verb+thmstylethree+ & Numbered, theorem head in bold font and theorem text in roman style \\\hline
% \end{tabular}
% % \bigskip
% % %%=============================================%%
% % %% For presentation purpose, we have included  %%
% % %% \bigskip command. Please ignore this.       %%
% % %%=============================================%%

% % For mathematics journals, theorem styles can be included as shown in the following examples:

% % \begin{theorem}[Theorem subhead]\label{thm1}
% % Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. 
% % Example theorem text. Example theorem text. Example theorem text. Example theorem text. Example theorem text. 
% % Example theorem text. 
% % \end{theorem}

% % Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% % \begin{proposition}
% % Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. 
% % Example proposition text. Example proposition text. Example proposition text. Example proposition text. Example proposition text. 
% % \end{proposition}

% % Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% % \begin{example}
% % Phasellus adipiscing semper elit. Proin fermentum massa
% % ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend
% % at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. 
% % \end{example}

% % Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% % \begin{remark}
% % Phasellus adipiscing semper elit. Proin fermentum massa
% % ac quam. Sed diam turpis, molestie vitae, placerat a, molestie nec, leo. Maecenas lacinia. Nam ipsum ligula, eleifend
% % at, accumsan nec, suscipit a, ipsum. Morbi blandit ligula feugiat magna. Nunc eleifend consequat lorem. 
% % \end{remark}

% % Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% % \begin{definition}[Definition sub head]
% % Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. Example definition text. 
% % \end{definition}

% % Additionally a predefined ``proof'' environment is available: \verb+\begin{proof}+ \verb+...+ \verb+\end{proof}+. This prints a ``Proof'' head in italic font style and the ``body text'' in roman font style with an open square at the end of each proof environment. 

% % \begin{proof}
% % Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. 
% % \end{proof}

% % Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text. Sample body text.

% % \begin{proof}[Proof of Theorem~{\upshape\ref{thm1}}]
% % Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. Example for proof text. 
% % \end{proof}

% % \noindent
% % For a quote environment, use \verb+\begin{quote}...\end{quote}+
% % \begin{quote}
% % Quoted text example. Aliquam porttitor quam a lacus. Praesent vel arcu ut tortor cursus volutpat. In vitae pede quis diam bibendum placerat. Fusce elementum
% % convallis neque. Sed dolor orci, scelerisque ac, dapibus nec, ultricies ut, mi. Duis nec dui quis leo sagittis commodo.
% % \end{quote}

% % Sample body text. Sample body text. Sample body text. Sample body text. Sample body text (refer Figure~\ref{fig1}). Sample body text. Sample body text. Sample body text (refer Table~\ref{tab3}). 

% \section{Methods}\label{sec11}

% Topical subheadings are allowed. Authors must ensure that their Methods section includes adequate experimental and characterization data necessary for others in the field to reproduce their work. Authors are encouraged to include RIIDs where appropriate. 

% \textbf{Ethical approval declarations} (only required where applicable) Any article reporting experiment/s carried out on (i)~live vertebrate (or higher invertebrates), (ii)~humans or (iii)~human samples must include an unambiguous statement within the methods section that meets the following requirements: 

% \begin{enumerate}[1.]
% \item Approval: a statement which confirms that all experimental protocols were approved by a named institutional and/or licensing committee. Please identify the approving body in the methods section

% \item Accordance: a statement explicitly saying that the methods were carried out in accordance with the relevant guidelines and regulations

% \item Informed consent (for experiments involving humans or human tissue samples): include a statement confirming that informed consent was obtained from all participants and/or their legal guardian/s
% \end{enumerate}

% If your manuscript includes potentially identifying patient/participant information, or if it describes human transplantation research, or if it reports results of a clinical trial then  additional information will be required. Please visit (\url{https://www.nature.com/nature-research/editorial-policies}) for Nature Portfolio journals, (\url{https://www.springer.com/gp/authors-editors/journal-author/journal-author-helpdesk/publishing-ethics/14214}) for Springer Nature journals, or (\url{https://www.biomedcentral.com/getpublished/editorial-policies\#ethics+and+consent}) for BMC.

% \section{Discussion}\label{sec12}

% Discussions should be brief and focused. In some disciplines use of Discussion or `Conclusion' is interchangeable. It is not mandatory to use both. Some journals prefer a section `Results and Discussion' followed by a section `Conclusion'. Please refer to Journal-level guidance for any specific requirements. 

% \section{Conclusion}\label{sec13}

% Conclusions may be used to restate your hypothesis or research question, restate your major findings, explain the relevance and the added value of your work, highlight any limitations of your study, describe future directions for research and recommendations. 

% In some disciplines use of Discussion or 'Conclusion' is interchangeable. It is not mandatory to use both. Please refer to Journal-level guidance for any specific requirements. 

% \backmatter

% \bmhead{Supplementary information}

% If your article has accompanying supplementary file/s please state so here. 

% Authors reporting data from electrophoretic gels and blots should supply the full unprocessed scans for key as part of their Supplementary information. This may be requested by the editorial team/s if it is missing.

% Please refer to Journal-level guidance for any specific requirements.

\bmhead{Statements and Declarations}


Authors Contribution: All authors (D. Yan and Z. Fan) contributed to the study conception and design. Material preparation, data collection, and analysis were performed by all authors.  

Funding: This work was supported by the Oregon Manufacturing Innovation Center under grant OMIC2023-R28. The authors declare no competing interests.

% Please refer to Journal-level guidance for any specific requirements.

% \section*{Declarations}

% Some journals require declarations to be submitted in a standardised format. Please check the Instructions for Authors of the journal to which you are submitting to see if you need to complete this section. If yes, your manuscript must contain the following sections under the heading `Declarations':

% \begin{itemize}
% \item Funding
% \item Conflict of interest/Competing interests (check journal-specific guidelines for which heading to use)
% \item Ethics approval and consent to participate
% \item Consent for publication
% \item Data availability 
% \item Materials availability
% \item Code availability 
% \item Author contribution
% \end{itemize}

% \noindent
% If any of the sections are not relevant to your manuscript, please include the heading and write `Not applicable' for that section. 

% %%===================================================%%
% %% For presentation purpose, we have included        %%
% %% \bigskip command. Please ignore this.             %%
% %%===================================================%%
% \bigskip
% \begin{flushleft}%
% Editorial Policies for:

% \bigskip\noindent
% Springer journals and proceedings: \url{https://www.springer.com/gp/editorial-policies}

% \bigskip\noindent
% Nature Portfolio journals: \url{https://www.nature.com/nature-research/editorial-policies}

% \bigskip\noindent
% \textit{Scientific Reports}: \url{https://www.nature.com/srep/journal-policies/editorial-policies}

% \bigskip\noindent
% BMC journals: \url{https://www.biomedcentral.com/getpublished/editorial-policies}
% \end{flushleft}

% \begin{appendices}

% \section{Section title of first appendix}\label{secA1}

% An appendix contains supplementary information that is not an essential part of the text itself but which may be helpful in providing a more comprehensive understanding of the research problem or it is information that is too cumbersome to be included in the body of the paper.

% %%=============================================%%
% %% For submissions to Nature Portfolio Journals %%
% %% please use the heading ``Extended Data''.   %%
% %%=============================================%%

% %%=============================================================%%
% %% Sample for another appendix section			       %%
% %%=============================================================%%

% %% \section{Example of another appendix section}\label{secA2}%
% %% Appendices may be used for helpful, supporting or essential material that would otherwise 
% %% clutter, break up or be distracting to the text. Appendices can consist of sections, figures, 
% %% tables and equations etc.

% \end{appendices}

% %%===========================================================================================%%
% %% If you are submitting to one of the Nature Portfolio journals, using the eJP submission   %%
% %% system, please include the references within the manuscript file itself. You may do this  %%
% %% by copying the reference list from your .bbl file, paste it into the main manuscript .tex %%
% %% file, and delete the associated \verb+\bibliography+ commands.                            %%
% %%===========================================================================================%%

\bibliography{references}% common bib file
%% if required, the content of .bbl file can be included here once bbl is generated
%%\input sn-article.bbl


\end{document}
