Research Article

A “Tuned” Mask Learnt Approach Based on Gravitational Search Algorithm

Pseudocode 2

Pseudocode of learning the “Tuned” mask based on GSA.
Begin
Input training sample texture images
Set the parameters of GSA and generate initial populations
For each agent (object), generate a “Tuned” mask by using (15) (the position of the agent could be directly used as the
element value of the mask), make convolution with training images and “Tuned” mask, and output the eigenvalues
While (The current iteration t < The maximum iteration T)
Compute the fitness value of each object by using (16)
Update the gravitational variable , and and of the population
Calculate the active gravitational mass , the passive gravitational mass , the inertial mass and the
acceleration for each object
Update velocity and position of each object by using (6)
If (The fitness value of current position is better)
Replace the object by the new position
End if
End while
Output the optimal “Tuned” mask according to (15)
End