• 沒有找到結果。

Data Recovery and Separation Processes

Chapter 3 Creation of Irregular-Hexagonal-Tiled Image for Information Hiding

3.2 Proposed Irregular-Hexagonal-Tiled Image Creation Process

3.3.5 Data Recovery and Separation Processes

The data recovery and separation processes are the inverse version of the data combination and disarrangement processes which are proposed in Section 3.3.2. They are described as an algorithm below.

Algorithm 3.8: data recovery and separation processes.

Input: a randomized bit stream sequence DDatai, a secret key K, and a secret message size M.

Output: a secret message Mesi and a watermark Wateri. Steps:

Step 1. Use the secret key K to create a binary array, Key, whose size is equal to that of DDatai.

Step 2. Apply the exclusive-OR operator to DDatai and Key, resulting in the original bit sequence Datai of the combination of the inputs Mesi and Wateri.

Step 3. Take the first M bits from Datai as Mesi, and the other part as Wateri.

3.3.6 Experimental Results and Discussions

Figure 3.8 shows some experimental results of data hiding in an irregular-hexagonal-tiled image. Figure 3.8 (a) is an irregular-hexagonal-tiled image with the secret message, “Lena 是一位瑞典女士 Lena Sjooblom 的照片,” and the watermark, Figure 3.8 (c), embedded. Figure 3.8 (b) is the secret message extracted from Figure 3.8 (a) with a correct key. Figure 3.8 (d) is the watermark extracted from Figure 3.8 (a) with a correct key. Figure 3.8 (e) shows the extraction results from

Figure 3.8 (a) with a wrong key.

Figure 3.6 A flowchart of the data hiding process in the irregular-hexagonal-tiled image.

Figure 3.7 Data extraction order.

(a)

(b)

(c) (d)

(e)

Figure 3.8 Experimental results of data hiding in an irregular-hexagonal-tiled image. (a) An irregular-hexagonal-tiled image with the secret message and watermark (c) embedded. (b) The secret message extracted from (a) with a correct key. (d) A watermark extracted from (a) with a correct key. (e) The extraction results from (a) with a wrong key.

Chapter 4

Creation of Tile-Overlapping Mosaic Images for Information Hiding

4.1 Review of Traditional Mosaic Image Creation Process

4.1.1 Mosaic Images Creation Process

A method [17] of mosaic image creation is adopted in this study and a flowchart of it is shown in Figure 4.1. The creation process can be divided into two major stages.

One is construction of a tile image database and the other is generation of mosaic images. The first stage is conducted off-line, and the second on-line. A tile image database is established prior to the mosaic image generation process. Some metadata of the tile images need be built through a feature extraction process and such metadata are mainly the descriptions of the color distributions of the tile images. We will describe how to construct a tile image database in Section 4.1.2. The mosaic image generation process aims to divide an input image into numerous tiles based on a given tiling style. Additionally, a similarity measure is employed to get the best matching image from the tile image database for each tile. Finally, we compose all of the best-matching tile images together to produce a mosaic image. The detail of the process of mosaic image generation is described as an algorithm as follows.

Algorithm 4.1: mosaic image generation process.

Input: an image I, a tile image database DB, and a tiling style S.

Output: a mosaic image.

Steps:

Step 1. Divide I into tiles according to S.

Step 2. Get the best matching tile image from DB for each target tile T according to the following rule.

2.1. Calculate the average colors of T.

2.2. Represent the colors as a one-dimension feature vector Vtarget. 2.3. Get a feature vector Vtile from the metadata of DB.

2.4. Calculate the distance between Vtile and Vtarget according to the following formula where | | means the Euclidean distance:

D = |Vtarget – Vtile|2.

2.5. Find the smallest D after testing all Vtile from DB.

2.6. Get the best matching tile image from DB accordingly.

Step 3. Compose all of the tile images together according to S to produce a mosaic image.

4.1.2 Tile Image Database Construction

Tile image database construction is the first step for mosaic image creation and it plays an important role in the entire process. We utilize a database to store the extracted color features and this can accelerate the computation of searching the best matching tile image. We accomplish tile image database construction using the following algorithm.

Algorithm 4.2: tile image database construction.

Input: a set of images, S = {I1, I2, …, In}.

Output: a set of tile images, O = {T1, T2, .., Tn}, for use as the tile image database and an associated metadata table M.

Steps:

Step 1. Resize each Ii, i = 1, 2, …, n, to a pre-defined tile image size, resulting in a new image Ti.

Step 2. Calculate the average color of Ti in each of the RGB channels.

Step 3. Represent the average colors as a one-dimension feature vector Vi with three elements Ri, Gi, and Bi.

Step 4. Add Vi to M.

Step 5. Save O and M in the storage as the desired output.

In this study, the pre-defined tile image size is chosen to be 32×32 pixels. After resizing an input image, we extract and represent the color features extracted from it as a vector. In the RGB color model, we use red, green, and blue as the three primary colors. A metadata table is built by combining all the feature vectors derived from Step 4.

4.1.3 Similarity Measure for Tile Matching

In the above algorithm, we see that the adopted similarity measure between a target image and a tile image from a database is based on the RGB color model. A feature vector is obtained by calculating the average color of a tile image in each of the RGB channels. In the mosaic image generation process, an image from the tile image database is considered to be the most similar to a given target image if the value of the similarity measure based on the Euclidean distance between the two

feature vectors is the smallest.

Figure 4.1 A flowchart of adopted mosaic image creation method [17].

4.2 Overview of Proposed Method

Traditional mosaic images contain numerous tile images which are of uniform sizes, and the arrangement of them is usually regular. However, we want to create new-styled mosaic images in this study by modifying the regular arrangement style of the tile images. An illustration of the proposed arrangement scheme is shown in Figure 4.2(b). Additionally, during the image creation process, we desire also to

Off Line

achieve the data hiding application by utilizing the arrangement scheme. We will state how to create the mosaic image and explain how we carry out the data hiding operation during the image creation process in the following sections.

4.3 Proposed Tile-Overlapping Mosaic Image Creation Process

4.3.1 Idea of Image Creation Process

Our inspiration of this topic of study comes from the creation process of the circular-dotted image proposed by Hsu and Tsai [19]. The main concept of the creation process of the circular-dotted image is to utilize the drawing order of the circular-dots in a circular-dotted image. We imitate their overlapping scheme.

However, the basic unit of our ‘painting’ here is a tile image. The arrangement of tile images in a traditional mosaic image is shown in Figure 4.2(a) and the proposed arrangement of tile images in the proposed new-styled mosaic image is shown in Figure 4.2(b). The traditional arrangement is regular, while the proposed arrangement is irregular. In the traditional arrangement, we know in advance the location of each tile image. However, in the proposed new arrangement, we do not know the location of each tile image beforehand because we randomize the locations of each tile. The randomization is controlled by the use of a random number generator. So, the tile arrangements are unfixed in appearance, thus yielding a more vivid effect in the resulting image. However, this brings a problem. That is, due to irregular overlapping of the tiles, holes between adjacent tiles will be created and might block the data extraction process conducted later. So, how to avoid causing this hole-creation

problem during the image creation process is a critical issue. A solution proposed in this study will be described later. On the other hand, the randomized tile overlapping degree is fixed to be in a specific range, taken to zero to seven pixels in this study. We utilize such tile overlapping degrees to implement the data hiding work. More specifically, a tile overlapping degree of n pixels is used to embed a 3-bit message data of the value n. For example, if the message to be embedded is 1012 = 510, then we let a tile image to overlap its preceding one either in the horizontal or vertical direction for 5 pixels to accomplish the embedding purpose. The image creation and data hiding processes are stated in the following.

4.3.2 Detail of Image Creation Process

In this section we show how to create a tile-overlapping mosaic image. The major steps are as follows.

(1) Construct a tile image database.

(2) Process the input image in the following order: the first column, the first row, and then the inner tiles.

(3) In the first column, draw one by one the best-matching tile images in such a way that the current one overlaps randomly the bottom side of the preceding one.

(4) In the first row, perform works similar to the last step but with the overlapping being on the right side of the preceding tile.

(5) Draw the inner tiles in a raster scan order in such a way that the current tile overlaps, in a random way, both the right side of the left tile and the bottom side of the upper one.

In the above process, a best-matching tile image drawn at a location is the one in

the tile image database, which is most “similar” to the image part appearing at the same location (called target image subsequently) in the input image (called cover image in the sequel). Also in the last step above, the random overlappings there, as mentioned previously, might create holes, which we want to eliminate. A technique to achieve this purpose is to move the tile to be drawn toward the left or upper direction pixel by pixel until the hole disappears. More details of the process are described as an algorithm below.

Algorithm 4.3: creation process of tile-overlapping mosaic image.

Input: a cover image I; a tile image database DB with each image being of the size SZ× SZ with SZ being a given integer; a similarity measure SM, and a random number generator F for integers in the range of 0 through 7.

Output: a tile-overlapping mosaic image Im for I.

Steps:

Step 1. Create the first column of Im in the following way:

1.1. Crop the upper-leftmost SZ×SZ subimage of I and take it to be the target image Tar00.

1.2. Search DB for the tile image Bmt00 which matches Tar00 the best according to the given similarity measure SM.

1.3. Draw Bmt00 in Im at the same location as that of Tar00 with a black border.

1.4. Generate a random integer number RN in the range of 0 to 7 by F.

1.5. Crop as a target image Tar0j from I an SZ×SZ image right below the preceding target image Tar0(j-1) but with RN-pixel overlapping.

1.6. Search DB for the tile image Bmt0j which best matches Tar0j according to SM.

1.7. Draw Bmt0j in Im at the same location as that of Tar0j with a black border.

1.8. Repeat Steps 1.4 through 1.7 until the entire first column of Im are processed.

Step 2. Process the first row of Im in a similar way to Step 1 except that the overlapping is on the right side of the preceding tile image.

Step 3. Process the inner tiles of Im in a raster scan order in the following way:

3.1. Generate by F two random integer numbers RN1 and RN2 ranging from 0 to 7.

3.2. Derive the position of Tarij using RN1 and RN2, which is to the right of the horizontally preceding target image Tar(i-1)j in Im and below the vertically preceding target image Tari(j-1) with an RN1-pixel horizontal overlapping as well as an RN2-pixel vertical overlapping.

3.3. Check by the following way if a hole like either case shown in Figure 2 is created by Tarij in the last step.

Case 1:

1a. the vertically preceding target image Tari(j-1) has its upper boundary higher than that of the upper-left neighboring target image Tar(i-1)(i-1); and

1b. there is a gap between the upper boundary of Tar(i-1)j and the lower boundary of Tari(j-1); and

1c. there is a gap between the right boundary of Tar(i-1)(j-1) and the left boundary of Tarij.

Case 2:

2a. the vertically preceding target image Tari(j-1) has its upper boundary lower than that of the upper-left neighboring target image Tar(i-1)(i-1);

2b. there is a gap between the right boundary of Tar(i-1)j and the left boundary of Tari(j-1);

2c. there is a gap between the lower boundary of Tar(i-1)(j-1) and the upper boundary of Tarij.

If a hole of Case 1 is created, move Tarij to the left until the hole disappears, and crop an SZ×SZ target image from I at the new position as Tarij; or if a hole of

Case 2 is created, move Tarij upward until the hole disappears, and crop an SZ×SZ target image from I at the new position as Tarij

3.4. Search DB for the tile image Bmtij which best matches Tarij according to SM.

3.5. Draw Bmtij in Im at the same location as that of Tarij with a black border.

3.6. Repeat Steps 3.1 through 3.6 until all the inner tiles of Im are processed.

(a) (b) Figure 4.2 Tile arrangements. (a) The arrangement of the traditional tile images. (b) The proposed

arrangement of tile images.

(a) (b) Figure 4.3 The creation process may cause a hole by the illegal arrangement of Tilei,j. (a) Case 1. (b)

Case 2.

4.3.3 Experimental Results and Discussions

All the mosaic images of our experimental results were generated by using the tile image database with about 1900 images. The hiding capacity is about three

thousand bytes. Figure 4.4(a) is an input image. Figure 4.4(b) is the resulting tile-overlapping mosaic image created from Figure 4.4(a) by applying the tile-overlapping mosaic image creation process in Section 4.3.2. Figure 4.4(c) is an image composed of several tile images of the red region in Figure 4.4(b). Figure 4.4(d) is the resulting tile-overlapping mosaic image with white holes.

(a)

(b)

Figure 4.4 Experimental results. (a) An original image. (b) A tile-overlapping mosaic image. (c) Enlarged image from the red region of (b). (d) A tile-overlapping mosaic image with white holes.

(c)

(d)

Figure 4.4 Experimental results. (a) An original image. (b) A tile-overlapping mosaic image. (c) Enlarged image from the red region of (b). (d) A tile-overlapping mosaic image with white holes. (continued)

4.4 Proposed Method for Data Hiding in Tile-Overlapping Mosaic Images

4.4.1 Concept of Proposed Method

The main concept of the data hiding process in a tile-overlapping mosaic image is to utilize the overlapping degree of every pair of adjacent tile images in a tile-overlapping mosaic image.

As shown in Figure 4.5(a), first, we input a bit sequence of the secret message

Mesi and a bit sequence of a watermark Wateri. By applying the data combination and disarrangement processes proposed in Section 3.3.2, we can derive a bit sequence of disordered data DDatai. Second, we perform the tile overlapping scheme which will be discussed in Section 4.4.2 to deal with DDatai. Finally, we utilize the derived overlapping degree to create a tile-overlapping mosaic image by applying the image creation process proposed in Section 4.3.2.

Referring to the concept of the data extraction process shown in Figure 4.5(b), by applying the overlapping detection process, which will be proposed in Section 4.4.3, we can extract DDatai from a stego-tile-overlapping mosaic image. Finally, by applying the data recovery and separation processes proposed in Section 3.3.5, we can derive the embedded Mesi and Wateri.

4.4.2 Data Hiding Process

Before performing the data hiding process in a tile-overlapping mosaic image, we process the cover image in advance. If the RGB values of a pixel in the cover image are (0, 0, 0) or (1, 1, 1), we replace them with the RGB values (0, 0, 1). The two colors (0, 0, 0) and (1, 1, 1) are reserved for special purposes as described in the following. This process of color changes is necessary for the data extraction process.

The major step of the proposed data hiding process is to take sequentially 3-bit sequences from the prefix of a randomized version of the secret message as overlapping degree values and run the proposed image creation process (Algorithm 4.3) to embed them into the cover image.

In case a hole is created using a certain overlapping degree, we have to eliminate the hole by adjusting the horizontal or vertical position of the tile with respect to its left or upper tile image, respectively, as mentioned previously. But then the overlapping degree is changed, meaning that the originally embedded 3-bit sequence

is changed such that the embedding must be abandoned. This says equivalently that if we have to adjust the position of some tile image in one direction (horizontal or vertical) to avoid creating a hole, the overlapping in this direction should not be used to hide secret data anymore. In such a case, the overlapping on the other direction can be tried, or the next tile image should be used if the overlappings of both directions are unusable.

In addition, data extraction to be described later is conducted in a raster scan order; the tile image (denoted by RT) to the right of the currently-processed one (denoted by CT) will be the next to be processed for data extraction. We access the right-sided tile along a line drawn from the center of CT to the right. Therefore, to assure the accessibility of the RT in this way, we limit the center of RT to be located in a range RA (e.g., −3 pixels to +10 pixels for 32×32 tile images in this study) with respect to the center of CT both in the horizontal and vertical directions. Furthermore, similar to the case of hole elimination, when the position of RT is adjusted in either the horizontal or the vertical direction, it means that the overlapping in that direction cannot be used for data embedding.

When the position of RT need be adjusted due to hole elimination or/and RT accessibility, we say that the position is illegal. We move an RT with an illegal position horizontally or vertically for a random distance in the range RA mentioned above. The random distance is generated by a random number generator. Note that both hole elimination and RT accessibility must be accomplished, when necessary.

Furthermore, if secret data cannot be embedded in the horizontal (or vertical) direction, we draw as a mark the left and right (or upper and lower) borders with the color value of (1, 1, 1). Contrastively, for those overlappings into which secret data are embedded, the respective borders are drawn to be of the color value of (0, 0, 0). In this way, by detecting the color of a tile border, we know whether a 3-bit sequence is

hidden in the tile image or not. The detail of the data hiding process is described as an algorithm as follows.

Algorithm 4.5: data hiding in a tile-overlapping mosaic image.

Input: an cover image I, a secret message Mesi, a watermark Wateri, and a secret key Ki.

Output: a stego-tile-overlapping mosaic image S.

Steps:

Step 1. For each pixel, we replace the RGB values (0, 0, 0) or (1, 1, 1) with the RGB values (0, 0, 1).

Step 2. Create an empty array A.

Step 3. Transform the value of the message size into a bit sequence MSizei whose size is defined to nine.

Step 4. Divide MSizei into three parts with equal lengths.

Step 5. Transform each part of MSizei into a decimal integer and add it to A.

Step 6. Use Ki, Mesi, and Wateri to derive disordered data DDatai by applying Algorithm 3.3 in Section 3.3.2.

Step 7. Divide DDatai into several parts with a size of three.

Step 8. Transform each part of DDatai into a decimal integer and add it to A.

Step 9. Take the array A which contains the overlapping values to run the image creation process described in Section 4.3.2.

Step 10. Draw a border of the tiles according to the result of Algorithm 4.4. If result is legal, draw the border with the RGB values (0, 0, 0); otherwise, draw that with the RGB values (1, 1, 1).

4.4.3 Data Extraction Process

The main concept of the data extraction process is to figure out the overlapping degree of every pair of adjacent tile images in a stego-tile-overlapping mosaic image.

Because we replace each pixel with the RGB values (0, 0, 0) and (1, 1, 1) with that (0, 0, 1) in advance, there will be no pixel with the RGB values (0, 0, 0) or (1, 1, 1) except the borders. We utilize these borders to perform the overlapping detection

Because we replace each pixel with the RGB values (0, 0, 0) and (1, 1, 1) with that (0, 0, 1) in advance, there will be no pixel with the RGB values (0, 0, 0) or (1, 1, 1) except the borders. We utilize these borders to perform the overlapping detection