1. An image processing apparatus, comprising: a wavelet transform unit to perform compression encoding in a hierarchical manner by performing discrete wavelet transform on pixel values for each of one or more rectangular regions dividing image data; a digital watermark obtaining unit to obtain digital watermark data to be embedded into wavelet coefficients generated by the wavelet transform unit; a characteristics extracting unit to extract characteristics of the wavelet coefficients for each of the rectangular regions; an embedding specification determination unit to determine an embedding specification of the digital watermark data with respect to the wavelet coefficients in accordance with the characteristics of the wavelet coefficients for each of the rectangular regions that are extracted by the characteristics extracting unit; and a digital watermark embedding unit to embed into the wavelet coefficients the digital watermark data for each of the rectangular regions in accordance with the embedding specification of each of the rectangular regions determined by the embedding specification determination unit.