## 3 Bispectrum Analysis of EEG Signals for an Emotion Recognition System
### Feature Extraction Based on Bispectrum Analysis and 3D Pyramid Filter
#### 3.4.2 The 3D Pyramid Filter  
The output of the previous step is one quadrant bispectrum matrix, which is a 64 \(\times\) 64 matrix for each of the 32 EEG channels, equaling a total of 131,072 elements; therefore, the number of elements is too large to be used for calculating the extracted features. To reduce the size of these feature vectors, we have proposed a filtering mechanism by utilizing 3D pyramid shape filters for the bispectrum elements value so that the bispectrum value at the center of the pyramid becomes the most significant value. From the filtered area, one or more statistical properties are derived and calculated as the features-extracted data, which will be described in the next subsection. To find the best filtering mechanism, two filter models are proposed, as shown in Figure 3: the non-overlapping filters with various sizes at the base and the overlapping filters with equal sizes at the base. Figure 2b shows that the bispectrum usually gathers near the center; thus, in this area, the filters are dense and the bases are small. At the higher frequencies, the bispectrum usually has a very low value, so in this area, the filters are sparse, and the bases are large. Therefore, in the non-overlapping filters, we use 5 \(\times\) 5 filters (Figure 3a), with the size of the filter varying (32, 16, 8, 4 and 4) along the \(x\)- and \(y\)-axis. By increasing the number of filters and overlapping the filters, the quantization process is expected to provide a better approximation; we therefore increased the number of filters up to 7 \(\times\) 7 and constructed the filters with overlapping areas at the base (Figure 3b). The size of the bases is 16 \(\times\) 16 equal elements, and there are 50% overlapping areas with the adjacent filters. However, the complexity and the resulting feature vector's size of the 7 \(\times\) 7 filter should be considered as a trade-off. The height of the overlapping and non-overlapping filters in both pyramid models is equal: in this case, it is one. To filter the bispectrum matrix, each selected area was multiplied by the corresponding filter. The filtering process results in several filtered matrices with their respective bispectrum values, and from these filtered bispectrum matrices, the features are calculated and extracted. The pseudocode of the filtering mechanism for the bispectrum matrices is summarized in Algorithm 2 as follows:  
The implementation of the filtering process using the 3D pyramid filters is illustrated in Figure 4. In this example, the effect of 3D pyramid filtering on the bispectrum matrix from the EEG signal of Person 1-Video 1-Channel 1 is shown. The original bispectrum matrix is shown in Figure 4a, and then, one-quarter is extracted, resulting in the 64 \(\times\) 64 matrix shown in Figure 4b. The filtering process began by multiplying this matrix with the constructed 3D pyramid filters, and for this example, we use the 5 \(\times\) 5 non-overlapping filters (Figure 3a). The multiplication process was conducted for each  
Figure 3: Two types of 3D filtering using pyramid models with (a) 5 \(\times\) 5 non-overlap and (b) 7 \(\times\) 7 overlapping filters. area of the matrix according to the size of the pyramid base; for example, the bispectrum matrix region (0:32,0:32) was multiplied by the filter whose base size is 32 \(\times\) 32 and whose height is one. Therefore, for 5 \(\times\) 5 non-overlapping filters, there will be 25 times the filtering process through this multiplication step, and the result is shown in Figure 4c. The calculation of features from the filtered bispectrum matrix is then conducted; in this example, the features are the mean (average) of each filtered bispectrum matrix, and the result is shown in Figure 4d.