BLOCK BASED DATA HIDING METHOD FOR IMAGES

In this article, a new block based data hiding method is presented. The proposed data hiding method uses non-overlapping blocks and this method consists of block type determination, data hiding and data extraction functions. The most significant bit of the secret data determines the block type. If the most significant bit of the secret data is 1, the block type is the odd, otherwise the block type is even. The other bits of secret data determine index of abnormal pixel. We use ±1 operator to set abnormal pixel and pre-processing in this paper. To extract secret data, we use index of abnormal pixel and block type. Capacity, execution time and visual quality parameters are used for measuring performance of the proposed method. Experimental results show that the proposed method is a successful data hiding method and that the proposed data hiding method can be used in methods such as image authentication, fragile watermarking etc.


Introduction
Nowadays, multimedia data transformations and digital communication techniques have been widely used.Multimedia consists of texts, images, audios and videos.Multimedias have been used in elearning, web conference, peer to peer communication, televisions, social media applications, mobile applications, biomedical engineering etc.Because of the high usage of multimedia, many multimedia editing tools have been developed.Owing to these tools, multimedia can be easily modified and this situation causes a lot of information security problems.To provide information security of the multimedia, data hiding and multimedia authentication methods have been widely used.Data hiding is divided into two sub categories which are steganography and digital watermarking.The chiefly aim of the steganography is to obtain a secure data transmission channel by using multimedia or others.Steganography does not associate secret message with cover object, it only intends privacy of the secret message.The main purpose of digital watermarking is to associate the multimedia with the watermark (watermark uses for copyright protection.Users can select it or it can be automatically generated by using an algorithm).Digital watermarking techniques have been commonly used to copyright protection and multimedia authentication.The watermarking techniques are active authentication methods [1][2][3][4][5][6].The watermarking techniques use spatial, frequency, compressed and encrypted domains to image authentication and copyright protection [7].
Digital watermarking techniques are widely used for image authentication but not all of the watermarking methods can be used as an image authentication method.The data hiding methods for images consist of 5 components.These are cover image, secret data, data hiding algorithm, stego image and data extraction algorithm.The cover image is an original image which is used for host media.Secret data is embedded into cover image by using data hiding algorithm.LSBR (Least Significant Bits Replacement), QIM (Quantization Index Modulation), HS (Histogram Shifting), CRT (Chinese Remainder Theorem).etc. are widely used data hiding algorithms in the literature.Stego image carries secret data.Receivers use data extraction algorithm to extracting secret data from stego images [8][9][10][11][12][13][14][15].
In this paper, a novel block based data hiding is presented.The characteristics of the presented method is given below.
• This method can use variable size of blocks.
• The proposed method has high visual quality because of this method used ±1 operator for data hiding.
• The capacity of the block based data hiding method is depended on size of blocks.
• The secret data and data hiding map determine to hidden pixel.The rest of this article is organized as follows.Section 2 describes the proposed block based data hiding method, Section 3 demonstrates experimental results and Section 4 presented conclusions and recommendations.

The Proposed Block based Data Hiding Method
In this article, a novel block based data hiding method is presented.The proposed block based data hiding method consists of data hiding and data extraction phases.In the data-hiding phase, the block type and data hiding pixels are determined by using secret data.In the data extraction phase, firstly the block type is determined.Then, the abnormal pixel is detected.The location of the abnormal pixel is expressed as index value.Secret data is calculated by using MSB (Most Significant Bit) of secret data and index value.The steps of the proposed block based data hiding algorithm are given below.
Step 2: Divide blocks into the cover image.
Step 3: Calculate MSB of secret data.


SD is secret data, m is width of block, MSB refers most significant bit and n is height of the block.
Step 4: Modify pixel values in the blocks according to MSB of the secret data.Eq. 2. Describes this modifying.


p is cover image and SI is stego image.
In step 4, the whole of the pixel values of the blocks are modified.
Step 5: Calculate MSB eliminated secret data and this value used as index of the abnormal pixel.Eq 3-6.are used to select and modify data hiding index.


After determined row and col, the data hiding process is applied by using ±1 operator.


Step 6: Repeat step 3-5 until size of secret data.
Data extraction steps of the proposed method is depended on counters, counter of even and counter of odd are used to determine block type and abnormal pixel.We use these counters for calculating secret data.Steps of the proposed data extraction algorithm are given below.
Step 3: If counter even is m*n-1and counter odd is 1 then MSB(SD) is 1, otherwise MSB(SD) is 0. To calculate counters, algorithm 1 is used.Output: counter even which is c_even and counter odd which is c_odd.The following example is given to better understand the proposed block based data hiding method.Example: 3 x 3 size of non-overlapping blocks are used in this example.In this situation, the range of secret data is [0,3 x 3 x 2-1].For example, if 14 is embedded into block which is shown in Fig. 2., the steps which are given below should be performed.Step 1: We determine MSB of the secret data that is 14.To determine this, Eq.1 is used.
Step 2: MSB( 14)=1.For this reason, convert the whole of the pixels of block to odd by using -1 operator.The preprocessed block is given in Fig. 3. Fig. 3. Pre-processed block.
Step 3: Calculate index value of the secret data. = 14 − 1 * 3 * 3 = 5 Step 4: Modify pixel by using map and +1 operator.The stego block is shown in Fig. 4. To data extraction by using stego block, we use steps which are given below.
Step 1: Calculate counter even and counter odd by using Algorithm 1.
Step 2: If c_even is 8 and c_odd is 1 then MSB is 0, otherwise MSB is 1.In this example c_odd is 8 and c_even is 1.Thus MSB is 1.
Step 3: Calculate index by using Algorithm 2.
Step 4: Calculate secret data by using Eq. 7.

Experimental Results
In this section, the performance of the proposed block based data hiding method was evaluated by using capacity, execution time and visual quality criterias.To obtain experiments of the proposed method, the general test images, which are shown in Fig. 5. are used.Capacity: The capacity of the proposed method depends on the used block size.For example, when 3-bit data is embedded into 2 x 2 size of blocks, 5-bit data can be hidden in 4 x 4 size of blocks.General capacity formula of the proposed method is described in Eq. 8.
For instance, if we use 1 x 2 or 2 x 1 size of non-overlapping blocks, the capacity is obtained 1 bpp (bit per pixel).If we use 2 x 2 size of non-overlapping blocks, the capacity is 0.75 bpp.If we use 3 x 3 size of non-overlapping blocks, the capacity is 0.44 bpp.If we use 4 x 4 size of non-overlapping blocks, the capacity is 0.3125 bpp.
Execution Time: One of the most frequently used performance evaluation criteria to measure the success of a data hiding method is the execution time.The proposed block-based data hiding method is programmed by using Matlab 2013a on Windows 10 operating system with Intel i5-4300U processor and 4 GB RAM.Obtained data hiding time and data extraction timelines are shown in Table 1.HT is data hiding time and ET is data extraction time.
Visual Quality: One of the most important evaluation parameters is visual quality.To measure visual quality, Mean Square Error (MSE) and Peak Signal to-Noise Ratio (PSNR) are used [16][17][18].The equations of MSE and PSNR are given Eq. 9 and Eq. 10.In this article, ±1 operator is used to data hiding and thus the theoretical worst PSNR value is 10log10(255 2 /1)=48.13.Range of the PSNR values of the proposed block based data hiding method is [48.13,∞).The average PSNR value of the used test images is 51.1476.

𝑀𝑆𝐸 =
In order to compare of the proposed method to other method in view of visual quality, Lin and Tsai's [19] method, Yang et al.'s [20] method, Chang et al.'s [21] method, Eslami and Ahmadabadi's [22] method, Wu and Lin's [22] method were utilized.The obtained comparison results were shown in Table 2. Table 2 clearly showed that, the proposed method has superior visual quality than others.

Conclusions and recommendations
A novel block based data hiding method is presented in this paper.The proposed block based data hiding method consists of block division, pre-processing, data hiding and data extraction sections.Variable size of non-overlapping blocks are used to obtain experiments.Firstly, cover image is divided into non-overlapping blocks.Type of block is determined according to secret data.MSB and index value are used for data hiding.In the data extraction section, firstly, block division is processed and type of block is determined.The index of different (abnormal) pixel is determined.Secret data is calculated by using MSB and index of different pixel.In the experimental result, capacity, execution time and visual quality is used.The experimental results showed that, the proposed block based data hiding method is successfully resulted.The presented data hiding method is fragile data hiding method.The help of the proposed method can obtain the fragile watermarking method for image authentication.
In the future works, the proposed method will be used as fragile watermarking and image authentication method.Chaotic maps will be used to create data hiding map.

Algorithm 1 :
Pseudo code of the calculating counters.Input: Stego block (sb) which size of m x n.

Step 6 :Fig. 1 .
Fig. 1.Block diagram of the block based data hiding method for images.

Fig. 2 .
Fig. 2. Sample block and data hiding map (a) 3 x 3 size of sample image block (b) data hiding map.
used evaluation parameter of visual quality in the literature.The obtained PSNR values of the 20 test images with 2 x 2, 3 x 3, 4 x 4 and 8 x 8 size of blocks are shown in Fig. 6.

Table 1 .
Data hiding and data extraction times of the proposed method with various size of blocks and various size of image.

Table 2 .
Comparison of PSNR values of the proposed method with other methods.