## 3 Line-Segment Feature Analysis Algorithm for Input Dimensionality Reduction
### Feature Extraction Process for LFA  
Algorithm 1 shows the feature detection algorithm, and Figure 4 shows the feature extraction process of the LFA algorithm, which is the first step of the algorithm. In this process, the features of a point, line, and side of input data are extracted. The original data are classified into points, lines, and faces to detect various characteristics. A line refers to the basic segment information, while a side refers to the original information. A point is information that distorts a segment, and the characteristics are extracted by distorting segments in the subsequent process.  
Figure 4: Feature extraction process of the line-segment feature algorithm (LFA).  
Figure 3: Flow of the line-segment feature analysis algorithm for input dimensionality reduction.  
K\({}_{\rm w}\) and K\({}_{\rm h}\) in Algorithm 1 are the size of the filter, and x is the handwritten text image. W and H are the dimensions of x and \(\bigotimes\) is a convolution operation. n is the number of images, and the data calculated through the filter is LSMap.  
The process of extracting the characteristics of point, line, and faces in the LFA is described in Equations (1)-(5). This algorithm uses PF and LF filters in Equation (1) in order to extract the point, line, and faces features of line segments. Each filter is able to extract the contour, point segment, and face areas of the original data. The convolution (\(\bigotimes\)) of each filter by x, each point, line, and side map is generated (as shown in Equations (2) and (3)). The parameters of LF and PF filter in Equation (1) used and changed the parameters of the Laplacian filter. The LF filter is the Laplacian filter {[(0, -1, 0), {-1, 4, -1}, {0, -1, 0}]}, and the PF is a filter designed by changing some parameters of the Laplacian filter in order to generate distortion, such as points around the contour of an object.  
\[\rm PF=\left[\begin{array}{rrr}1&-1&1\\ -1&1&-1\\ 1&-1&1\end{array}\right],\;LF=\left[\begin{array}{rrr}0&1&0\\ 1&-4&1\\ 0&1&0\end{array}\right] \tag{1}\]  
\[\rm POINT_{map}=x\bigotimes\;PF \tag{2}\]  
\[\rm LINE_{map}=x\bigotimes\;LF \tag{3}\]  
\[\rm SIDE_{map}=x \tag{4}\]  
\[\rm LS_{Map}=\left[POINT_{map},LINE_{map},SIDE_{map}\right] \tag{5}\]  
The features extracted by using the image of the upper case 'L' are shown in Figure 5. Figure 5a shows the original data. When PF is applied to (a), the contour of an area has some distortion, and the point segment as presented in Figure 5b is generated. LF extracts the contour of x. The extracted contour is shown in Figure 5c, and SIDEmap is the application of the original data as is, which is shown in Figure 5d (as shown in Equation (4)). The italic-type number database used in this study is from the Extending Modified National Institute of Standards and Technology (EMNIST) [44], which has binary data as presented in Figure 5a. Therefore, it is possible to obtain side data without any additional work. The features of each segment extracted in this way are bound to generate an LSMap, which is shown in Equation (5). When \(\bigotimes\) in Equations (2) and (3) is executed, stride and padding are 1 value. Therefore, each feature has the same size as the original data, and the converted data are internal data only, which are either 0 or 1.