Input: the self training set
Output: is the -tree storage of grids, is the line storage of grids
Step . Generate the grid of with diameter 1, and set properties of the gird, including lower sub grids,
  neighbor grids, contained selves, and contained detectors;
Step . Call to divide grids;
Step . Call to find neighbors of each grid.
Algorithm 3: The process of grid generation.