Patent ID: 7280701

Claim:
An image-data processing apparatus for embedding a code into image data, said image-data processing apparatus comprising: a dividing unit that divides the image data into a plurality of blocks; a characteristic-amount extracting unit that extracts a characteristic amount of each of the blocks; and an encoding unit that generates image data into which a code is embedded based on a magnitude relation between characteristic amounts of each pair of two blocks extracted by said characteristic-amount extracting unit, wherein said encoding unit decides whether the magnitude relation between characteristic amounts of the pair of blocks coincides with a code to be embedded, if the magnitude relation between the characteristic amounts of the pair of blocks coincides with the code to be embedded, then said encoding unit maintains the magnitude relation between the characteristic amounts of the pair of blocks extracted by said characteristic amount extracting unit, and if the magnitude relation between the characteristic amounts of the pair of blocks does not coincide with the code to be embedded, then said encoding unit calculates an average of the characteristic amounts of the pair of blocks, calculates respective new characteristic amounts for the pair of blocks by calculating a new characteristic amount for a block having a smaller characteristic amount in the pair of blocks by adding a predetermined value to the average and calculating a new characteristic amount for a block having a larger characteristic amount in the pair of blocks by subtracting a predetermined value from the average, and generates the image data in which the characteristic amount of each block in the pair of blocks is changed to the respective calculated new characteristic amounts.