The absolute value of the difference between each of the pairs of pixel
values of a target pixel and an upper pixel with respect to the target
pixel, a pixel that is left-adjacent to the target pixel and an upper
pixel with respect to the left-adjacent pixel, the left-adjacent pixel
and a lower pixel with respect to the left-adjacent pixel, a pixel that
is right-adjacent to the target pixel and an upper pixel with respect to
the right-adjacent pixel, and the right-adjacent pixel and a lower pixel
with respect to the right-adjacent pixel is obtained. A "1" is assigned
if the absolute value of the difference is greater than or equal to a
predetermined threshold value whereas a "0" is assigned if the absolute
value of the difference is smaller than the predetermined threshold
value, forming a pattern having six bits in total.