An Image Feature Extraction Algorithm Based on Tissue P System

As digital images continue to generate an increasing amount of data, image feature extraction has become a crucial component of image recognition. This paper proposes an image feature extraction method based on membrane computing to extract image features. The author first uses the rotation invariant local phase quantization (RILPQ) to extract image features and combines the tissue P system with the binary particle swarm optimization (MBPSO) to select the best image features and maximize the classification accuracy. Based on 4 public datasets, 28 datasets are newly constructed, and the proposed method is verified on 28 datasets. Specifically, firstly, local binary pattern (LBP) algorithm and RILPQ are used to extract image features, and then MBPSO, binary particle swarm optimization (BPSO), genetic algorithm (GA) and membrane genetic algorithm (MGA) are used to select the optimal features. The experimental results demonstrate that our proposed image feature extraction method achieves high classification accuracy, stability, and convergence.


Introduction
Due to the rapid development and progress of image processing, information technology, hard-ware facilities, digital images include much data, and image processing and applications are beginning to receive attention.Image feature extraction is a very critical step in image processing.Researchers have proposed many methods for image feature extraction.These algorithms focus on extracting different features of the image and differ in computational complexity.
So far, researchers have used traditional image feature extraction methods and deep learning methods to extract image features.With the rapid improvement in computer hardware performance, Convolutional networks are widely used by researchers in various practical tasks [1][2][3][4], feature extraction algorithms based on deep learning are also rapidly developing.In 2012, the emergence of AiexNet [5] large-scale image recognition has made unprecedented progress.Subsequently, the VGG network framework [6] was used by most researchers to extract image features with its more accurate feature description ability and its ability to reduce computational space.At the same time, excellent network frameworks such as GoogIeNet [7] have also been continuously proposed and applied.Microsoft proposed ResNet [8] in 2015, introducing a framework that addresses the issue of significant feature loss as the network deepens, becoming another major turning point in the field of feature learning.In different fields of computer vision, many excellent network frameworks have emerged according to different research purposes, such [39], robotics [40], medicine [41], etc.In addition, rescuers have introduced a novel bio-inspired framework that combines formal language theory, evolutionary game theory, and membrane computing to investigate behavior propagation in structured populations and study the evolutionary dynamics [42].The latest techniques of evolutionary membrane computing are summarized, their theoretical development and applications are studied, and their advantages and limitations are compared [43].Researchers have proposed a membrane clustering algorithm to address the challenge of automatic clustering.This algorithm utilizes a fully connected tissue membrane system as its computing framework [44].Researchers have explored the application of the Discrete-Time Neural P System (DTNP) in multi-focus image fusion and proposed an area image fusion method according to the DTNP system [45].Researchers have introduced a novel method based on multimodal medical image fusion [46].
The author proposes a novel image feature extraction method based on the tissue P system for image recognition.First, RILPQ is utilized to extract image features.Then, the tissue P system is combined with binary particle swarm optimization (MBPSO) to select the optimal image features.Based on four public datasets, to validate the method, the researchers constructed 28 new datasets.The proposed method underwent comprehensive testing on all 28 constructed datasets and was compared with three other methods.The results demonstrate the feasibility of the proposed algorithm for image feature selection.The findings indicate that the proposed algorithm exhibits stronger robustness and superior performance compared to the other algorithms tested.The rest of this paper is organized as follows: Part 2 introduces the proposed feature extraction and feature selection methods, part 3 introduces the experimental results, and then summarizes this paper in part 4.

Rotation Invariant Local Phase Quantization
The local Phase Quantization algorithm is developed based on the theory of fuzzy invariant feature extraction.It can be used to extract texture features with fuzzy invariance under centrosymmetric blur and has an excellent performance in face recognition and texture classification.Firstly, use the shorttime Fourier transform to process the neighborhood x N of m m * in the image, the local frequency domain F of each pixel x is obtained, where u is the frequency, and the formula is: Then, the Fourier coefficients are calculated by four two-dimensional frequency vectors 1 (a, 0 In vectors, a is a small enough scalar whose value is the reciprocal of m .Therefore, each pixel x will generate a vector, expressed as follows: [ ( , ), ( , ), ( , ), ( , )] In order to get the vector W , we need to separate the real part and imaginary part of x F , as follows: W [Re(F ), Im( )] Finally, quantize the real and imaginary parts of the vector W to obtain an 8-bit binary code, that is: where j W refers to the j-th element of the vector W , ≤ ≤ 1 8 j . The LPQ feature can be obtained by converting binary encoding into decimal, as follows:

LPQ q
(5) To further improve the performance, a RILPQ operator is designed.The algorithm first calculates the typical direction of each pixel in the image and then rotates the local neighborhood of the United States to the typical direction to calculate the LPQ feature, thereby achieving rotation invariance.
RILPQ computes the coefficients on a circle with a frequency of v and a radius of r .In order to preserve the ambiguity invariance, RILPQ only computes the typical direction using the symbolic quantization of the imaginary part, so the typical direction can be obtained by a complex moment of the quantization coefficient: ( ) Where c is the i-th component of the typical direction and y is the corresponding angle.Next, the RILPQ binary descriptor is extracted, but each local neighborhood is rotated to a typical direction before calculation, which can be obtained by the following formula: where ( ) x ξ is the typical direction.Then the image of the rotation θ is represented as: Therefore, after combining LPQ features, RILPQ has both blur and rotation invariance.

Membrane Binary Particle Swarm Feature Selection Algorithm
PSO, inspired by birds' foraging cluster activities, is a heuristic algorithm.Finding the optimal value of the parameter is an NP-hard problem.An enumeration represents the simplest method.which is to calculate all the parameter values at once, which is not practical.Particle swarm optimization algorithm for parameter optimization, first initialize a group of particles, each particle has two attributes of speed and position.The iteration process can be described as the particle changing its speed and position according to the direction of its optimal position ( pbest ) and global optimal position ( gbest ).When the final condition is reached, gbest is the optimal value of the parameter.The velocity formula and position formula are as follows: Where ω is the inertia weight, 1 c and 2 c are learning factors, rand is a random number of [0,1], and t represents the number of iterations.PSO is an algorithm to compute the continuous space matter, and feature selection computes the discrete space matter.BPSO redefines the position formula so that it can solve the feature selection.The position formula of BPSO adds a sigmoid function.The formula is as follows: ( ) Therefore, gbest is a 0 / 1 string, and the feature of 1 in gbest is the final feature to be selected.Figure 1 is the algorithm flow chart of BPSO algorithm for feature selection.The binary particle swarm optimization algorithm is known for its strong search ability in feature selection tasks.However, when dealing with high-dimensional data, the binary PSO algorithm can become computationally complex and time-consuming.Membrane computing can be paralleled.Using tissue membrane computing combined with BPSO for feature selection, the global search ability is strong, which is conducive to jumping out of the global optimum.
The designed membrane binary particle swarm algorithm adopts the membrane structure calculated by tissue membrane, and its structure is shown in Figure 2. The structure of the membrane is formally defined as: ( ) Where: (1) , n is a binary coded string, which represents the j- th particle updated in the t-th iteration of i-th cell.
(2) ( ) represents cells, can be expressed by the multivariate group: , , , is the multiple set of initial objects in the cell, i m is the total number of particles in the cell i σ , i R is the finite set of rules, and the . The rules include particle swarm optimization in the cell and communication rules between cells. (3) , represents the connection between cells.
(4) 0 3 i = , 0 i is the label of the system output cell.As shown in Figure 2, the structure of the designed membrane is composed of three cells.Cell 1 and cell 2 are connected to cell 3 in two directions respectively.The initial object multiple sets in cell 1 and cell 2 are the initial population of BPSO, there is no initial object multiplicity in cell 3.The state of the cells in the population also changes during the iteration process.The rules in cell 1, cell 2, and cell 3 include evolutionary rules and communication rules.The rules are as follows: The evolution rules in cell 1 include the update of the position and velocity of the particles in the cell, and the calculation of the fitness of the particles.The updating formulas of particle velocity and position are shown in equations 9 and 11.The fitness of particles is calculated by the SVM algorithm.The communication rule of cell 1 is that cell 1 transmits the position and fitness value of the binary particle swarm to cell 3.The rules for cell 1 are as follows: ( ) r s w f s w go f go The evolution rules in cell 2 include the position and velocity of the particles in the cell are updated, and involves calculating the fitness of the particles.The update formulas of the particle velocity and position are shown in equations 9 and 11.The fitness of the particles is calculated using the SVM algorithm.The communication rule of cell 2 is that cell 2 transmits the position and fitness value of the binary particle swarm to cell 3.The rules of cell 2 are as follows: : r s w f s w go f go The evolution rule in cell 3 is the comparison of particle fitness, and the communication rule in cell 3 is that cell 3 transmits the position and fitness value of binary particle swarm to cell 1 and cell 2. The rules of cell 3 are as follows: ( ) ( ) r s f w s w go f go Here is the pseudo-code for the algorithm: Begin： 1：Initialize the membrane structure, initialize the velocity and position of each particle in cells 1 and 2, and form the initial object multiple set.2：T = 0 3：while (t<tmax) do 4： for each cell in parallel do 5: According to the rules 11 r and 21 r , the speed and position of each object in cell 1 and 2 are updated, and the fitness value of each object in cell 1 and 2 is calculated.

6:
Update the optimal object of cells 1 and 2.

7:
Transport the optimal object from Cells 1 and 2 to Cell 3 according to 12 r and 22 r .

8:
Update the global optimal object from Cells 1 according to 11 r and 21 r .

9:
According to 31 r and 32 r , the global optimal object in cell 3 is transported to cells 1 and 2.

Dataset
The experiment utilized datasets downloaded from Kaggle, and the specific contents of each dataset are as follows: Flowers Recognition: The pictures have five classes: daisy, tulip, rose, sunflower, and dandelion.
T h e daisy has 764 images, the tulip has 984 images, the rose has 784 images, the sunflower has 733 images, and the dandelion has 1052 images.Flowers Recognition is re-divided into new datasets.The new datasets are shown in Table 1.A Large Scale Fish Dataset: The dataset comprises samples of black sea sprat, gilt head bream, sea bass, striped red mullet, red mullet, horse mackerel, trout, red sea bream, and shrimp images.1000 images each.The authors selected gilt head bream, sea bass, horse mackerel, black sea sprat, striped red mullet, and shrimp images to form new datasets.The new datasets are shown in Table 2. Fruits 360: A dataset of images containing fruits and vegetables, 131 species, and 90483 images.Eight kinds of fruits and five kinds of vegetables were selected from the dataset to form new datasets.The number of images of apple braeburn was 656, the number of images of banana was 656, the number of images of carambula was 656, the number of images of lemon was 656, the number of images of orange was 639, the number of images of pitahaya red was 656, the number of images of strawberry was 656, the number of images of straw was 632, and the number of images of corn was 600.The number of images of ginger root is 396, the number of images of onion red is 600, the number of images of pepper green is 592, and the number of images of potato white is 600.The new datasets are shown in Table 3. ginger root, onion red, pepper green, corn, potato white BIRDS 400 -SPECIES IMAGE CLASSIFICATION: A data set of 400 bird species.Nine kinds of birds were selected to form new datasets for experiments.The number of images of albatross was 133, the number of images of American goldfinch was 133, the number of images of barnowl was 120, the number of images of black-throated sparrow was 168, the number of images of cassowary was 119, the number of images of downy woodpecker was 127, the number of images of emu was 120, and the number of images of hoatzin was 155.The number of images of hoopoes is 125.The new datasets are shown in Table 4.

Parameter Setting
Nine kinds of birds were selected to form a new dataset for experiments.The number of images of albatross was 133, the all experiments were performed on a Windows 10, Intel (R) Core (TM) i7-9700K CPU @ 3.60 GHz workstation and 32 GB memory.

Experimental Results
The LBP and RILPQ algorithms are used to perform preliminary image feature extraction on the above 28 datasets.The extracted image features are employed to compute the best features using the MBPSO algorithm and three algorithms.Table 5 presents the classification accuracy of the algorithms on 28 datasets.From Table 5, we can see that out of the 28 datasets, there are 23 datasets where the classification accuracy of LBP combined with the feature selection algorithm is lower than that of RILPQ combined with the feature selection algorithm.The classification accuracy of the two algorithms on D18 is equal.Only on D3, D19, D20, and D22, the classification accuracy of LBP combined with the feature selection algorithm is greater than that of RILPQ combined with the feature selection algorithm.In addition, it can be seen from the table that the classification accuracy of BPSO and MBPSO is greater than that of GA and MGA on 28 datasets.Except for D2, D10, and D11, the classification accuracy of LBP and RILPQ combined with MBPSO is equal to or higher than that of LBP and RILPQ combined with BPSO.Except for D1, D3, D6, D9, D11, D12, D19, and D25, the classification accuracy of LBP and RILPQ combined with MGA is equal to or higher than that of LBP and RILPQ combined with GA.It can be seen that the performance of RILPQ combined with feature selection algorithm is better than that of LBP combined with feature selection algorithm on 28 datasets, and the performance of RILPQ combined with MBPSO is better than that of RILPQ combined with other three feature selection algorithms.
From the 28 datasets, 8 datasets have been selected for classification tasks, consisting of 4 binary datasets and 4 five-category datasets.Using RILPQ to extract image features from 8 datasets, 4 feature selection methods including MBPSO are used to select the extracted image features, and the number of cycles is 50.Table 6 displays the classification accuracy achieved by the four algorithms, while Figure 3 showcases the highest accuracy achieved by the four algorithms.Table 6 presents the classification accuracies of RILPQ when combined with GA, BPSO, MGA, and MBPSO on D2, D6, D8, D17, D19, D21, D23, and D28 after 50 cycles.The table includes the optimal accuracy (OPA), worst accuracy (WOA), average accuracy (AVA), and standard deviation (STD).Based on the results, it observes that RILPQ-MBPSO has equal or higher optimal accuracy, equal or higher worst accuracy, equal or higher average accuracy, and equal or lower standard deviation compared to other algorithms on the eight datasets.Therefore, compared to GA, BPSO, and MGA,  The optimal classification accuracy of RILPQ when combined with GA, BPSO, MGA, and MBPSO on D2, D6, D8, D17, D19, D21, D23, and D28 for 50 cycles is shown in the Figure 3 above.Based on Figure 3, it is evident that the optimal accuracy of BPSO and MBPSO on the eight datasets is significantly higher than that of GA and MGA.Additionally, on the eight datasets, the optimal accuracy curve of MGA is higher than that of GA.On D8, D17, D19, and D21, the optimal accuracy curve of MBPSO coincides with that of BPSO.In contrast, on D2, D6, D23, and D28, the optimal accuracy curve of MBPSO is above that of BPSO.Based on the results of the eight datasets, MBPSO exhibits the best classification performance, followed by BPSO, MGA, and GA, in descending order.The results demonstrate that MBPSO outperforms BPSO, while MGA performs better than GA.By utilizing membrane computing to enhance the performance of BPSO and GA, it is possible to increase the accuracy and stability of the method.

Discussion
In paper, the researchers introduce the Tissue P system as a method for image feature extraction and propose an image feature selection algorithm based on membrane computing.They design an Organizational P system that utilizes BPSO algorithm as the evolution rule, along with communication rules between cells.To evaluate the result of the proposed algorithm in image feature extraction, experiments are conducted on 28 datasets and compared with three commonly used methods.The results show the practicality and superiority of the proposed algorithm in image feature extraction.The Tissue P system enhances the searchability of the algorithm in the feature space and prevents it from getting stuck in local optima through cell communication.Compared to the other three methods, the proposed algorithm exhibits greater robustness and better performance.However, the proposed algorithm has certain limitations as it does not consider the impact of the fitness function on the model.Future work aims to verify the effects of different fitness functions on the model and investigate methods to increase the model's classification accuracy.

Table 1 .
New datasets for the Flowers Recognition dataset.

Table 2 .
New datasets for the A Large Scale Fish Dataset.

Table 3 .
New datasets for the Fruits 360 dataset.

Table 4 .
New datasets for the BIRDS 400 dataset.

Table 5 .
Classification accuracy of MBPSO and its comparative algorithms on 28 datasets.

Table 6 .
Results of MBPSO and its comparative algorithms after 50 cycles on 8 datasets.