Chin-Feng Lee|Ying-Xiang Wang
Abstract—Image data hiding technology is secret communications that carry hidden data in such a way that no one except the sender and intended recipients can even realize there is a hidden message.High embedding capacity,good images quality,and security are three important essentials.In this paper,each confidential hexadecimal will be carried by two cover pixels based on a magic matrix generated from a square template to reach the goal of higher embedding capacity while keeping good image visualization.Experimental results reveal that the proposed scheme guarantees higher embedding capacity of 2 bits per pixel and has the peak signal-to-noise ratio(PSNR)of 44.7 dB on average.Moreover,secret keys are used to ensure security consideration.
People have been unable to leave the Internet now.Therefore,how to enhance information security has become an important issue at present.Steganography is an art of secret communication in an appropriate carrier.Image hiding technology is a particular subject of steganography.The secret information is accommodated in an original image(also called a cover image)based on a secure key,becoming a stego-image.Therefore,the image hiding technology can carry out message exchanges.A successful image hiding technique is required to reach the need of security,embedding capacity,and image visual quality.
Here,we mentioned the irreversible information hiding method.The irreversible advantage lies in the simple method,high possession,and wide applications.In 1989,Turneret al.[1]published the least significant bit(LSB)method.This method hides the confidential information bits one by one into the cover image.If the confidential information is different from the original image pixels,then the confidential information will directly replace the original image to obtain the stego-image.In 2006,Mielikainen[2]proposed an improved LSB matching method,which uses a pair of two pixel values and hides two confidential information bits at a time.Firstly,it determines if LSB of the first pixel value is equal to the hidden confidentiality bit.When the two are different,then it uses a binary function to select the pixel value to be modified.In 2004,Chan and Cheng[3]proposed a data hiding method by simple LSB substitution with an optimal pixel adjustment process(OPAP).This method can use the low additional calculation to enhance image quality.
In 2006,Zhang and Wang[4]proposed the method based on exploiting modification direction(EMD).The EMD method can hide each 5-ary data in two original pixels,where at most only one pixel increases or decreases the value to achieve high image quality.In 2013,a generalized EMD (GEMD)method was proposed by Kuo and Wang[5],which usesncover-pixels in a group,and is able to embed(n+1)bits of secret data.In 2010,Lee and Chen[6]developed a modulus function to maintain the image quality good and provide the hiding capacity,while reducing the memory requirements.
In 2003,Wu and Tsai[7]proposed the pixel value different (PVD)method.The PVD method calculates the difference between a pair of consecutive pixels.The difference between the pair of pixels is compared with the predefined interval widths to determine the amount of bits.In 2014,Chen[8]enhanced the improved modulus function for the PVD(IMF-PVD)hiding method.The amount of confidential information to be hidden in this method depends on the complexity of each hidden block.The number of bits hidden in the complex area is more,but the smooth area is less.The human eyes are less sensitive to changes in complex areas than smooth areas.Its purpose is to improve image quality by hiding more data and to protect the hidden information.In 2015,Shen and Huang[9]proposed a method that combines PVD and EMD.This method will first use the Hilbert curve to convert the original image into a one-dimensional pixel stream,and then divide the two consecutive pixels into nonoverlapping hidden blocks.PVD is applied to estimate the cardinality of the number of bits and hides it in pixel pairs.
Changet al.[10]introduced a data hiding scheme based on the Sudoku solution to hide secret data.Although the Sudoku scheme has less calculation,it owns lower image quality.In 2014,Changet al.[11]proposed a turtleshaped shell scheme with the high image quality of 53.3 dB on average.Both schemes can reach the embedding capacity of 1.5 bits per pixel(bpp).In 2015,Kurupet al.[12]proposed the octagon shape shell.This method has an octagonal shape that contains 16 different numbers.The reference matrix modifies the value of the overlay pixel pair,thereby hiding confidential information.In 2016,Liuet al.[13]increased the embedding capacity by using the location table to develop the turtle shell-based scheme to reach 2 bits per pixel on average.Jinet al.[14]minimized the turtle shell matrix based stego-image distortion using particle swarm optimization.Xieet al.[15]developed an approach based on a two-layer turtle shell matrix to enhance the embedding capacity.
To enhance the embedding capacity with an indistinguishable form,a square template is generated.This scheme is the extension of the pencil-shaped pattern embedding scheme[16].Our scheme first designs a magic matrix with each dimension of the range from 0 to 255,and then adjusts pixel values according to the position where the data can be located on the magic matrix so that each cover pixel pair can carry a nibble,reaching the high embedding capacity of 2 bpp.
The rest of this paper is as follows.Section 2 gives a simple literature review.Section 3 describes the proposed scheme in detail.The experimental results and conclusions are discussed in Sections 4 and 5,respectively.
In this section,a hiding scheme based on turtle-shaped shells developed by Changet al.[11]is introduced.Assume that the secret message is expressed in binary.Each time three bits of secret data can be hidden within two pixels.Fig.1(a)shows an example of a magic matrix M based on turtle-shaped shells with a size of 256×256.Two adjacent elements in the same row of matrix M have a difference of 1;two adjacent elements of the same column have alternatively difference of 2 or 3,respectively.LetM(pi,pi+1)andM(qi,qi+1)be the numbers in the magic matrix M where(pi,pi+1)and(qi,qi+1)represent the pairs of cover pixels and stego-pixels before/after the 3-bit secret datasihas been concealed.
Fig.1.Magic matrix M based on turtle-shaped shells:(a)magic matrix M,(b)M(4,5) is located within a turtleshaped shell,(c)M(4,4)is an edge number,and(d)M(0,1)is not located at any turtle-shaped shell.
Fig.2.Example of Sudoku:(a)element M(4,3)=7,(b)candidate elements in vertical Sudoku grids,(c)horizontal Sudoku grids,and(d)square Sudoku grids.
If the numberM(pi,pi+1)falls in one turtle-shaped shell as shown in Fig.1(b),then the secret numbersialso can be found in the same turtle-shaped shell such thatsi=M(qi,qi+1).However,IfM(pi,pi+1)is an edge number,then the numbersican be found in the surrounding three turtle shells as shown in Fig.1(c).The calculation should be performed to find the minimum distance between(pi,pi+1)and(qi,qi+1)under the condition thatsi=M(qi,qi+1).Another special case occurs when the numberM(pi,pi+1)is not located at any turtle-shaped shell;the solution as shown in Fig.1(d)is to find the shortest distance between(pi,pi+1)and(qi,qi+1)so that the numberM(qi,qi+1)equals to the secret datasi.
The turtle-shaped shell scheme is a great idea and the one that we can have no doubt to dig deep.However,the embedded capacity payload has some limitations.The following discussion is also based on the Sudoku-based hiding method proposed by Changet al.[10].In 1979,Garns invented Sudoku[17].A Sudoku box contains nine 3×3 sub-boxes,and each row and each column of the Sudoku grid contains 0 to 8 different numbers.WhenM(pi,pi+1)=M(4,3),the value in matrix M is 7 as shown in Fig.2(a).Next,we assume that the confidential information is (011 001)2,which can be converted into values of base-9.So(011 001)2=(2 7)9.At this point,we will learn that the values to be searched for in the matrix M are 2 and 7,respectively.Next,we will follow the three known candidate elements,as shown in Figs.2(b)to(d).After three candidate elements are finally obtained,the three candidate elements are compared,and the original pixelM(pi,pi+1)can be modified to the candidate pixelM(qi,qi+1)is found.The candidate element with the shortest-distance is our final decision(stego-pixel pair)to hide the secret data.
Another topic to be introduced is an octagonal information hiding method proposed by Kurupet al.[12].In this octagon,0 to 15 different numbers are included,4 secret bits are found from the confidential information and correspond to 0 to 15 digits and then hidden.The first step is to generate a 256×256 reference matrix.This matrix has two rules.The difference between adjacent pixels in the same row is set to 1;the difference between two adjacent pixels in the same column is set to 4 or 5,and the reference matrix is connected with multiple octagons.The pixel is modified according to the three rules below.
Rule 1:ifM(pi,pi+1)is a number that is located in an octagon,thenM(qi,qi+1)is one of the digits in this octagon,as shown in Fig.3(a)).
Rule 2:IfM(pi,pi+1)is an edge digit involved in at least one octagon,thenM(qi,qi+1)is one of the digits in all octagons which are adjacent,as shown in Fig.3(b)).
Fig.3.Example of octagon:(a)Rule 1 and(b)Rule 2.
Rule 3:IfM(pi,pi+1)does not belong to any octagon,thenM(qi,qi+1)is one of all digits in a 4×5 sub-block whereM(qi,qi+1)is located in the central of the sub-block.
Recently,Leeet al.[16]proposed an embedding scheme based on a pencil-shaped pattern for raising the embedding capacity while keeping good visual quality of the stego-image.Based on this magic matrix,each cover pixel pair can carry 4-bit secret data so the embedding capacity is 2 bit per pixel.Therefore,the embedding capacity when compared with previous schemes is the best.However,the pencil-shaped pattern scheme involves more image distortion up to 5 dB compared with the turtle-shaped shell scheme.Therefore,it inspires to propose a high fidelity steganography technique of two bpp embedding capacity.
The proposed scheme has three procedures:Matrix construction,message embedding,and data extraction.
First,create a square template of N1×N2 digits,and adopt the template to build a magic matrix size is 256×256.Before considering how to create the magic matrix based square template,we use Fig.4 to illustrate how an entry in the magic matrix can be specified by a pair of numerical coordinates.Similar to the Cartesian coordinate system,theH×Wmagic matrix M is arranged as shown in Fig.4,the individual element or entry is denoted byM(x,y)whereH=maxxandW=maxy,each element or entry is a number ranging from 0 to (HW?1),and each element can be referenced by a coordinate (x,y).For example,M(x,y)=8,ifx=y=0;M(x,y)=0,ifx=4 andy=7,as shown in Fig.4.
Fig.4.Entry M(x,y)referenced by a coordinate(x,y)in the magic matrix M.
A two-dimensional magic matrix of sizeH×Wis constructed based on a template of sizeN1×N2.For greyscale images,the valuesH=W=256 andN1=N2=4.In the hexadecimal notational system,four bits(a nibble)are represented by a single digit.The template is square and is shown in Fig.5 (a)which containsN1×N2different digits from 0 to (N1×N2?1).The square template is like a signet which is affixed to the two-dimensional matrix in a non-overlapping manner so that the magic matrix can be created as shown in Fig.5(b).
A signet can be generated by a secure key SK1,so there are 16!≈2.1×1013different templates.Moreover,another secure key SK2is employed to locate a start position of the signet to be attached.Here use SK1and SK2to increase the security on the transmitted images,so that the security aspects will be determined by the random number.As a result,the numbers in the signet will become unpredictable combinations and a relatively safe method can also be achieved.Here we use a 4×4 magic signet as the discussion for all examples.
Fig.5.Example of (a) 4×4 magic signet and (b) twodimensional matrix.
First of all,we will elaborate on the part of SK1.We have to build a 256×256 magic before performing the hiding procedure.So a 4×4 signet needs to be built in advance.The role of SK1is a key to generate the numbers from 0 to 15 in this 4×4 magic signet.There is a considerable combination 16!≈2.1×1013.As a result,SK1makes the signet to have better security.The flow chart below will be used to represent the setup process as shown in Fig.6.
Fig.6.Generated matrix by secure key SK1.
After using SK1to generate several possibilities in a 4×4 magic square,the next step is to decide how to stack these 4×4 squares;that is,how to fill these squares among the 256×256 carriers of a twodimensional matrix.As described in this stacking method,SK2is adopted to locate a start position of the 4×4 signet and the signet is stacked from the start position to fill the entire 256×256 matrix.The following flowchart will represent the process as shown in Fig.7.
Finally,in order to enhance security,the third secure key SK3is responsible for the task of disrupting the pixel value of the original image before the original image is hidden.After the original image is disrupted by SK3,the scrambled image was used as a carrier to carry the data.Compared with the case where a message is directly embedded in the original image,if the message is hidden in a randomly generated image,this will make it even more difficult to find the existence of a confidential message.This time you can call it “hidden image”as shown in Fig.8.
Assume a to-be-hidden messageS={sj|j= 1,2,…,HW/2;0≤sj≤15},where everysjis concealed by a pair of pixels.LetIbe a gray-level image of heightHand widthW,respectively.SoI={pi|i=1,1,2,…,HW;0≤pi≤255}.In order to improve the security of the proposed scheme,the pixels of an original image are shuffled using the third secure key SK3by a secure pseudo-random number generator (PRNG) before the embedding process is preceded.Fig.8 shows the flow chart of the embedding procedure.
Fig.7.Matrix in the size of 256×256 pixels is covered by secure key SK2.
Fig.8.Embedding procedure flow chart.
Afterward,the pixel values are put into pairs so each paircan be treated as a coordinate of the twodimensional magic matrix.LetandM(qi,qi+1)be the numbers in the magic matrix M whereand(qi,qi+1)represent the pairs of pixels before/after a 4-bit secret numbersjhas been concealed.For a given to-beembedded secret digitsj,associated with the pixel pairthe stego-pixel pair(qi,qi+1)can be resolved by finding the shortest distance betweenand(qi,qi+1)under the condition thatM(qi,qi+1)equals to the secret datasj.The proposed scheme takesas the center to find the nearest location whereM(qi,qi+1)=sjwithout caring if the entry with the coordinate(qi,qi+1)is located within the square pattern or not.Therefore,this approach can reduce the fidelity loss,increasing the stego-image quality.
The authorized receiver with secure keys can extract the concealed message completely sincesj=M(qi,qi+1),which implies that the entry of each secret digit can be obtained from every coordinate(qi,qi+1)forj=1,2,…,HW/2 andi=1,2,…,HW.
Four test images were used,namely (a)Barbara,(b)Boat,(c)Lena,and (d)Peppers.All of them are 512×512 pixels gray-scale images,which are shown in Fig.9.The experiment uses the MATLAB random function generator to generate a sequence of bit streams as the secret data.The peak signal-to-noise ratio(PSNR),defined as
where MSE is the mean square error between the cover image and stego-image,(1)can be used to evaluate the distortion of the stego-image after the secret data have been embedded.MSE is defended as
wherepi,jandqi,jrepresent the pixel values of the cover imageIand the stego-image SI,respectively.The embedding capacity (EC)is defined as the maximal number of bits that can be embedded for each pixel(bpp).
If the PSNR value gets larger,then the quality of the image is closer to its original image.In general,a PSNR value greater than 30 dB indicates the closeness of the stego-image and the cover image.Thus,the quality of the stego-image with the PSNR value greater than 30 dB is taken as perceptually acceptable.
Fig.9.Ten test images with the size of 512×512 pixels and 256 levels(8 bits)per pixel:(a)Barbara,(b)Boat,(c)Lena,(d)Peppers,(e)Airplane,(f)Couple,(g)Elaine,(h)House,(i)Lake,and(j)Tiffany.
Table 1 shows the comparison of the proposed scheme with the other three related schemes proposed by Changet al.[10],Changet al.[11],and Leeet al.[16],respectively,in terms of the embedding capacity and image quality.From Table 1,the proposed scheme has 2 bpp of embedded capacity which is the same with the Pencil-shape scheme[16]and higher than those of the schemes proposed by Changet al.[10]and Changet al.[11].
Experimental results show that the proposed scheme,in comparison with Sudoku and Turtle-shaped schemes,outperforms in terms of embedding capacity and security.However,compared with Sudoku and Turtle-shaped schemes,it outperforms in terms of embedding capacity and security,but needs to pay the cost of image distortion.Compared with the pencilshaped pattern embedding scheme[16],the proposed scheme has an equal amount of embedding capacity,but our scheme improves the image visual quality.The average PSNR values reach 44.12 dB higher than that with 42.87 dB of the pencil-shape scheme.Table 1 shows lower PSNR values compared with those of schemes proposed by Changet al.[10]and Changet al.[11].However,when weighing up the relative advantages of embedding capacity and image quality in PSNR values,we are more concerned about whether our method has a higher payload.High embedding capacity indicates the better ability of information embedding and transmission.That means,under the same level of imperceptivity,that a cover image can carry more secret messages at once,which will earn in the data transfer rate,thus further reducing transmission complexity.
In Table 2,we use test images such as Lena,Baboon,Peppers,Airplane,and Boat to observe the change of image quality under different payloads in the proposed method.This experimental result shows the payloads at each stage are 1×105bits,2×105bits,3×105bits,4×105bits,and 5×105bits,respectively,and the corresponding image quality by PSNR will change with the payload.For example,when the payload is 1×105bits,PSNR of Lena,Baboon,Peppers,Airplane,and Boat reaches 53.9 dB on average.Next,when the payload is 2×105bits,PSNR reaches 50.9 dB on average.Even if the payload is up to 5×105bits,PSNR still preserves in 46.9 dB on average.PSNR of each image is very close at each stage of payload;thus,our proposed method has good stability.
Table 1:PSNR and embedding capacity(EC)
Table 2:Proposed method results of PSNR under various payloads
We propose a scheme exploiting a square template to conceal confidential information.The scheme has high embedded capacity and provides good image quality.Based on the magic square,each cover pixel pair can carry the secret data of 4 bits.Moreover,the image quality can keep in 44.12 dB on average,which can be applied to some applications that require high embedded capacity and stable image quality.The proposed method can bring more benefits for information exchange.In the future,a good design of the magic matrix should be conducted to enhance the performance in terms of image quality and embedding capacity as well.
Journal of Electronic Science and Technology2020年1期