By selecting a two-dimensional sliding template of a certain structure, the pixels in the board are arranged according to the pixel value to form a monotonous decrease or rising twodimensional data sequence and output a value greater than or equal to ( 1) / 2 2 n − pixels.