A predetermined region set on a grayscale image is divided into rectangles
each having a predetermined size (S706), and piled patterns which hold
the accumulated values of pixel values at identical pixel positions upon
piling up the divided rectangles is generated (S707). An alignment
pattern is generated by calculating the logical sum of respective bit
expression patterns (S708). A peak position which matches the alignment
pattern on the piled patterns best is obtained (S710). The position of
the predetermined region is corrected based on the peak position, and the
predetermined region after correction is divided into rectangles each
having the predetermined size (S711) Patterns in the divided rectangles
are recognized (S712). Embedding information corresponding to each
recognized pattern is specified (S713).