Image processor and image processing method6959385
Abstract
To provide a device capable of determining uniquely the direction of rotation applied to an image and extracting digital watermark information correctly even in the case where a registration signal having a symmetric axis is embedded. A device for enabling digital watermark information to be extracted from image data having the digital watermark information embedded therein in such a manner that it can hardly be perceived by human eyes, in which processing for extracting rotation information and position information from the image data is performed plural times for rotation angles different from one another. For extracted position and rotation information, confidence coefficients indicating accuracy thereof are calculated. The position and rotation angle at which the digital watermark information is embedded are determined based on the confidence coefficients.
Claims
1. An image processor comprising:
means for embedding in image data a digital watermark comprising an irrotationally symmetric pattern arrangement and position and rotation information;
rotation information searching means for performing processing for extracting said rotation information from the image data with said digital watermark information embedded therein, for a plurality of rotation angles different from one another;
position information searching means for performing processing for extracting said position information from said image data, for a plurality of start-of-extraction positions different from one another;
calculating means for calculating confidence coefficients indicating the accuracy with which said position and rotation information is extracted, for each information searched by said rotation information searching means and position information searching means and extracted as position and rotation information; and
determining means for determining the position and rotation angle at which said digital watermark information is embedded in said image data, based on the confidence coefficient calculated by said calculating means.
2. The image processor according to claim 1,
wherein said irrotationally symmetric pattern arrangement is a two-dimensional matrix comprising m×n elements.
3. The image processor according to claim 1,
wherein said irrotationally symmetric pattern arrangement is a pattern arrangement for which the positive or negative symbols of corresponding elements are not wholly the same if the patten arrangement is rotated at an arbitrary angle, except for angles of 360 degrees multiplied by an integer number.
4. An image processor capable of extracting digital watermark information from image data in which said digital watermark information including position and rotation information is embedded, comprising:
rotation information searching means for performing processing for extracting said rotation information from the image data with said digital watermark information embedded therein, for a plurality of rotation angles different from one another;
position information searching means for performing processing for extracting said position information from said image data, for a plurality of start-of-extraction positions different from one another;
calculating means for calculating confidence coefficients indicating the accuracy with which said position and rotation information is extracted, for each information searched by said rotation information searching means and position information searching means and extracted as position and rotation information; and
determining means for determining the position and rotation angle at which said digital watermark information is embedded in said image data, based on the confidence coefficient calculated by said calculating means.
5. The image processor according to claim 4,
wherein said digital watermark information includes said position information and rotation information and usage information, and
wherein said usage information includes the ID of a device or the user ID.
6. The image processor according to claim 4,
wherein said digital watermark information includes said position information and rotation information and usage information, and
wherein said usage information includes information for controlling a device.
7. The image processor according to claim 4,
wherein said calculating means calculates confidence coefficients by performing computation of said image data with a matrix comprising m×n coefficients.
8. The image processor according to claim 7,
wherein said matrix computation processing is convolution computation.
9. The image processor according to claim 4, further comprising:
extracting means for extracting the digital watermark information embedded in said image data, based on its position in said image data on the basis of the result of determination by said determining means.
10. An image processing method comprising:
an embedding step of embedding in image data digital watermark information comprising an irrotationally symmetric pattern arrangement, and including position and rotation information;
a rotation information searching step for performing processing for extracting the rotation information from the image data with the digital watermark information embedded therein, for a plurality of rotation angles different from one another;
a position information searching step for performing processing for extracting the position information from the image data, for a plurality of start-of-extraction positions different from one another;
a calculating step for calculating confidence coefficients indicating the accuracy with which the position and rotation information is extracted, for each information searched by said rotation information searching step and said position information searching step and extracted as position and rotation information; and
a determining step for determining the position and rotation angle at which the digital watermark information is embedded in the image data, based on the confidence coefficient calculated by said calculating step.
11. An image processing method of extracting digital watermark information from image data in which the digital watermark information including position and rotation information is embedded, comprising:
a rotation information searching step of performing processing for extracting the rotation information from the image data with the digital watermark information embedded therein, for a plurality of rotation angles different from one another;
a position information searching step of performing processing for extracting the position information from the image data, for a plurality of start-of-extraction positions different from one another;
a calculating step of calculating confidence coefficients indicating the accuracy with which the position and rotation information is extracted, for each information searched in said rotation information searching step and position information searching step and extracted as position and rotation information; and
a determining step of determining the position and rotation angle at which the digital watermark information is embedded in the image data, based on the confidence coefficient calculated in said calculating step.
12. A computer program product embodying a program comprising:
program codes for implementing an image processing method of embedding in image data, digital watermark information comprising an irrotationally symmetric pattern arrangement and position and rotation information;
program codes for a rotation information searching step for performing processing for extracting the rotation information from the image data with the digital watermark information embedded therein, for a plurality of rotation angles different from one another;
program codes for a position information searching step for performing processing for extracting the position information from the image data, for a plurality of start-of-extraction positions different from one another;
program codes for a calculating step for calculating confidence coefficients indicating the accuracy with which the position and rotation information is extracted, for each information searched by the rotation information searching step and position information searching step and extracted as position and rotation information; and
program codes for a determining step for determining the position and rotation angle at which the digital watermark information is embedded in the image data, based on the confidence coefficient calculated by said calculating step.
13. A computer program product embodying a program for implementing an image processing method of extracting digital watermark information from image data in which said digital watermark information including position and rotation information is embedded,
the program comprising:
program codes for a rotation information searching step of performing processing for extracting the rotation information from the image data with the digital watermark information embedded therein, for a plurality of rotation angles different from one another;
program codes for a position information searching step of performing processing for extracting the position information from the image data, for a plurality of start-of-extraction positions different from one another;
program codes for a calculating step of calculating confidence coefficients indicating the accuracy with which the position and rotation information is extracted, for each information searched in the rotation information searching step and position information searching step and extracted as position and rotation information; and
program codes for a determining step of determining the position and rotation angle at which the digital watermark information is embedded in the image data, based on the confidence coefficient calculated in the calculating step.
14. A computer data signal embodied in a propagating wave comprising:
code signals for use in implementing an image processing method of embedding in image data, digital watermark information comprising an irrotationally symmetric pattern arrangement and position and rotation information;
code signals for use in a rotation information searching step for performing processing for extracting the rotation information from the image data with the digital watermark information embedded therein, for a plurality of rotation angles different from one another;
code signals for use in a position information searching step for performing processing for extracting the position information from the image data, for a plurality of start-of-extraction positions different from one another;
code signals for use in a calculating step for calculating confidence coefficients indicating the accuracy with which the position and rotation information is extracted, for each information searched by the rotation information searching step and the position information searching step and extracted as position and rotation information; and
code signals for use in a determining step for determining the position and rotation angle at which the digital watermark information is embedded in the image data, based on the confidence coefficient calculated by the calculating step.
15. A computer data signal embodied in a propagating wave and used for implementing an image processing method of extracting digital watermark information from image data in which the digital watermark information including position and rotation information is embedded comprising:
code signals for use in a rotation information searching step of performing processing for extracting the rotation information from the image data with the digital watermark information embedded therein, for a plurality of rotation angles different from one another;
code signals for use in a position information searching step of performing processing for extracting the position information from the image data, for a plurality of start-of-extraction positions different from one another;
code signals for use in a calculating step of calculating confidence coefficients indicating the accuracy with which the position and rotation information is extracted, for each information searched in the rotation information searching step and the position information searching step and extracted as position and rotation information; and
code signals for use in a determining step of determining the position and rotation angle at which the digital watermark information is embedded in the image data, based on the confidence coefficient calculated in the calculating step.
Description
FIELD OF THE INVENTION
The present invention relates to an image processing method and image processor for creating image data with an digital watermark embedded therein and/or extracting an digital watermark portion from the image data, and a storage medium.
BACKGROUND OF THE INVENTION
In recent years, due to explosive development and widespread of computers and their networks, a variety of information such as character data, image data and voice data have been digitized. Digital information does not undergo degradation due to secular changes and thus can be stored in perfect state permanently, but it can be easily duplicated and therefore the protection of copyright becomes an important issue. For this reason, security technologies for protecting copyright assume greater importance at a rapid pace.
One of techniques for protecting copyright is an "digital watermark". The digital watermark is a technique of embedding the name of a possessor of copyright and the ID of a purchaser in digital image data, voice data, character data and the like in a form imperceptible by persons, and tracking unauthorized use thereof by illegal copying.
The digital watermark may be subjected to variety of attacks. They include, for example, irreversible compression such as JPEG, geometric transformation such as scaling or rotation, printout/scanning and noise attachment.
Here, a process called registration may be used particularly for providing resistance to geometric transformation. Registration is a process of adding a specific signal (registration signal) to an image in addition to added information at the time of embedding the digital watermark, and promoting the extraction of added information using the above described registration signal before added information is extracted, at the time of extracting added information.
Conventionally, the registration signal having a symmetric axis is embedded when an digital watermark is embedded, whereby the image with the digital watermark embedded therein can be subjected to frequency conversion to analyze the scaling and rotation applied to the image.
However, when rotation applied to the image is analyzed, the direction of the rotation applied to the image with the digital watermark embedded therein cannot be uniquely determined due to the symmetry in the amplitude spectrum of the spatial frequency domain.
SUMMARY OF THE INVENTION
The present invention has been made to solve the problems of prior arts described above, and its object is to provide an image processor and an image processing method for embedding a registration signal more appropriately.
For this purpose, the image processor according to the present invention uses an irrotationally symmetric pattern arrangement to embed in image data the digital watermark including position and rotation information.
Also, another image processor of the present invention is an image processor capable of extracting digital watermark information from image data in which the above described digital watermark information including position and rotation information is embedded, comprising:
a rotation information searching means for performing processing for extracting the above described rotation information from the image data with the above described digital watermark information embedded therein, for a plurality of rotation angles different from one another;
a position information searching means for performing processing for extracting the above described position information from the above described image data, for a plurality of start-of-extraction positions different from one another;
a calculating means for calculating confidence coefficients indicating accuracy as to whether the position and rotation information has been extracted, for each information searched by the above described rotation information searching means and position information searching means and extracted as position and rotation information; and
a determining means for determining the position and rotation angle at which the above described digital watermark information is embedded in the above described image data, based on the confidence coefficients calculated by the above described calculating means.
Furthermore, the present invention includes image processing methods, program products and computer data signals, capable of achieving the functions of the image processor.
Other features and advantages of the present invention will be apparent from the following description taken in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the figures thereof.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a block diagram showing a general configuration of an digital watermark embedding apparatus of the preferred embodiment of the present invention;
FIG. 2 is a block diagram showing a general configuration of an digital watermark extracting apparatus of the preferred embodiment of the present invention;
FIG. 3 shows one example of image data generated at the extraction side in print-system processing;
FIG. 4 is a block diagram showing a detailed configuration of registration a signal embedding unit of the preferred embodiment of the present invention;
FIG. 5 is a view for illustrating registration signals of the preferred embodiment of the present invention;
FIG. 6 shows a detailed configuration of a confidence distance computing unit;
FIG. 7 is a block diagram showing a details of a scale matching unit of the preferred embodiment of the present invention;
FIGS. 8A and 8B illustrate the extraction of the registration signal of the preferred embodiment of the present invention;
FIG. 9 shows a pattern arrangement that is used when added information is embedded and is extracted by the preferred embodiment of the present invention;
FIG. 10 is a block diagram showing a details of an added information embedding unit of the preferred embodiment of the present invention;
FIG. 11 is a block diagram showing a details of the embedment position determining unit in the preferred embodiment of the present invention;
FIG. 12 shows occurrence frequency distribution of a blue noise mask (a cone mask);
FIG. 13 is an illustration of spatial frequency properties of the visual sense of human beings;
FIGS. 14A and 14B show spatial frequency properties of the blue noise mask and the cone mask;
FIG. 15 is a simple illustrative view of a position reference mask of the preferred embodiment of the present invention;
FIG. 16 is a conceptual view showing the embedment position in the position reference mask;
FIGS. 17A and 17B show each pattern arrangement being developed on the mask shown in FIG. 16;
FIGS. 18A and 18B show operations of embedding repeatedly the minimum embedment unit of added information Inf in the entire image of the preferred embodiment of the present invention;
FIG. 19 illustrates computation for embedding added information Inf of the preferred embodiment of the present invention;
FIG. 20 illustrates an added information extracting unit of the preferred embodiment of the present invention;
FIG. 21 illustrates added information Inf being extracted by the preferred embodiment of the present invention;
FIG. 22 shows extraction being performed despite absence of added information Inf of the preferred embodiment of the present invention;
FIG. 23 shows ideal occurrence frequency distribution when a confidence distance d is extracted from an original image;
FIG. 24 shows the case where the confidence distance d is extracted from the image in which an digital watermark is embedded;
FIG. 25 illustrates an example of the occurrence frequency distribution of the confidence distances d1, d2 of the preferred embodiment of the present invention;
FIG. 26 illustrates the principle of the embedment and extraction of the registration signal of the preferred embodiment of the present invention;
FIGS. 27A to 27C show a concept for retrieval of a leading position of embedment of the preferred embodiment of the present invention;
FIG. 28 is a flowchart illustrating registration processing of the preferred embodiment of the present invention;
FIG. 29 is a block diagram showing a configuration of another embodiment of a registration signal embedding unit in a spatial domain;
FIG. 30 illustrates two sets in a patchwork method of the preferred embodiment of the present invention;
FIG. 31 is a flowchart for illustrating a total control of a digital watermark embedding apparatus of the preferred embodiment of the present invention;
FIG. 32 is a flowchart for illustrating a total control of an digital watermark extracting apparatus of the preferred embodiment of the present invention;
FIGS. 33A and 33B show an example of a pattern arrangement orthogonal to the pattern shown in FIG. 9;
FIG. 34 illustrates an "orthogonal" pattern arrangement;
FIGS. 35A and 35B show first and second position reference masks of the preferred embodiment of the present invention;
FIG. 36 shows a configuration of added information Inf of the preferred embodiment of the present invention;
FIG. 37 shows one example of each coefficient of the blue noise mask of the preferred embodiment of the present invention;
FIG. 38 shows one example of each coefficient of the cone mask of the preferred embodiment of the present invention;
FIG. 39 shows chromaticity spatial number properties of the visual sense of human beings;
FIG. 40 shows a minimum coding unit in a JPEG mode;
FIG. 41 shows sampling of brightness and color-difference signals in the JPEG mode;
FIG. 42 shows positive and negative operational areas (patches) of the pattern arrangement;
FIG. 43 shows correspondences between the gray scale expressed by the area gray scale and the gray scale expressed by the gray-level gray scale of the preferred embodiment of the present invention;
FIG. 44 shows a principle of gray scale information propagating before and after processing of conversion of gray scales of the preferred embodiment of the present invention;
FIGS. 45A and 45B illustrate a difference in halftone processing of a printer depending on resolutions of images;
FIG. 46 illustrates changes in ink dots depending on the embedment of the patch;
FIG. 47 illustrates an increase in ink dots depending on the size and depth of the patch according to a preferred embodiment of the present invention;
FIGS. 48A and 48B show a difference in pattern arrangement units between the positive patch and the negative patch, depending on the difference in resolutions of images;
FIGS. 49A to 49D show pattern arrangements for embedding added information Inf corresponding to each resolution of the image in the preferred embodiment of the present invention;
FIGS. 50A and 50B show shifts of impulse signals of amplitude spectra by scaling in the preferred embodiment of the present invention;
FIGS. 51A and 51B show shifts of impulse signals of amplitude spectra by rotation in the preferred embodiment of the present invention;
FIG. 52 shows the pattern arrangement and an area of overlapping patches of the rotated pattern arrangement in the preferred embodiment of the present invention; and
FIG. 53 shows relationship between a rotation angle ψ and the area of the shaded portion in FIG. 52 in the preferred embodiment of the present invention.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Preferred embodiments of this invention will be illustratively described in detail below, referring to the drawings. However, the relative placement of components, values, formulae and the like described in these embodiments are not intended to limit thereto the scope of this invention.
<First Embodiment>
[1. Overview of Digital Watermark Embedding Apparatus]
First, the outline of an digital watermark embedding apparatus will be described as a preferred embodiment of the present invention, referring to FIG. 1. FIG. 1 is a block diagram showing a general configuration of the digital watermark embedding apparatus.
As shown in FIG. 1, the digital watermark embedding apparatus includes a color component extracting unit 0101, a registration signal embedding unit 0102, a pattern arrangement determining unit 0110, an embedment position determining unit 0103, an added information embedding unit 0104, a color component synthesizing unit 0105, a JPEG compressing and encoding unit 0106, a memory 0107, a JPEG expanding and decoding unit 0108 and a printer 0109.
Image data I is inputted in this digital watermark embedding apparatus. The image data I that is inputted is multi-valued image data to which a predetermined plurality of bits is assigned to one pixel. Furthermore, in this embodiment, image data I that is inputted, whether it is gray scale image data or color image data, can be adapted.
The gray scale image data is configured such that one type of components constitute one pixel, and the color image data is configured such that three types of components constitute one pixel. In this embodiment, these three types of components are a red color component (R), a green color component (G) and a blue color component (B). However, the present invention is applicable to a combination of other color components.
The image data I inputted in the digital watermark embedding apparatus is first inputted in the color component extracting unit 0101. In the case where the inputted image data I is color image data, only the blue color component is separated from this image data by the color component extracting unit 0101, and is outputted to the registration signal embedding unit 0102 in the subsequent stage.
On the other hand, other color components are outputted to the color component synthesizing unit 0105 in the subsequent stage. That is, at this time, only the color component to which digital watermark information is to be embedded is separated and sent to an digital watermark processing system.
In this embodiment, embedment of digital watermark information is performed for the blue color component. This is due to the fact that of the red color, blue color and green color components, the blue color component is the most insensitive to the visual sense of human beings. Thus, the embedding of digital watermark information in the blue color component is effective in making degradation of image quality due to digital watermark information less perceptible by human eyes, compared to the embedding of digital watermark information of other components.
Also, in the case where the inputted image data I is gray scale image data, the color component extracting unit 0101 transforms the gray scale image data into pseudo color image data on a temporary basis.
The pseudo color cited herein is color image data configured such that three types components constitute one pixel, but in this embodiment, it is image data with the values of three types of components (R, G, B) being equal to one another.
The gray scale image data is transformed into the aforesaid pseudo color image data, and the blue color component (B) in this color image data is extracted and outputted to the registration signal embedding unit 0102.
On the other hand, other color components are outputted to the color component synthesizing unit 0105. In this way, as in the case of the color image data described above, digital watermark information is embedded in only the blue color component, not in all the color components.
Furthermore, in the following description, explanation will be presented such that cases where the image data I is color image data and cases where the image data I is gray scale data are not distinguished where possible. That is, explanation will be presented such that color image data and pseudo color image data are not distinguished.
The registration signal embedding unit 0102 will be described. The registration signal is a signal required for carrying out geometric correction as preprocessing for extraction of digital watermark information.
Image data of the blue color component obtained with the color component extracting unit 0101 is inputted in the registration signal embedding unit 0102. The registration signal embedding unit 0102 embeds the registration signal in image data using a type of digital watermark technique. That is, in the image data in which the registration signal is embedded, the registration signal is not perceptible by the visual sense of human beings. The registration signal embedding unit 0102 outputs the image data in which the registration signal is embedded.
The pattern arrangement determining unit 0110 determines a pattern arrangement for embedding digital watermark information (added information) based on the resolution of the image expressed by image data to be inputted and the output resolution from the printer so that digital watermark information (added information) is adequately extracted (detected) even if the gray-level gray scale is changed to the area gray scale when the image data in which digital watermark information is embedded is printed with the printer 0109.
Furthermore, the resolution of the image is defined as the number of pixels per inch of the image (bit map image) in the case of printing this image in predetermined size. Thus, in the case of printing an image in a predetermined size, as the number of pixels of the image is increased, the resolution of the image is enhanced. As a unit for expressing the resolution of images, pixel/inch is used.
Also, the output resolution of the printer represents the number of dots per inch printed on a print medium by the printer. As the number of dots per inch printed by the printer is increased, the resolution of the printer is enhanced.
The pattern arrangement determining unit 0110 outputs to the embedment position determining unit 0103 the pattern arrangement selected from a plurality thereof, along with the inputted image data. The embedment position determining unit 0103 determines an embedment position of added information Inf in the image data in which the registration signal is embedded. The embedment position determining unit 0103 also outputs to the added data information embedding unit 0104 control data expressing a position at which added information Inf is embedded in the image, along with the inputted data and the pattern arrangement.
The added information embedding unit 0104 inputs added information Inf (a plurality of bit information) in addition to the aforesaid image data, pattern arrangement and control data. This added information Inf is embedded at the afore said determined embedment position in the image data of the blue color using an digital watermark technique. The image data in which added information Inf is outputted by the added information embedding unit 0104, and is inputted in the color component synthesizing unit 0105.
The color component synthesizing unit 0105 uses the blue color component processed by the previous stages (up to added information embedding unit 0104) and the red color and green color components inputted directly from the color component extracting unit 0101 to synthesize a form of normal color image data.
The color image data obtained by the color component synthesizing unit 0105 is then outputted to the JPEG compressing and encoding unit 0106. The JPEG compressing and encoding unit 0106 transforms color image data comprised of the inputted red color, blue color and green color components into color image data comprised of the brightness and color different components to perform JPEG compression and coding.
JPEG compressed data compressed by the JPEG compressing and encoding unit 0106 is stored in the memory 0107 on a temporary basis. Then the JPEG compressed data is read from this memory at the timing when it is sent to an external apparatus or it is printed, and is outputted to the JPEG expanding and decoding unit 0108. The JPEG expanding and decoding unit 0108 expands the aforesaid JPEG compressed data and outputs it as color image data.
The color image data wI outputted from the JPEG expanding and decoding unit 0108 is inputted in the printer 0109. The printer 0109 transforms the inputted color image data into color components of CMYK, and subjects it to halftone processing, followed by outputting it as a printed matter pwI on a print medium such as paper.
Furthermore, there is a possibility that this printed matter pwI is passed to a person other than the user of this apparatus and is subjected to attacks such as geometric manipulation including rotation or copying with a copying machine. Assume that the aforesaid printed matter that could possibly be distorted is a printed matter pwI′. This printed matter pwI′ will be digitized again using a scanner 0201 shown in FIG. 2.
A general control of the digital watermark embedding apparatus of this embodiment comprising each unit described above will be described below, referring to a flowchart shown in FIG. 31.
First, in Step 3102, image data I is inputted in the color component extracting unit 0101. This also includes a process of reading photographs and printed matters with a scanner or the like to generate image data. Furthermore, the color component extracting unit 0101 separates the blue color component from the inputted image data I to use the same as input of the registration signal of the subsequent stage.
Then, the registration signal is generated in Step 3103, and this registration signal is embedded in Step 3104. This registration signal embedment processing in Step 3104 corresponds to the processing that is performed within the registration signal embedding unit 0102 shown in FIG. 1.
In Step 3111, a pattern arrangement is determined by the pattern arrangement determining unit 0110. The pattern arrangement is used for embedding added information, in accordance with the output resolution of the printer 0109 and the resolution of the image.
Furthermore, a mask is created in Step 3105, and the mask created in Step 3105 is inputted in a mask referring unit in Step 3106 to define relationship between embedment bit information and the embedment position. In step 3107, the pattern arrangement determined in Step 3111 is inputted, and the mask is extended to an extended mask referring also to this pattern arrangement.
In Step 3108, added information Inf is embedded in the image data in which the registration signal is embedded in steps 3103 and 3104. In this added information embedment processing, added information Inf is repeatedly embedded in the entire image in units of macro blocks. This processing will be described in detail with FIG. 10 described later. Here, the macro block refers to a minimum embedded unit, and all the information of one integral added information Inf is embedded in an image area corresponding to this macro block.
In step 3109, the data in which added information inf is embedded is subjected to JPEG compression and coding and stored in the memory 0107, and is further subjected to JPEG expansion and decoding, and is then outputted as the printed matter pwI from the printer 0109.
[2. Digital Watermark Extracting Apparatus]
Now, the outline of the digital watermark extracting apparatus in this embodiment will be described referring to FIG. 2. FIG. 2 is a block diagram showing a general configuration of the digital watermark extracting apparatus in this embodiment.
As shown in FIG. 2, the digital watermark extracting apparatus of this embodiment is comprised of the scanner 0201, a color component extracting unit 0202, a registration unit 0203 and an added information extracting unit 0204. First, the printed matter pwI′ is set on a manuscript stage of the digital watermark extracting apparatus, and the scanner 0201 scans this printed matter pwI′, whereby digitized image data wI′ is generated. As described above, there is a possibility that the pwI′ is different from the printed matter pwI in FIG. 1.
The image data wI′ has experienced attacks causing a variety of geometric distortions to the image data wI. Attacks include scaling, rotation, printing & scanning and the like, but in the case of this embodiment, attacks involving at least one-time printing & scanning. Therefore, ideally, the image data wI′ and wI are identical with each other in contents, but in fact these two image data are often significantly different in contents from each other.
Thus, the color component extracting unit 0202 inputs image data wI′ and extracts the blue color component, followed by outputting the image data of the blue color component to the registration unit 0203 in the subsequent stage. The red color and green color components other than the blue color in the image data wI′ are not required, and are thus discarded at this time.
Image data wI1′ of the blue color component obtained by the color component extracting unit 0202 is inputted by the registration unit 0203. Then this image data wI1′ of the blue color is used to generate image data wI2′ with geometric distortions corrected.
While the image data wI′ may have a scale and rotation different from those of the image data wI as described above, the image data wI2′ is always identical in scale to the image data wI. A reason for this and detailed processing for making the image data wI2′ identical to the image data wI in scale will be described later.
The added information extracting unit 0204 is subjected to predetermined processing adapted for the embedment mode in the added information embedding unit 0103, whereby added information Inf embedded in the image data wI2′ can be extracted and the embedded added information Inf is outputted.
The general control of the digital watermark extracting apparatus of this embodiment comprising each configuration described above will be described referring to the flowchart shown in FIG. 32.
First, in Step 3202, image data wI′ is inputted. This image data wI′ is obtained by scanning image data that is presumably the printed matter pwI with the scanner. Generally, the image data wI′ is significantly different from the image data wI. Also, only the blue color component of this image data wI′ is extracted and is used in the next step.
In next Step 3203, the scale of the inputted image data wI1′ of the blue color component is corrected, whereby it is corrected to a rotation angle with possibility of extraction. This affine transformation correction processing is a processing that is carried out in the registration unit 0203 in FIG. 2, and detailed description thereof will be presented later.
In next step 3211, a scaling rate outputted from step 3203 is used to determine the pattern arrangement used for embedding added information Inf. Then, in Step 3204, the rotation angle of the inputted image data wI1′ of the blue color component is corrected, and the offset thereof is corrected too.
Extraction processing using a first pattern arrangement is performed in Step 3206 and extraction processing using a second pattern arrangement is performed in Step 3205, and thus form the image data wI2′ with scale, rotation and offset already corrected is extracted the added information Inf embedded therein, respectively.
In Statistical testing step 3207, correctness of the aforesaid extracted added information Inf is calculated and determined. If it is determined in this Statistical testing step 3207 that the added information Inf is not correct, a return to Step 3202 is made, and an image in which the added information Inf is presumably embedded is inputted again.
On the other hand, if it is determined in the Statistical testing step 3207 that the added information Inf is correct, advancement to Step 3208 is made, and the added information Inf is extracted. Also, in Step 3210, information indicating the aforesaid correctness is displayed as a reliability index D described later.
Pattern arrangement determination processing, offset alignment processing, extraction processing using the first pattern arrangement, extraction processing using the second pattern arrangement, statistical testing processing and comparison processing as described above are processes that are performed within the added information extracting unit 0203 in FIG. 2, and detailed description thereof will be presented later.
[3. Detailed Description of Each Part]
Each part of this embodiment of which outline has been described will be now described in detail. First, the registration unit 0203 at the extracted side of the digital watermark, and processing called registration that is performed in Step 3203 will be described.
The registration processing is preprocessing allowing added information Inf to be extracted from image data wI′ inputted in the digital watermark extracting apparatus at the time of extracting digital watermark information. Generally, the term "registration processing" not only means the affine transformation processing but also implicates position alignment processing and the like.
In this embodiment, however, the position alignment processing uses position information embedded as part of added information Inf, and is preformed in the added information extracting unit 0204.
In the following, first, how the image data subjected to processing of the print-system changes will be considered. Then, registration processing for such changes will be examined, and registration processing on the print-system will be considered.
This embodiment in which the image data wI is printed by a YMCK ink jet printer and this printed matter is scanned with a scanner is discussed.
At this time, in the case where the output resolution from the printer and the input resolution from the scanner are different from each other, the scale of the original image data wI is different from that of the image data wI′ obtained through scanning. Thus, the possibility that digital watermark information can be correctly extracted directly from the obtained image data wI′ is low. Therefore, it is necessary to provide a unit capable of correcting a difference between these scales.
In this embodiment, since both the input resolution and output resolution are known, a scale ratio can be calculated from the ratio between these resolutions. For example, if the output resolution is 600 dpi and the input resolution is 300 dpi, the scale ratio of the image before printing to the image after scanning is 1:2. Thus, scaling is applied to the image data wI′ using an appropriate scaling algorithm, in accordance with the calculated scale ratio. This enables the image sizes expressed by the image data wI and the image data wI′ to be adjusted to the same scale.
However, input and output resolutions are not necessarily known in all cases. In a case where both the resolutions are not known, the above described method cannot be used. In this case, in addition to a unit for correcting difference in scales, a unit for determining the scale ratio is further required.
Also, an image with the image data wI subjected to processing of the print-system will be an image as shown in FIG. 3 after it is inputted through scanning of the scanner. In FIG. 3, the whole of 0301 is an image expressed by the image data wI′. This image data 0301 is comprised of an original image 0302 expressed by the image data wI and a white margin 0303. A margin like this, if cut by a user using a mouse and the like, results in incorrectness. Position alignment processing for position misalignment caused by scanning is performed through offset alignment processing in added information extraction processing 0204.
Also, if meticulous attention is not paid, rotation is applied to the original image 0302 shown in FIG. 3. Thus, in order that the digital watermark can be extracted irrespective of placement, it is necessary to provide a unit for knowing a rotation angle in addition to a unit for correcting the rotation applied to the image, as in the case of scaling. Determination and correction of the rotation angle are performed by registration processing and offset matching processing.
It can be considered that a problem like this is inevitably occurs for the image data wI′ obtained through the print-system or the read-system. In the case where the image data wI is subjected to processing of the print-system, these problems should be solved.
Up to this point, cases where image data is obtained through at least onetime processing of the print-system before the digital watermark is extracted have been described, but a state like this can also occur from man-made edition.
[3-1. Registration Signal Embedment Processing]
The registration signal embedding unit and the registration unit in this embodiment provided for solving the above described problems which arise due to the difference in scale and the rotation will be described below, assuming that the ratio between input and output resolutions is unknown.
First, the registration signal embedding unit 0102 (Step 3104) will be described in detail.
The registration signal embedding unit 0102 is situated more to the front than the added information embedding unit 0104. This unit 0102 embeds in the original image data, in advance the registration signal referred to the registration of the image data wI′ in the registration unit in FIG. 2. This registration signal is embedded in image data (the blue color component of color image data in the case of this embodiment) so that it is less perceptible by human eyes as digital watermark information.
(First Typical Example of the Embedding Unit)
An internal configuration of the registration signal embedding unit 0102 is shown in FIG. 4. The registration signal embedding unit 0102 includes a block dividing unit 0401, a Fourier transforming unit 0402, an adding unit 0403, an inverse Fourier transforming unit 0404 and a block synthesizing unit 0405. Details of each unit will be described below.
The block dividing unit 0401 divides inputted image data into a plurality of blocks that does not overlap one another. The size of this block is defined as a power of 2 in this embodiment. In fact, sizes other than this are applicable, but in the case where the size of the block is a power of 2, high-speed processing can be performed in the Fourier transforming unit 0402 that is coupled to the rear of the block dividing unit 0401.
Blocks divided by the block dividing unit 0401 are grouped into sets I1 and I2, and of these, I1 is inputted in the Fourier transforming unit 0402 in the subsequent stage, and I2 is inputted in the block synthesizing unit 0405 in the subsequent stage.
In this embodiment, one block situated nearest the center in the image data I is selected as I1 out of the blocks obtained by the block dividing unit 0401, and all the remaining blocks are selected as I2.
This is due to the fact that this embodiment can be achieved by using at least one block, and the less the number of blocks, the more process time can be reduced. However, the present invention should not be limited to this, but as a matter of course, cases where two or more blocks are selected as I1 are also included in the category.
Also, information as to sizes in which image data is divided into blocks, and which blocks are selected for embedment of the registration signal is shared by the digital watermark embedding apparatus and the digital watermark extracting apparatus.
Part of image data I1 obtained through dividing by the block dividing unit 0401 is inputted in the Fourier transforming unit 0402.
The Fourier transforming unit 0402 transforms the inputted image data I1 by a Fourier transformation. While the original data form of the inputted image data i1 is called a spatial domain, the data form after it is subjected to Fourier transformation is called a frequency domain. Fourier transformation is applied all the inputted blocks.
Furthermore, in this embodiment, since the size of the block to be inputted is a power of 2, fast Fourier transformation is used for enhancing the speed of processing.
While Fourier transformation requires a computation amount of n×n times, the fast Fourier transformation is a transformation algorithm that can be executed by a computation amount of (n/2) log2 (n) times. Here, n is a positive integer. Fast Fourier transformation and Fourier transformation are different from each other in only the speed for obtaining results of computation, and the same result is obtained from the both. Therefore, in this embodiment, fast Fourier transformation and Fourier transformation are not distinguished in the present explanation.
Furthermore, image data in the frequency domain obtained by Fourier transformation is represented by amplitude spectra and phase spectra. Of these, only the amplitude spectra are inputted in the adding unit 0403. On the other hand, the phase spectra are inputted in the inverse Fourier transforming unit 0404.
The adding unit 0403 will be described. In the adding unit 0403, a signal r called a registration signal is separately inputted along with the aforesaid amplitude spectra. Examples of registration signals include an impulse signal 0502, 0503, 0504, and 0505 as shown in FIG. 5.
In FIG. 5, the amplitude spectra of two dimensional spatial frequency components obtained through Fourier transformation are shown. The central one is a low frequency component and peripheral ones are high frequency components. 0501 is the amplitude spectrum of the signal component possessed by the original image component, and for signals corresponding to natural images such as photos, a large number of large signals are concentrated in the low frequency domain . On the other hand, few signals exist in the high frequency domain.
Furthermore, in this embodiment, explanation is presented assuming that natural images are subjected to a series of processing, but the present invention should not be limited thereto, and document images, CG images and the like may be processed in a similar way. However, the form of this embodiment is especially effective in the case of processing natural images having a relatively large quantity of medium concentration.
FIG. 5 shows one example of this embodiment in which impulse signals 0502, 0503, 0504 and 0505 are added to lateral and vertical Nyquist frequency components of signals in the frequency domain for the signal 0501 that the natural image originally possesses. As in the case of this example, the registration signal is preferably a impulsive signal. This is because only the registration signal is easily extracted in the digital watermark extracting apparatus described later.
In the example shown in FIG. 5, impulse signals are added to Nyquist frequency components of input signals, but the present invention should not be limited thereto. That is, those signals where the registration signal is not removed even if an image in which the digital watermark information is embedded is attacked, may be accepted. As described above, an irreversible compression system such as JPEG compression has a low-pass filter like effect. Therefore, there is a possibility that even though the impulse signal is embedded in the high frequency component being a subject of information compression here, the signal is removed through compression/expansion processing.
On the other hand, embedment of the impulse in the low frequency component has a disadvantage in that the signal is more perceptible as noise due to visual characteristics of human beings, compared to embedment in the high frequency domain. Thus, in this embodiment, the impulse signal is embedded in a medium frequency, a first frequency or higher where the signal is hardly perceptible by the visual sense of human beings and a second frequency or lower where the signal is not easily removed through irreversible compression/expansion processing.
Also, this registration signal is added to each block (one block in the case of this embodiment) inputted in the adding unit 0403. The adding unit 0403 outputs to the inverse Fourier transforming unit 0404 a signal with the registration signal added to the amplitude spectrum of image data in the frequency domain.
The inverse Fourier transforming unit 0404 subjects the inputted image data in the frequency domain to inverse Fourier transformation. This Fourier transformation is applied to all the inputted blocks. As in the case of the above described Fourier transforming unit 0402, since the size of the inputted block is a power of 2, fast Fourier transformation is used for enhancing the speed of processing. The signal in the frequency inputted in the inverse Fourier transforming unit 0404 is transformed into a signal in the spatial domain through the inverse Fourier transformation, and is outputted.
The image data in the spatial domain, which is outputted by the inverse Fourier transforming unit 0404 is inputted in a block coupling unit 0405. The block coupling unit 0405 performs processing opposite to dividing performed by the block dividing unit 0405. As a consequence of processing by the block coupling unit 0405, image data (blue color component) is reconstructed and outputted.
Up to this point, details of the first typical example of the registration signal embedding unit 0102 have been described.
(Second Typical Example of the Embedding Unit)
A system in which the registration signal is embedded in the Fourier transformation area has been described with FIG. 4. But the present invention should not be limited to this example, and on the other hand, a system in which the registration signal is embedded in the spatial domain can also be considered. As a second typical example, an alternative example in which embedment of signals is performed in the spatial domain like this will be described using FIG. 29.
As shown in FIG. 29, a block dividing unit 2901, an adding unit 2902, block synthesizing unit 2903 and an inverse Fourier transforming unit 2904 are used, in order to achieve a system in which the registration signal is embedded in the spatial domain.
The block dividing unit 2901 and the block synthesizing unit 2903 operate as in the case of the block dividing unit 0401 and the block synthesizing unit 0405 in FIG. 4. Image data that is inputted in the registration signal embedding unit 0102 is first inputted in the block dividing unit 2901, and is split. Blocks obtained here are inputted in the adding unit 2902. On the other hand, the registration signal r is inputted in the inverse Fourier transforming unit 2904, and is transformed into a signal r′ by through inverse Fourier transformation processing. At this time, the registration signal r′ is a signal on the frequency domain as in the case of those shown in FIG. 5.
Blocks from the block dividing unit 2901 and the signal r′ from the inverse Fourier transforming unit 2904 are inputted in the adding unit 2902, and are added respectively. The signal outputted from the adding unit 2902 is inputted in the block synthesizing unit 2903, and image data (blue color component) is reconstructed and outputted.
The configuration shown in FIG. 29 is to perform processing as in the case of FIG. 4 in the spatial domain, but is capable of performing more speedy processing because it requires no Fourier transforming unit, compared to the configuration in FIG. 4.
Furthermore, in FIG. 29, the signal r′ is a signal independent of input image data I. Therefore, calculation of r′, namely processing by inverse Fourier transforming unit 2904 does not need to be carried out each time the image data I is inputted, and r′ can be generated in advance. Registration processing of referencing this registration signal will be described later.
<<Patchwork Method>>
In this embodiment, a principle called a patchwork method is used for embedment of added information Inf. Thus, first, the principle of the patchwork method for use in this embodiment will be described.
In the patchwork method, images are biased statistically, thereby achieving embedment of added information Inf. This will be described using FIG. 30. In FIG. 30, 3001 and 3002 refer to subsets, respectively, and 3003 refers to the whole image. Two subsets, A3001 and B3002 are selected from the whole image 3003.
Selection of these two subsets allows embedment of added information Inf to be achieved through the patchwork method in this embodiment, if they do not overlap one another. However, the size and selection of these subsets have a significant influence on the resistance of added information Inf embedded through this patchwork method, namely strength such that the added information is not lost when image data wI is attacked. This will be described later.
Now, assume that the subsets A and B are sets constituted by N elements expressed by A={a1, a2, . . . , aN} and B={b1, b2, . . . , bN}, respectively. Each element, ai, bi of the subset A and the subset B is a image value or a set of image values. In this embodiment, they correspond to part of the blue color component in color image data.
At this time, the following index d is defined.
This shows an expected value of a difference between image values of two sets.
Selecting appropriate subsets A and B and defining an index d for a general natural image results in d≈0. Hereinafter, d is called a confidence distance.
On the other hand, as an operation of embedding each bit constituting added information Inf, an operation of is performed. This is an operation of adding c to all the elements of the subset A and subtracting c from all the elements of the subset B.
At this time, in a manner similar to the previous case, subsets A and B are selected from an image in which added information Inf is embedded, and an index d is calculated. Then the result is which is not 0.
That is, when a certain image is given, the confidence distance d is calculated for the image, whereby it can be determined that added information Inf is not embedded if d≈0, while it can be determined that added information Inf is embedded if d is a value different from 0 by a certain amount. Basic concept has been described up to this point.
In this embodiment, information of a plurality of bits is embedded, applying the principle of this patchwork method. In this method, a method of selecting subsets A and B is defined by the pattern arrangement.
In the aforesaid method, elements of the pattern arrangement are added to and subtracted from predetermined elements of the original image, thereby achieving embedment of added information Inf.
An example of a simple pattern arrangement is shown in FIG. 9. FIG. 9 shows a pattern arrangement showing the amount of changes in pixel values from the original image in the case of referring to 8×8 pixels for embedding one bit. As in FIG. 9, the pattern arrangement is comprised of arrangement elements having positive values, arrangement elements having negative values and arrangement elements having values of 0.
In the pattern of FIG. 9, positions shown by arrangement elements of +c represent positions for increasing by c the pixel value at the corresponding position, and are positions corresponding to the aforesaid subset A. On the other hand, positions shown by arrangement elements of -c represent positions for decreasing by c the pixel value at the corresponding position, and are positions corresponding to the aforesaid subset B. Also, positions shown by 0 represent positions other than those of the subsets A and B.
In this embodiment, the number of arrangement elements having positive values and the number of arrangement elements having negative values is the same in order that the general concentration of the image is not changed. That is, the sum of all arrangement elements results in 0 in one pattern arrangement. Furthermore, this condition is essential at the time of operation of extracting added information Inf as described later.
Operation of embedding each bit constituting added information is performed using a pattern arrangement as described above.
In this embodiment, the pattern of FIG. 9 is placed several times in areas different from one another in the original image to increase/decrease the pixel value, thereby embedding bid information, namely added information Inf. In other words, not only a combination of a subset A and a set B, but also a plurality of combinations like a subset A′ and a set B′, a subset A" and a set B" . . . is assumed in areas of one image that are different form one another, thereby embedding added information constituted by a plurality of bits.
Furthermore, in this embodiment, added information Inf is repeatedly embedded in the case where the original image is large. This is due to the fact that quantity large enough for statistical nature to appear is required because the patchwork method uses statistical nature.
Also, in this embodiment, in order that areas for which the pixel value is changed using the pattern arrangement do not overlap one another when a plurality of bits are embedded, relative positions at which the pattern arrangement is used are predetermined among mutual bits. That is, relationship between the position of the pattern arrangement for embedding first bit information constituting added information Inf and the position of the pattern arrangement for embedding second bit information is appropriately defined.
For example, if added information Inf is constituted by 16 bits, the positional relationship among respective 8×8 pixel pattern arrangements of first to sixteenth bits is provided in a relative manner so that degradation of image quality is reduced on an area having a size larger than 32×32 pixels.
Furthermore, in the case of large image data, the aforesaid added information Inf (each bit information constituting this) is embedded in repetition as many times as possible. Its purpose is to enable each bit of added information Inf to be extracted correctly. Particularly in this embodiment, since statistical measurement taking advantage of the same added information Inf being embedded in repetition is performed, the aforesaid repetition is important.
Selection of the embedment position as described above is carried out by the position determining unit 0103 in FIG. 1.
Next, how to determine the above-described subsets A and B will be described.
[3-2. Pattern Arrangement Determining Unit]
Now, how to determine the subset A and the subset B in this embodiment will be described.
In the patchwork method, how to determine the subset A and the subset B strongly affects attack resistance of added information Inf and the quality of the image in which the added information Inf is embedded.
In this embodiment, image data wI in which added information Inf is embedded and which is subjected to JPEG compression and expansion is print-outputted by the printer in FIG. 1 and is inputted by the scanner 0201 in FIG. 2 before becoming image data wI. Various attacks including print and scanning are applied to the image data wI during processes for obtaining the wI.
What should be done in order that added information Inf embedded through the patchwork method in this embodiment has resistance to attacks will be discussed below.
In the patchwork method, the shape of the pattern arrangement and the scale of values of elements represent parameters for determining a tradeoff between the embedment strength of added information Inf and the image quality of the image data wI. Therefore, as for whether added information Inf can be extracted after applying the aforesaid attacks, optimization can be achieved by manipulating these parameters. For this, more detailed description will be presented.
In this embodiment, the fundamental positional relationship between an element ai of the subset A and an element bi of the subset B in the patchwork is fixed by a matrix for which one example is shown in FIG. 9. Furthermore, the elements ai and bi are not limited to one pixel value, but may be a set of a plurality of pixel values, respectively.
A plurality of the pattern arrangements are assigned in the image such that they do not overlap one another, and each assigned pixel in this image is changed in accordance with the value of the element of the pattern arrangement.
If the subset of pixels for which the image is changed to positive values (+c) of the pattern arrangement is A, and the subset of pixels for which the image is changed to negative values (-c) of the pattern arrangement is B, then it can be understood that the patchwork method is applied.
Furthermore, in the following description, a group of pixels having positive values (+c) of the pattern arrangement (corresponding to the position of the element ai of the subset) is called a positive patch, and a group of pixels having negative values (-c) (corresponding to the position of the element bi of the subset) is called a negative patch.
Hereinafter, there may be cases where the positive and negative patches are indiscriminately used, but the patch in that case refers to the positive patch and negative patch or any one of them.
If the size of each patch of the pattern arrangement for which one example is shown in FIG. 9 is increased, the resistance to added information Inf is enhanced, and the image after the added information Inf is embedded therein is significantly degraded in terms of image quality compared to the original image, because the value of the confidence distance d in the patchwork method becomes larger.
On the other hand, if the scale of the value of each element of the pattern arrangement is decreased, the resistance to added information Inf is reduced, and the image after the added information Inf is embedded therein is not so much degraded in terms of image quality, compared to the original image.
In this way, optimization of the scale of the pattern arrangement shown in FIG. 9 and the scale of the value of elements (±c) of patches constituting this pattern is very important for the resistance of image data wI and the image quality.
First, the size of the patch will be considered. The resistance to added information Inf embedded through the patchwork method is enhanced if the size of the patch is increased, while the resistance to added information Inf embedded through the patchwork method is reduced if the size of the patch is decreased. This is due to the fact that irreversible compression and the print-system have a low pass filter-like effect throughout processing.
The signal biased for embedding added information Inf is embedded as a signal of the low frequency component if the size of the patch is increased, while the signal biased for embedding added information Inf is embedded as a signal of the high frequency component if the size of the patch is decreased.
There is a possibility that the added information Inf embedded as a signal of the high frequency component is subjected to processing of the print-system, thereby being subjected to low pass filter-like processing and erased. On the other hand, it is likely that the added information Inf embedded as a signal of the low frequency component is not erased and can be extracted even though it is subjected to processing of the print-system.
From the above, in order that added information Inf has resistance to attacks, a larger size of the patch is more desirable. However, increasing the size of the patch means adding a signal of the low frequency component to the original image, which leads to increased degradation of image quality in image data wI. This is because visual properties of human beings have properties of VTF as shown by 1301 of FIG. 13. As is apparent from 1301 of FIG. 13, the visual property of human beings is relatively sensitive to noises of the low frequency component, but is relatively insensitive to noises of the high frequency component. Therefore, it is desired that the size of the patch be optimized for determining the strength of added information Inf embedded through the patchwork method and the image quality in image data wI.
Now, values of the patch (±c) will be considered.
Assume that the value of each element (±c) constituting the patch is called "depth". The resistance of added information Inf embedded through the patchwork method is increased if the depth of the patch is increased, while the resistance of added information Inf embedded through the patchwork method is reduced if the depth of the patch is decreased.
The depth of the patch is closely associated with the confidence distance d that is used when added information Inf is extracted. The confidence distance d is an operational value for extracting added information Inf, and this will be described in detail in the section of extraction processing, but in general, the confidence distance d is increased, making it easier to extract added information Inf if the depth of the patch is increased. On the other hand, if the depth of the patch is decreased, the confidence distance d is reduced, making it more difficult to extract added information Inf.
From the above, the depth of the patch is also an important parameter for determining the strength of added information Inf and the quality of the image in which the added information Inf is embedded, and it is desirably optimized for use. The optimized size and depth of the patch is always used, thereby making it possible to achieve embedment of added information Inf such that resistance to irreversible compression and attacks such as print is retained, and degradation of image quality is reduced.
Now, the depth and size of a specific patch for use in this embodiment will be described. To simplify the following discussion, processing in the print-system is also simplified. Conversion of gray scales by halftone processing will be considered as an example of processing in the print-system.
The halftone processing is to change a method of expressing gray scales as described above. The visual sense of human beings perceives the gray scale similarly before and after the halftone processing. However, an inputting unit such as a scanner does not have ambiguous perception like that of human beings, and does not necessarily perceive the gray scale similarly before and after the halftone processing.
That is, the scanner does not recognize by itself whether the gray scale expressed by the area gray scale really has gray scale information expressed by the gray-level gray scale.
Then, what halftone processing enables the area gray scale to express the gray scale expressed by the gray-level gray scale will be discussed. First, relationship in terms of gray scale expression between the gray-level gray scale and the area gray scale by halftone processing will be considered.
An example of relationship between a dither matrix of 4×4 and the gray scale that can be expressed by the matrix is shown in FIG. 43. FIG. 43 shows the gray scale in which the matrix is expressed by the area gray scale, and the gray scale expressed by the matrix is indicated by the number below.
There exist 16 pixels in the 4×4 matrix. 4×4+1=17 gray scales can be expressed by on/off of these 16 pixels. Generally, m×n dots subjected to halftone processing can express (m×n+1) gray scales.
This will be described using an example of FIG. 44. In FIG. 44, assume that a pixel 4403 is expressed by the gray-level gray scale having 0 to 16 dynamic ranges and its value is 8. Four pixels having the same value as that of this pixel are arranged vertically and laterally respectively to generate a block 4402 having a size of 4×4.
The generated block is subjected to halftone processing using an appropriate dither matrix having a size of 4×4 to generate binary data 4403. This binary-valued data is sent to the printer and outputted. Then, it is inputted again at same resolution as output resolution of the printer through an image inputting unit such as the scanner. At this time, assuming that the ratio between the output resolution of dots of the printer and the input resolution at which the scanner reads the pixel is 1:1, the pixel outputted by the printer and inputted by the scanner equals the binary data 4403.
The image data generated in this way is binary data 4404. By a method using interpolation processing appropriate to the binary data 4404, the binary data is scaled down through scaling to 1/(4×4) of its original, and multivalued data 4405 is generated. The value of this multivalued data is 8. Furthermore, in the case where the scanner does not have such a high resolution that the binary data 4403 can be determined as the binary data 4404, the binary data 4403 is optically transformed into the multivalued data 4405.
Up to this point, the state in which gray scale information expressed by the gray-level gray scale is transformed into the area gray scale, and after that, when it is expressed by the gray-level gray scale again, the gray scale information is correctly propagated has been described using FIG. 44. Generally, halftone processing is performed using the area gray scale in which one pixel expressed by m×n pixels, and interpolation processing where binary data of these m×n pixels is rendered as one pixel, whereby gray scale information is propagated.
For this embodiment, in order to provide resistance to attacks including print and scanning, the size and depth of the patch for use in embedment of added information Inf is designed considering the aforesaid relationship between the area gray scale and the gray-level gray scale. Furthermore, for this embodiment, cases where images of various sizes are outputted in a predetermined size by the printer are discussed.
FIGS. 45A and 45B show a case where two images 4501 and 4504 different in resolution from each other are outputted in dimensions 4503 and 4506 identical in size to each other by the printer. FIGS. 45A and B show a series of processing where the resolution of the image is low and where the resolution of the image is high, respectively.
First, the images 4501 and 4505 are subjected to scale-up processing so that one pixel corresponds to one dot. For a scale-up method at this time, interpolation such as a nearest neighbor method is used. Furthermore, the nearest neighbor method is a method in which scale-up is performed by copying the same pixel values to neighboring pixels (In the case where the image has very high resolution, scale-down (thinning-out) can be also considered). As a result thereof, the images 4501 and 4504 are scaled up to the images 4502 and 4505, respectively. Thereafter, they are expressed by dots as printed matters such as 4503 and 4506 (image data for printing) through halftone processing.
For actual processing in the printer, CMYK conversion processing, color matching and the like are performed, but they are omitted here to simplify description.
From FIGS. 45A and 45B, that can be understood that as the resolution of the image decreased, one image can be expressed by a increased number of dots, and as the resolution of the image is increased, one image must be expressed by a decreased number of dots.
Now, it will be shown that influence of embedment by the patch is transmitted also in the case of conversion from the gray-level gray scale to the area gray scale. Furthermore, influence by the resolution of the image is not taken into consideration here for making description easily understood.
4601 and 4605 of FIG. 46 are image areas (subset A) operating with the positive patch in the case of embedding added information Inf in an image, and represent states before halftone processing. 4603 and 4606 of FIG. 46 are image areas (subset B) operating with the negative patch in the case of embedding added information Inf in an image, and represent states before halftone processing.
4601 and 4603 of FIG. 46 show cases where embedment of added information Inf by the patch has not been performed, and 4605 and 4607 show cases where embedment of added information Inf by the patch has been performed.
Also, at this time, 4601, 4603, 4605 and 4607 all correspond to one pixel and one dot just before halftone processing is applied.
Through halftone processing, images shown by 4601, 4603, 4605 and 4607 of FIG. 46 are expressed by dots as area gray scales, as in the case of 4602, 4604, 4606 and 4608.
It can be said that in the case where embedment of added information Inf has not been performed, a difference in the number of ink dots between 4602 and 4604 is generally small. In the case where the image is large and an averaged difference in ink dots is calculated for each patch, it is almost 0.
On the other hand, it can be considered that in the case where embedment of added information Inf has been performed, a difference in the number of ink dots between 4606 and 4608 comes to appear.
Also in the case where added information Inf is expressed by the area gray scale, increase and decrease in ink dots can be controlled through the design of the patch. It can be said that the patchwork method is capable of giving resistance to attacks from print and scanning.
Also, from FIG. 46, it can be intuitively imagined that the number of ink dots increases if the area in which the patch is embedded is increased, and the number of ink dots increases if the depth of the patch is increased.
Relationship between the patch and increase in ink dots will be described using FIG. 47. FIG. 47 is a drawing showing variation in ink dots depending on the size and depth of the patch. In FIG. 47, the lateral axis represents coefficient values of the dither matrix for subjecting to halftone processing the subset A or the subset B with one pixel scaled up to one dot, and the vertical axis represents the occurrence frequency of coefficient values of the dither matrix. At the same time, to make description easily understood, the averaged pixel vales of the subset A or the subset B with one pixel scaled up to one dot, which is subjected to halftone processing are shown in the lateral axis.
As shown in FIG. 47, it may be thought that generally coefficient values of the dither matrix have almost no biased values and the occurrence frequencies are almost the same for a large subset A or subset B.
It can be understood that assuming that the averaged pixel value 4703 before embedment is changed to the averaged pixel value 4704 after embedment through the embedment of added information Inf, only the slanted-line portion 4702 has the number of ink dots increased with binary formation processing of the dither matrix.
That is, it can be understood that there is proportionality between the depth of the patch and an increase in ink dots. Also, in the case where the size of the patch is increased, the area of the sloped-line portion 4702 increases in the direction of occurrence frequency because the occurrence frequency of coefficient values of the dither matrix is further increased, and thus it can be understood that there is also proportionality between the depth of the patch and an increase in ink dots.
Considering the properties described above, for a entire image, (1) the depth of embedment is proportional to the number of dots on a printed matter. (2) The size of the patch is proportional to the number of dots on a printed matter.
That is, assuming that a difference in the number of dots for the entire image between the area in which positive patches for the entire image are embedded and the area in which negative patches are embedded for the entire image, which is varied through embedment of the patch, is Δβ, Δβ is expressed by:
α is a proportionality constant, γ is a margin, C is a depth of embedment, and PA is an area corresponding to one pixel and one image of the positive or negative patch for the entire image. Where, α, and γ are numbers determined by experiments.
Furthermore, the principle of this (Equation 47-1) is applicable because the aforesaid (1) and (2) hold not only in halftone processing by the dither matrix but also in an error spreading method.
In the (Equation 47-1), the resolution of the image, the output resolution of the printer and the input resolution of the scanner are not considered. Cases where the resolution of the image, the output resolution of the printer and the input resolution of the scanner are different will be discussed below.
In this embodiment, the input resolution of the scanner is fixed at 600 ppi, which is enough resolution for a flat bed scanner, in order to retain a maximum amount of information.
Now, the output resolution of the printer and the resolution of the image will be considered.
As already described with FIG. 45, in the case where the image is printed, the number of dots expressing one pixel is determined by the resolution of the image. One example will be presented below.
Assume that in FIG. 45A, the image 4501 is an image that has 1000×800 pixels, for example. If this image is printed with a printer having output resolution of 1200 dpi in both the main scanning direction and the sub scanning direction so that the length of the long side is not more than 5 inches, scale-up processing is performed just before halftone processing so that one pixel is rendered as one dot, and the number of output dots of the long side is made to be 1200 dpi×5=6000 dot.
Thus, the image 4501 is scaled up to the image 4502 having 6000×4800 pixels. In the case where the gray scale of 4501 is reproduced from the image 4503 subjected to halftone processing, one pixel is expressed by 6×6 dots.
On the other hand, assume that the image 4504 in FIG. 45B is an image having 3000×2400 pixels. If this image is outputted in a same way with a printer having resolution of 1200 dpi such that the length of the longer edge is no more than 5 inch, it is scaled up to the image 4505 having 6000×4800 pixels in a similar way so that one pixel equals one dot, and then becomes the image 4506 subjected to halftone processing. One pixel of the image 4504 is expressed by 2×2 dots.
Because it can be considered that the gray level of the ink dot is already fixed, the dynamic range of the gray-level gray scale that can be expressed with one pixel is large in the case where one pixel is expressed by 5×5 dots. On the other hand, in the case where one pixel is expressed by 2×2 dots, the dynamic range of the gray-level gray scale that can be expressed with one pixel is small.
As will be described in detail in added information extraction processing, for the patchwork method, (sum of pixel values of the area in which positive patches are embedded)-(sum of pixel values of the area in which negative patches are embedded) is calculated in each pattern arrangement unit when detection is performed, and an average value for each pattern arrangement is determined for the whole image. This average value is called a confidence distance d, and the larger this confidence distance, the more reliably added information can be extracted.
FIG. 48 graphically shows a difference between positive and negative patch areas in a pattern arrangement. FIG. 48A shows the case of low resolution, in which a reference numeral 4801 denotes a positive patch area and a reference numeral 4802 denotes a negative patch are, and FIG. 48B shows the case of high resolution, in which a reference numeral 4803 denotes a positive patch area and a reference numeral 4804 denotes a negative patch area.
Furthermore, since the ink dot has a fixed gray level per dot, the confidence distance d has a dynamic range including large values in the case of 4801 and 4802 because one pixel is constituted by a large number of ink dots. On the other hand, in the case of 4803 and 4804, the confidence distance d does not have a dynamic range including large values because one pixel is expressed by a small number of ink dots.
Generally, in the case where one pixel is constituted by a small number of dots (the resolution of the image is high), there may be cases where a large confidence distance d can not be obtained, thus making it impossible to extract added information Inf, because the dynamic range of the gray scale which one pixel has is small.
Therefore, in the case where the resolution of the image is high, it is necessary to enlarge the area of the patch or increase the depth of embedment (±c). Generally, it is preferable that the area of the patch is enlarged, because positional displacements rise a problem during high-resolution output.
Assuming that the number of dots required for detecting added information per pattern arrangement is Δβp and the number of pixels of the positive or negative patch is P, from (Equation 47-1), the relationship between a depth of embedment of the patch C and the number of dots expressing one pixel, m×n is expressed by:
Here, (m×n)×(C/255) shows that the number of dots increases by only m×n for one dot at the maximum even when the depth of embedment C is changed through up to maximum 255 gray scales. Also, α and γ denote a proportionality constant and a margin respectively.
Furthermore, the number of dots m×n for reproducing one pixel can be determined by m×n=(output resolution of printer in main scanning direction/resolution of image)×(output resolution of printer in sub scanning direction/resolution of image), and m×n decreases as the resolution of the image is increased.
Thus, α and γ are determined by experiments, and then the depth of embedment per pattern arrangement, and the size (size of pattern arrangement) and embedment depth of the patch that are required for detecting added information Inf can be determined from the output resolution of the printer and the resolution of the image.
Based upon the aforesaid considerations, a method of changing embedment depth (±c) and the size of the patch in accordance with the resolution of the image will be proposed.
An unit using this method will be specifically described below.
The output resolution of the printer and the resolution of the image are inputted in the pattern arrangement determining unit 0110 in FIG. 1, and a pattern arrangement suitable for extraction of added information is outputted.
As one example, the case is considered where the output resolution of the printer is 1200 dpi, and the image is outputted by printing in such a way that the length of the longer edge is about 6 inches. Assume that there are images with resolution in the range of 300 ppi to 600 ppi (with the longer edge having 1800 to 3600 pixels) for the image.
Assume that with the pattern arrangement for use in embedment of added information Inf being dependent on the resolution of the image, the pattern arrangement 4901 in FIG. 49A is used in the case where the resolution of the image is less than 500 ppi, and the pattern arrangement 4903 in FIG. 49B is used in the case where the resolution of the image is 500 ppi or greater. Assume also that the embedment depth can be appropriately determined using (Equation 47-2).
The pattern arrangement is appropriately determined by the pattern arrangement determining unit 0110 in this way, and the embodiment position determining unit 0103 on the next stage determines the position of embedment, based on the size of the pattern arrangement inputted from the pattern arrangement determining unit 0110. Furthermore, the added information embedding unit 0104 performs embedment of added information Inf in the image in accordance with the position of embedment of the pattern arrangement inputted from the embedment position determining unit 0103.
On the other hand, extraction of added information Inf cannot be performed unless the pattern arrangement used for embedment is known. Hence, the resolution of the image is determined from the scaling rate outputted by the registration unit 0203, using a pattern arrangement determining unit 2001.
In the case where the output resolution of the printer is fixed, the pattern arrangement used for embedment can be determined by the pattern arrangement determining unit 2001 if the resolution of the image is known from the scaling rate.
Thus, even in the case where the patch and pattern arrangement can be varied depending on the resolution of the image, information obtained from the registration signal is used, thereby enabling added information Inf to be extracted.
Furthermore, in this embodiment, as for the pattern arrangement, an irrotationally symmetric pattern arrangement is used.
As will be described in detail in registration processing described later, for an impulse signal having a symmetric axis, it is generally impossible to determine uniquely a rotation angle applied to the image because the signal has frequency symmetry.
Thus, in this embodiment, for determining a correct rotation angle, the irrotationally symmetric pattern arrangement is used to determine a rotation angle applied to the image.
FIG. 52 shows a state in which a 6×6 pattern arrangement 5201 and a pattern arrangement 5202 obtained by rotating the pattern arrangement 5201 are made to overlap each other, in this embodiment. Reference numeral 5203 in FIG. 52 denotes a positive patch area, and reference numeral 5204 denotes a negative patch area. Shaded areas 5205 and 5206 in FIG. 52 show portions in which negative or positive symbols of the coefficients of the pattern arrangement 5201 and the pattern arrangement 5202 are the same.
FIG. 53 is a graph showing a relationship between the rotation angle ψ and the area of shaded areas 5203 and 5204, in this embodiment. This graph shows that in the case where a pattern arrangement as shown in FIG. 52 is used, a maximum confidence distance cannot be obtained unless the pattern arrangement used for embedment is used to perform extraction by the patchwork method.
That is, if an irrotationally symmetric pattern arrangement is used, the rotation angle can be uniquely determined by obtaining a rotation angle that results in a maximum confidence distance.
Here, coefficients for use in the pattern arrangement are not limited to constant values ±c, considering that coefficients are variable in accordance with image characteristics such as aforementioned resolution of an image. So, coefficients are not essential components in the irrotationally symmetric pattern arrangement.
The irrotationally symmetric pattern arrangement is a "pattern arrangement in which the positive or negative symbols of each corresponding elements are not wholly the same if for the pattern arrangement and a pattern arrangement obtained by rotating the pattern arrangement at an arbitrary angle (except for 0° and 360°), each elements are corresponded to each other in such a manner that they overlap each other at the center".
Furthermore, in this embodiment, only start bits are used for determining a rotation angle θ. Therefore, for embedment of added information (usage information) other than start bits, a pattern arrangement that is not irrotationally symmetric may be used. However, information of the pattern arrangement used for embedment should be shared by the digital watermark embedding apparatus and the digital watermark extracting apparatus.
Start bits and added information will be described in detail in next embedment position determination processing.
[3-3. Embedment Position Determination Processing]
FIG. 11 is a block diagram showing a detailed configuration of the embedment position determining unit 0103 of this embodiment. The mask creating unit 1101 shown in FIG. 11 creates a mask for defining the position of embedment of each bit information constituting added information Inf. The mask is a matrix comprising of position information defining a method of relative placement of the pattern arrangement corresponding to each bit information (See FIG. 9).
One example of the mask is shown by 1701 in FIG. 17A. A coefficient is assigned in the mask on each-by-each basis, and each coefficient has equal occurrence frequency in the mask. In the case where this mask is used, added information Inf of up to 16 bits can be embedded.
Then, the mask referencing unit 1102 reads the mask created by the mask creating unit 1101, and corresponds each coefficient of the mask to how-manieth bit information is each information to determine a method of placing the pattern arrangement for embedment of each bit information.
Furthermore, a mask/pattern arrangement corresponding unit 1103 deploys in the position of each coefficient in the mask the arrangement element of each pattern arrangement (for example, 8×8 size) inputted from 0110 in the previous stage. That is, each coefficient of the mask shown by 1701 in FIG. 17A (one square) is increased in scale by a factor of 8×8 as shown by 1703 in FIG. 17B, so that it can be referred to as the position of embedment of each pattern arrangement.
The added information embedding unit 0104 described later embeds each bit information using the pattern size, referring to an embedment front-end coordinate 1702 shown in FIG. 17B.
Furthermore, in this embodiment, the aforesaid mask is created each time image data (blue color component) is inputted in the mask creating unit 1101. Thus, in the case where image data of large size is inputted, same added information Inf is repeatedly embedded several times.
In the aforesaid method, the configuration of the aforesaid mask (arrangement of the coefficient) serves as a key when added information Inf is extracted from the image. That is, there is an advantage that only a possessor of the key can extract information.
Furthermore, in this embodiment, cases where a mask created in advance is stored in an internal storing unit of the mask creating unit 1101 or the like and it is called as necessary, without creating the mask in real time, are included in the category. In this case, quick shift toward following processing is possible.
Details of each processing performed in the embedment position determining unit 0103 will be now described.
[3-3-1. Mask Creating Unit]
First, the mask creating unit 1101 will be described.
In the case where in embedment of added information Inf using the patchwork method, information is embedded with a significant process applied to the pixel value in order to enhance resistance to attacks (for example, in the case where the value of c of the pattern arrangement is defined to be large), degradation of image quality is less noticeable for a so called edge portion with a rapid change in pixel values in the image expressed by original image data, but for the plane portion with less change in pixel values, the portion in which the pixel value is processed is noticeable as noise.
Spatial frequency properties perceived by human eyes are shown in FIG. 13. The lateral axis represents the spatial frequency (Radial frequency), and the vertical axis represents the response value of visual senses. It is understood from FIG. 13 that when information is embedded with pixel values manipulated, degradation of image quality is noticeable in the low frequency domain that can be sensitively perceived by human eyes.
Thus, in this embodiment, considering properties of blue noise masks and cone masks that are usually used in processing of making multi-valued images to be binary ones, arrangement of the pattern corresponding to each bit is performed.
Now, properties of blue noise masks and cone masks will be briefly described. First, the property of the blue noise mask will be described. The blue noise mask has the property of developing into a blue noise pattern irrespective of the threshold value with which binary formation is performed. This blue noise pattern is a pattern having a frequency property of the spatial frequency being heavily distributed in the high frequency domain.
Part of a blue noise mask is shown in FIG. 37. Also, a schematic diagram of the spatial frequency property of the blue noise mask made to be binary with a threshold of 10 is shown in 1401 of FIG. 14.
The lateral axis of 1401 represents the radial frequency, which shows a distance from a origin (direct-flow component) when the blue noise mask is subjected to Fourier transformation. The vertical axis represents a power spectrum, which is a value determined by calculating the sum of the square of an amplitude component positioned at the distance indicated by the lateral axis (radial frequency) and then obtaining the average value thereof. Furthermore, this figure shows a two-dimensional frequency property of an image with one-dimensional graphical representation to aid in visual understandings.
Making a comparison with FIG. 13, it is understood that the blue noise mask has high frequency components heavily distributed, and thus is less perceptive to human eyes. Therefore, for an inkjet printer and the like, blue noise is used when a gray scale of a multi-valued image is expressed by an area gray scale using dots, whereby spatial frequency components can be heavily distributed in the high frequency domain to express the area gray scale without being perceived prominently by human eyes.
One example of processes of generating the blue noise mask will be shown below. 1. A white noise is generated. 2. A binary image Pgl of a gray scale g (the initial value is a white noise mask) is subjected to low pass filtering to generate a multi-valued image Pgl. 3. The image of the gray scale g (initial value: 127) is compared with the low pass filtering image Pgl (multi-valued), and the black-and-white image of the binary image Pg is reversed in decreasing order of error to obtain a binary image Pgl+1. 4. The processes 2 and 3 are repeated until the error reaches a minimum, the binary image Pgl (the initial value is a white noise mask) is gradually changed to the binary image Pg (blue noise mask) of the gray scale g (initial value: 127). 5. Binary black (white) points of the gray scale g+1(g-1) are given to the Pg image on random positions. The aforesaid processes 2, 3 are repeated to obtain Pg+1 (Pg-1).
The aforesaid processes are repeated, whereby blue noise masks at all gray scales are created to generate a dither matrix.
For example, for 32×32 blue noise masks, four points are increased (decreased) for each gray scale. At this time, however, since the black (white) bit determined at the previous gray scale g cannot be reverted so as to give 256 gray scales, limiting conditions are stricter in low or high gray scales, thus rising a disadvantage that only random patterns of poor uniformity can be obtained.
The occurrence frequency distribution (histogram) 1201 of each coefficient constituting the blue noise mask is shown in FIG. 12. In FIG. 12, all values (coefficients) of 0 to 255 exist in the mask in equal numbers.
The aforesaid techniques of using the blue noise mask for making multi-valued images to be binary are well known, and is disclosed in detail in, for example, "J. Opt. Soc. Am A/Vol. 9, No. 11/November 1992 Digital halftoning technique using a blue-noise mask Tehophano Mitsa, Kevin J. Parker".
Properties of cone masks will be now described. For one thing, the cone mask is characterized in that when each coefficient included in this mask is made to be binary, periodic or pseudo periodic peaks are produced on the spatial frequency domain expressing binary information obtained at this time, as shown by 1402 in FIG. 14. However, it is designed so as not to produce peaks in the low frequency domain.
Part of the coefficient arrangement of a cone mask is shown in FIG. 38. No peaks are produced in the low frequency domain irrespective of the threshold with which the cone mask is made to be binary, because appropriate distances are maintained among dots.
The outline of the spatial frequency property when the cone mask is made to binary with the threshold of 10 of the cone mask is shown by 1402 in FIG. 14. It is understood that for the property of 1402, low frequency components are few as in the case of the spatial frequency property of the blue noise mask.
In the case of the cone mask, high-density areas in the embedment position are few compared to the blue noise mask because peaks are produced at frequencies higher than low frequencies that the blue noise mask has, whether the threshold value is low or high. Thus, there is an advantage in that embedment noise occurring when added information Inf is embedded is further less noticeable compared to the blue noise.
Also, the frequency with which coefficients constituting the cone mask takes on the occurrence frequency (histogram) shown by 1201 of FIG. 12, as in the case of the blue noise mask.
Thus, if the pattern corresponding to each bit information constituting added information Inf is embedded in image data in correspondence with the coefficient of this mask, the pattern corresponding to each bit information can be placed in this image data in equal numbers, resulting in balanced embedment of added information Inf.
In this embodiment, the cone mask is used for embedment reference masks because of the advantages described above.
[3-3-2. Mask Referencing Unit]
The mask (cone mask) created by the mask creating unit 1101 is inputted by the mask referencing unit 1102. The mask referencing unit 1102 corresponds the position of embedding N bit information to be embedded in the image to the mask number (pixel value) to determine the embedment position.
A method of determination of embedment positions performed by the mask referencing unit 1102 in this embodiment will be described below. Although the above described mask is used in this embodiment, explanation is presented here using a 4×4 mask shown by 1501 in FIG. 15 for making the explanation understood easily.
The mask in FIG. 15 has 4×4 coefficients, and has coefficient values of 0 to 15 placed on an one-by-one basis. The position of embedment of added information Inf is referred to using this 4×4 mask. In the case of the mask for use in this explanation, added information Inf of up to 16 bits can be embedded, but the case where added information Inf of 8 bits is embedded will be described below.
First, the configuration of added information Inf will be described using FIG. 36. As shown in this figure, added information Inf is comprised of a start bit Inf1 and usage information Inf2. This start bit Inf1 is used by an offset matching unit 2003 included in the watermark embedding apparatus for recognizing that the position where actual added information Inf is embedded is displaced from the ideal position and correcting in accordance therewith the position of start of embedment of the watermark (added information Inf). Details thereof will be described later.
Also, the usage information Inf2 is original added information, namely information that is actually used as additional information of image data I. If the purpose is to track causes when image data wI is illegally accessed, for example, the ID of the apparatus shown in FIG. 1, the ID of the user or the like is included in this information. Also, if the purpose is to impose a ban on the copy of printed image data wI, control information showing that copy is prohibited is included.
In this embodiment, the start bit is of 5 bits, and a bit string of "11111" is used. However, the present invention is not limited thereto, and bit numbers other than 5 bits of added information Inf can be used as the start bit, and in a similar way, bit strings other than the bit string of "11111" can be used. However, the number of bits of the start bit and the bit string are necessarily shared by the digital watermark embedding apparatus and the digital watermark extracting apparatus.
A simple example in which a cone mask constituted by 4×4 coefficients as described above is used to embed total 8 bits of added information Inf constituted by 5 bits of start bit and 3 bits of usage information will be described.
However, the present invention is not limited thereto. It can also be applied, for example, to the case where a 32×32 cone mask is used to embed total 69 bits of added information Inf constituted by 5 bits of start bit and 64 bits of usage information.
Assume that added information Inf has 5 bits "11111" of start bit and 3 bits "010" of usage information. Each has bit information in which the first, second, third, fourth, fifth, sixth, seventh and eighth bits are 1, 1, 1, 1, 1, 0, 1 and 0, respectively.
Each of patterns corresponding to these respective bits (See FIG. 9) is assigned to a position corresponding to each of coefficients of the cone mask, and each pixel value of original image data is changed by ±c in accordance with this positional relationship. By this, one added information Inf is embedded in the original image data that is the equivalent in size of one cone mask.
In this embodiment, a threshold value is determined on the basis of the number of minimum bits required for embedding added information Inf, and each corresponding bit information is embedded in the position where a coefficient smaller than or equal to this threshold value is placed. By this, one added information Inf is embedded in one cone mask, irrespective of the number of bits of added information Inf.
Furthermore, the present invention is not limited to the aforesaid method, and arrangements may be made such that each corresponding bit information is embedded in the position where a coefficient larger than or equal to a certain threshold value is placed, and based on this, a threshold value is determined.
Then, in this embodiment, the ratio of the number of coefficients smaller than or equal to a threshold value for use in embedment to the number of coefficients of the entire mask is called a fill factor.
For correctly embedding 8 bits added information Inf over an integer number of times, a threshold value for determining which coefficient is used for the embedment reference position in the mask 1501 shown in FIG. 15 should be 8 or 16. For this threshold value, an optimal value is determined, considering influence on resistance and image quality.
At this time, in the case where the threshold value of the mask is defined as 8, the fill factor equals 50%. That is, 50% of the original image data referred to the aforesaid mask are object for processing using the pattern arrangement in FIG. 9.
One example of correspondence relationship between each bit and the coefficient in the mask is shown in Correspondence Table 1. | Order of bit information to | | | S1 | | | S2 | | | S3 | | | S4 | | | S5 | | | 1 | | | 2 | | | 3 | | | | be embedded | | | | | ---- | | | ---- | | | ---- | | | ---- | | | ---- | | | ---- | | | ---- | | | ----- | | | | Coefficients in the mask | | | 0 | | | 1 | | | 2 | | | 3 | | | 4 | | | 5 | | | 6 | | | 7 | | | | |
Here, S1 to S5 denote bit information (start bit) for registration that is used by an offset matching processor. Three bits of 1 to 3 denote usage information.
According to the correspondence in Correspondence Table 1, each bit information is embedded in the position of input image data corresponding to the position of the coefficient (0 to 7) expressed by 1601 in FIG. 16, using the pattern (See FIG. 9). The correspondence relationship between the order of bit information to be embedded and the coefficient in the mask is part of key information, and each bit information cannot be extracted unless this correspondence relationship is known. In this embodiment, to simplify explanation, S1 to S5 and 3 bits of information correspond to coefficients of 0 to the threshold value, one by one, as shown in Correspondence Table 1.
Now, the fill factor when a cone mask of 32×32 size is actually used to perform embedment will be somewhat described. Furthermore, the processing procedure is same as that in the case where the mask 1501 is used.
First, a threshold value required for embedding correctly added information Inf over an integer number of times is determined, considering degradation of image quality during embedment. Furthermore, the number of coefficients smaller than or equal to the threshold value is divided by the number of bits constituting added information Inf N to determine how many times each bit can be embedded with one mask size, so that each bit constituting the added information Inf is embedded repeatedly over equal numbers of times.
For example, in the case where 69 bits of added information Inf constituted by 5 bits of start bit and 64 bits of usage information in one example described above is embedded in original image data corresponding to coefficient values of 0 to 255, the threshold value is defined as, for example, 137.
In this case, the number of effective coefficient values in the mask equals 138. Since the number of dots required for expressing one added information Inf is 69, each bit information can be embedded two times (138/69=2) for one mask size.
Furthermore, the reason for performing embedment for all the points having coefficients smaller than or equal to a certain threshold value when the embedment position is determined using the cone mask lies in taking advantage of the property of the cone mask producing no peaks in low frequency components of the spatial frequency.
In the case where the embedment position is determined as described above, and as a consequence, the embedment fill factor and the amount of embedment information are defined as 50% and 69 bits, respectively, the relationship between each bit information constituting added information Inf and each coefficient value constituting the cone mask is as shown in Correspondence Table 2. | The order of each bit | | | S1 | | | S2 | | | S3 | | | S4 | | | S5 | | | 1 | | | 2 | | | . . . | | | 64 | | | | information | | | | | | | | | | | | | | | | | | | | | | | ---- | | | ---- | | | ---- | | | ---- | | | ---- | | | ---- | | | ---- | | | | | | ----- | | | | | | | | | | | | | | | | | | | | | | | | Coefficient values in the | | | 0, 1 | | | 2, 3 | | | 4, 5 | | | 6, 7 | | | 8, 9 | | | 10, 11 | | | 12, 13 | | | . . . | | | 136, 137 | | | | cone mask | | |
Here, S1 to S5 denote start bits, which are bit information for registration that is used by the offset matching processing unit. 1 to 64 denote usage information.
However, the present invention is not limited thereto, and other correspondence relationship between each bit information and each coefficient value may adopted as long as the pattern shown in FIG. 9 is used to embed each bit information one after another in all the positions of coefficients of 0 to the threshold (or from the threshold to 255).
In the case of the 32×32 cone mask, there are four positions having the same coefficients in one mask, respectively.
In the case where each bit information is embedded in original image data based on the above described Correspondence Table 2 for all coefficients, each bit information constituting added information Inf is embedded over almost equal numbers of times if a cone mask of large size such as 32×32 or 64×64 is used. Also, single bit information is spread and embedded in original image data.
In the patchwork method, the embedment position is conventionally selected at random, but in this embodiment, a similar effect can be obtained by referring to the aforesaid cone mask and degradation of image quality is reduced.
As a consequence, the mask referencing unit 1102 obtains the coordinate (x, y) of a position corresponding to each bit information.
When the information is expressed by: the bit denotes start bits S1 to S5 and 1 to 3 bits of usage information, in the case of Correspondence Table 1. Also, the num represents the order assigned to each coefficient appearing repeatedly in the cone mask. The relative coordinate in the mask is given to the (x, y).
The above described operations are performed by the mask referencing unit 1102.
[3-3-3. Mask/Pattern Arrangement Corresponding Unit]
The position of embedment in the cone mask of each bit information obtained by the mask referencing unit 1102 is inputted in the mask/pattern arrangement corresponding unit 1103.
Because the embedment position determined by the mask referencing unit 1102 is the position of a pattern of each bit information (equal to 8×8 pixels), addition areas (+c), subtraction areas (-c) and others (0) shown in FIG. 9 should be further assigned in the case of the patchwork method. Hence, the mask/pattern arrangement corresponding unit 1103 performs operations of deploying the pattern arrangement of 8×8 size corresponding to FIG. 9 in all the positions of the cone mask referred to by the mask referencing unit 1102.
Specifically, the arrangement S[bit][num]=(x, y) obtained by the mask referencing unit 1102 is multiplied by the size in the lateral direction of pattern arrangement for the x coordinate, and is multiplied by the size in the vertical direction of pattern arrangement for the y coordinate. As a consequence thereof, the coordinate 1701 in the mask of FIG. 17A becomes a front coordinate 1702 of FIG. 17B with one pixel in the mask scaled up to one pattern arrangement.
When the pattern arrangement shown in FIG. 19 is used from this front coordinate, embedment can be performed without causing superimposition over the area 1703 having a size of pattern arrangement.
The coordinate (x, y) changes to a coordinate (x′, y′), but the bit and num of the arrangement S[bit][num] does not change. Therefore, it is possible to define the (x′, y′) as a front position in which the pattern arrangement and embed a plurality of bit information as added information Inf corresponding the bit of the arrangement S[bit][num].
Furthermore, a large mask in which each coefficient of the cone mask is developed to (scaled up to) a 8×8 pattern arrangement by the mask/pattern arrangement corresponding unit 1103 is called scale-up mask.
The size of the aforesaid scale-up mask equals a size of (32×8)×(32×8), this size is the equivalent of a minimum image unit (referred to as a macro block) required for embedding at least one added information Inf.
Furthermore, in this embodiment, the size of the pattern arrangement is not limited to 8×8 as described for the pattern arrangement determining unit 0110. In the present invention, the sizes of the pattern arrangement and the patch are selected and determined (optimized) by the pattern arrangement determining unit 0103, in accordance with the resolution of the image or the output resolution of the printer. Even when the size of the pattern arrangement does not equal 8×8, the mask/pattern arrangement corresponding unit 1103 can use a similar unit to determine the position of embedment of added information Inf.
Operations performed by the mask/pattern arrangement corresponding unit 1103 have been described above.
In the case of small masks, there is less degree of freedom in the position of placement of dots during creation and it is more difficult to create masks having desired properties such as cone masks, compared to the case of large masks. For example, in the case where a small mask is repeatedly assigned to all image data to embed added information Inf, the spatial frequency that the small mask has appears on the all image data.
On the other hand, since completed added information Inf is extracted from one mask, the size of the mask is set to be large, resulting in reduced resistance to clipping (possibility that added information Inf can be extracted from partial image data wI′). Hence, it is necessary that the size of the mask should be determined, considering the balance between the aforesaid resistance to clipping and degradation of image quality.
Operations performed by the embedment position determining unit 0103 in FIG. 1 have been described above.
[3-4. Added Information Embedment Processing]
The added information embedding unit 0104 in FIG. 1 actually embeds added information Inf, referring to the position of embedment of each bit information in image data, which is determined as described above. An operational flow of processing of embedding repeatedly added information Inf in this embodiment is shown in FIG. 10.
In a system shown in FIG. 10, a plurality of assignable macro blocks is assigned to the whole image, and bit information of the first bit is first embedded repeatedly in these macro blocks, followed by embedding repeatedly the second bit, third bit . . . , one after another. This is comprised of procedures of subjecting all unprocessed macro blocks to embedment processing of 1001 to 1003 if there is bit information that is not yet subjected to embedment processing.
However, this embodiment in this embodiment is not limited this order, and internal-external relationship of two loops may be inverted. That is, if there are unprocessed macro blocks, a change may be made to a procedure of embedding in those macro blocks all the bit information that is not yet embedded.
Specifically, embedment of added information Inf adds the pattern arrangement in FIG. 9 if each bit information to be embedded is "1". Also, if the bit to be embedded is "0", the pattern arrangement in FIG. 9 is subtracted, namely those in FIG. 9 with positive and negative symbols reverted are added.
The aforesaid addition and subtraction processing is achieved by switching and controlling the switching unit 1001 in FIG. 10 in accordance with bit information to be embedded. That is, it is connected to the adding unit 1002 when bit information is "1", and it is connected to the subtracting unit 1003 when the aforesaid bit information is "0". The processing of 1001 to 1003 is performed referring to bit information and information of pattern arrangement.
Now, one of the aforesaid bit information being embedded is shown in FIG. 19. This figure shows an example in which the bit information to be embedded is "1", namely the pattern arrangement is added.
In the example shown in FIG. 19, I(x, y) denotes the original image, and P(x, y) denotes the 8×8 pattern arrangement. Each coefficient constituting the 8×8 pattern arrangement is superimposed over the original image data (blue color component) identical in size to this pattern arrangement, and values in the same position are subjected to addition and subtraction with each other. As a consequence thereof, I′(x, y) is calculated, and is outputted to the color component synthesizing unit 0105 in FIG. 1 as image data of the blue color component in which bit information is embedded.
The aforesaid addition-and-subtraction processing using the 8×8 pattern arrangement is performed repeatedly for all the embedment positions (positions to which the pattern arrangement for embedding each bit information is assigned) determined with the above described Correspondence Table 2.
Furthermore, in this embodiment, the size of the pattern arrangement is not limited to 8×8, as described in the explanation for the pattern arrangement determining unit 0110. In the present invention, the sizes of the pattern arrangement and the patch are selected and determined (optimized) by the pattern arrangement determining unit 0110, in accordance with the resolution of the image or the output resolution |