## 3 Line-Segment Feature Analysis Algorithm for Input Dimensionality Reduction
### Unique Number Matching with LS-Features  
In the second process of the LFA, a unique number matches the extracted line-segment information for the LSMap, as shown in Figure 6. Figure 6a shows the characteristics map extracted from Section 3.1, and Figure 6b,c are filters with a series of parameters. The reason this unique number is provided is to express the information about all the segments (e.g., curves, horizontal lines, and vertical lines) constituting the visual data as numerical information in a series, which makes it easy to combine. Algorithm 2 shows the unique number matching algorithm. K is the filter (the filter of size \(3\times 3\) or \(5\times 5\)), and K\({}_{\rm w}\) and K\({}_{\rm h}\) are the sizes of K. N is the number of LSMap (the number of images). LS is the  
Figure 5: Output data of each feature. (**a**) Original image. (**b**) Point image. (**c**) Line image, (**d**) Face image. data with unique numbers matched. The unique numbers used are 0, 1, 2, 4, 8, 16, 32, 64, and 128 values. Each unique number is not the same, and a different total unique number is drawn. They are similar to a series of values used to convert a binary number to a decimal number in the engineering field. The LFA algorithm utilizes a \(3\times 3\) filter (Figure 6b) with unique numbers for matching with normal line-segment data, and a \(5\times 5\) filter (Figure 6c) with 0 in between unique numbers for extracting data of the distorted line segment. The LSMap is 0 or 1. If the filter with unique numbers matches the LSMap, only the area where the unique number is 1 reacts and is displayed. This, again, emulates the process of converting a binary number to a decimal number in the engineering field. The line-segment data are presented with 1, and a unique number is assigned to each line segment. ```
Input:\(\text{LS}_{\text{Map}}\), \(\text{K}\), \(\text{K}_{\text{w}}\), \(\text{K}_{\text{h}}\) def Unique Number Matching for i from 0 to N do for w from 0 to W-Kw do for h from 0 to H-Kh do for m in 0 to Kw do for n in 0 to Kh do  L(w, h) += LSMap(i,0)(w + m, h + n) \(\times\) K(Kw, Kh))  P(w, h) += LSMap(i,1)(w + m, h + n) \(\times\) K(Kw, Kh))  S(w, h) += LSMap(i,2)(w + m, h + n) \(\times\) K(Kw, Kh)) LS(i) = [L, P, S] Output: LS
```  
**Algorithm 2**Unique Number Matching Algorithm  
Table 1 shows some of the types of normal line-segment data that can be extracted by a \(3\times 3\) filter. Table 1 presents some of the values that can be matched and extracted with the LSMap using a \(3\times 3\) filter. As shown in Table 1, there are basic line types (e.g., point, vertical, horizontal, curved, and diagonal) and additional types, which include an activate area and a non-activate area. In an activate area, all areas in a filter are filled with 1, and all unique numbers 0, 1, 2, 4, 8, 16, 32, 64, and 128 values are found. In a non-activate area, all areas are filled with 0, and no unique numbers are detected. The median value of the \(3\times 3\) filter is filled with zeros. In other words, if the median value of the \(3\times 3\) filter is activated, it is judged to be a non-activate area. Figure 6: Unique number matching process of line-segment feature analysis. The \(5\times 5\) filter has 0 added in between unique numbers of the \(3\times 3\) filter. Since unique numbers are placed in the outermost positions, it is possible to obtain information on distorted line segments. A distorted line-segment technique is used to analyze the activate areas presented in the outer position, and to extract line segments without considering the center value of the \(5\times 5\) filter. Figure 7 shows the process of activating the area extraction using the \(5\times 5\) filter. In Figure 7, (a) is the input data, (b) shows the \(5\times 5\) filter, and (c) is the matched result. As shown in Figure 7, the center of the \(5\times 5\) filter is a black box (consisting of zeros). If input data come in, the 1 located at the center is ignored. In other words, no matter what value is located in the area of the black box, the value is excluded.