To provide an electronic watermark embedding device for improving accuracy
when classified information is being detected. The watermark image
forming section 1006 creates a watermark image based on classified
information 1004 with reference to the document image. For the document
image, embedding regions for embedding a dot pattern which is
identifiable as a prescribed symbol by a prescribed filter are detected,
and a determination is made as to whether or not the proportion of the
text region to the embedding region is less than or equal to a prescribed
threshold value, and if the proportion of the text region is less than or
equal to the prescribed threshold value, a prescribed number of dot
patterns in which a symbol formed of at least a portion of the classified
information is identifiable (symbol unit) is embedded in a region where
the embedding region and the text region do not overlap. Because
classified information is embedded only in regions that do not overlap
with the text region by using the document image as a reference,
embedding of classified information can be ensured regardless of the form
of the original document.