Method for realizing random bit non-blind watermark based on chaos

An implementation method, a technology of random bits, applied in the fields of information security, image processing, and computer applications, which can solve the problems of different and unable to extract watermark information.

Inactive Publication Date: 2018-07-03
TIANJIN UNIV OF TECH & EDUCATION TEACHER DEV CENT OF CHINA VOCATIONAL TRAINING & GUIDANCE
0 Cites 4 Cited by

AI-Extracted Technical Summary

Problems solved by technology

If the embedding process and the extraction process use different keys, different position matrices will be generated, and the extraction process w...
View more

Method used

[0185] Convert the channel order of the original carrier image and the im...
View more

Abstract

The name of the patent of the invention is a method for realizing a random bit non-blind watermark based on chaos, which relates to the technical fields of image processing, computer application and information security. Watermark information is embedded into a carrier image by calculating the embedding positions of different bits through a chaotic system. During embedding, exclusive-OR operationis carried out on the watermark information and the bit value on a specific bit of a binary pixel value in a corresponding position (the coordinates of the pixels are the same) of the carrier image, and the operation result is embedded into the bit participating in operation in the carrier image. During extraction, the values on specific bits with the same binary pixel value in corresponding positions of the watermark-containing carrier image and the original carrier image are extracted, and exclusive-OR operation is carried out on the two values to extract the original watermark information.The method can be widely applied to the fields such as information hiding and copyright protection.

Application Domain

Image data processing details

Technology Topic

Chaotic systemsExclusive or +4

Image

  • Method for realizing random bit non-blind watermark based on chaos
  • Method for realizing random bit non-blind watermark based on chaos
  • Method for realizing random bit non-blind watermark based on chaos

Examples

  • Experimental program(1)

Example Embodiment

[0100] The random bit non-blind watermark is operated on each pixel in the carrier, and the position of the embedded watermark is not fixed. The specific implementation steps are divided into embedding process and extraction process.
[0101] For the convenience of understanding, the watermark here is only embedded in the R channel of the carrier image. In actual processing, the watermark can be embedded in multiple channels, and the method of embedding watermark in other channels is the same as that in R channel.
[0102] 1 Embedding process
[0103] The embedding process calculates the original watermark information with the carrier image and then embeds it into the carrier image.
[0104] (1) Original carrier image processing
[0105] Read in the original carrier image, obtain the size of the image, decompose it into channels, and divide it into R channel, G channel, and B channel.
[0106] For example, there is the original carrier image O, whose size is 4*4, which is channel decomposed and divided into R channel rgb[0], G channel rgb[1], B channel rgb[2]. The extracted R channel rgb[0] is:
[0107] 209
[0108] Its corresponding binary value BR is:
[0109] 11010001
[0110] (2) Watermark image processing
[0111] The binary watermark image is read, and the binary watermark image is obtained by thresholding the binary watermark image.
[0112] For example, there is a binary watermark image WO as:
[0113] 255
[0114] The pixel point with the value of 255 in the binary watermark image WO is processed as 1, then the binary watermark image W corresponding to the binary watermark image WO is obtained as:
[0115] 1
[0116] (3) Determine the operation position
[0117] In random bit blind watermarking, it is necessary to randomly select a bit from the binary value of each pixel, perform XOR calculation between the bit value of the bit and the watermark, and embed the calculation result into the selected bit, that is, Replace the original bit value on the bit with the operation result. The patent of the present invention determines the embedded specific bit position information according to the chaotic system.
[0118] For example, if the initial value of the known chaotic system is 0.98, the embedded position matrix CS of the same size as the original carrier image 4*4 can be generated as:
[0119] 0
[0120] According to the position matrix CS established when the initial value of the chaotic system is 0.98, the specific bit position of each pixel involved in the operation in the original carrier binary image BR is determined, and the bit information involved in the operation in BR is shown as the underline:
[0121] 1101000 1
[0122] (4) Embedded watermark
[0123] When embedding a digital watermark, first perform the XOR operation on the original watermark information and the value on the specified bit of the binary value of each pixel to obtain the "embedded watermark information", and replace the original bit value on the bit with the "embedded watermark information". information, that is, to complete the watermark embedding.
[0124] In the specific program implementation, the possible situation of XORing the watermark information W with the binary bit value on the specified bit in the binary original carrier image BR is:
[0125] Case 1: The watermark information is 0, the binary value of the pixel at the corresponding position of the carrier image (the coordinates of the pixel in the image) specifies that the bit value is 0, and the XOR result of the two is 0. operation, that is, embedding the watermark information into the carrier image.
[0126] Case 2: The watermark information is 0, the binary value of the pixel at the corresponding position of the carrier image specifies that the bit value is 1, and the XOR result of the two is 1. At this time, no operation is required, that is, the watermark information is embedded in the carrier image. Inside.
[0127] Case 3: The watermark information is 1, the binary value of the pixel at the corresponding position of the carrier image specifies that the bit value is 0, and the XOR result of the two is 1. At this time, it is necessary to specify the binary pixel value at the corresponding position of the carrier image. The bit value on the bit is changed from 0 to 1, and the embedding of the watermark information into the carrier image is completed. In terms of specific implementation, it is assumed that the bit that needs to be embedded in the watermark is in the nth bit of the binary (here, the binary bit is counted from right to left, and the serial number starts from 0, that is, the least significant bit is the 0th bit, and the most significant bit is the 7th bit), Then, adding 2^n to the pixel value of the carrier image realizes replacing 0 of the bit with 1, that is, the embedding of the watermark is completed.
[0128] Case 4: The watermark information is 1, the binary value of the pixel at the corresponding position of the carrier image specifies that the bit value is 1, and the XOR result of the two is 0. At this time, it is necessary to specify the binary pixel value at the corresponding position of the carrier image. The bit value on the bit is changed from 1 to 0 to complete the embedding of the watermark information into the carrier image. In terms of specific implementation, assuming that the bit that needs to be embedded in the watermark is in the nth bit of the binary, the pixel value of the carrier image is subtracted by 2^n, that is, the 1 of the bit is replaced by 0, that is, the embedding of the watermark is completed. .
[0129] In the above four cases, the original carrier image does not need to be changed in case 1 and case 2, and they are collectively referred to as "rule A" after being merged, case 2 is referred to as "rule B", and "case 3" is referred to as "rule A". Rule C". An example is used to illustrate it, and some embedded examples are shown in Table 7 (note: the sequence number of binary bits starts from 0, the least significant bit is the 0th bit, and the most significant bit is the 7th bit).
[0130] Table 7 Embedding example
[0131]
[0132] According to the results of the above induction, operations are carried out for the three types, specifically:
[0133] Step 1: Process Rule A
[0134]In the watermark W and the corresponding position of the pixel in the R channel BR of the original carrier image (the coordinate position of the pixel point is the same), the information of the watermark W is 0, and the bits ( The number of bits in a binary value) has a bit value of 0 or 1. The BR and W that conform to this rule are shown in the dark background part in Table 8 and Table 9. The elements in this part in Table 8 do not need any changes to complete the embedding of the watermark.
[0135] Table 8 Original vector R channel BR
[0136]
[0137] Table 9 Watermark W
[0138]
[0139] The elements in the above-mentioned original carrier image R channel BR can be directly copied to the watermark image WB, and the value in WB at this time is:
[0140]
[0141] Step 2: Process Rule B
[0142] At the corresponding position of the pixel in the watermark W and the original carrier image BR, the watermark value is 1, and the bit value of the bit involved in the operation in the carrier image R channel BR is 0. This situation conforms to rule B, and the original carrier image needs to be The corresponding pixels of the R channel BR are added with 2^n, and the value of n is determined by the position matrix CS.
[0143] The watermark W and original carrier image R channel BR that conform to this rule are shown in the slightly darker background parts in Table 10 and Table 11.
[0144] Table 10 Original carrier image R channel BR
[0145]
[0146] Table 11 Watermark W
[0147]
[0148] For this part of the value, it is necessary to add 2^n to the value of the corresponding pixel in the R channel BR of the carrier image, where n is the bit position to be embedded in the binary number of the watermark on the corresponding pixel of the R channel BR of the carrier image. The matrix CS is obtained, and the corresponding position of CS is set to a dark background as shown in Table 12.
[0149] Table 12 Embedding position matrix CS
[0150]
[0151] Therefore, according to the embedding position matrix, according to rule B, the operation is as follows:
[0152] The value "11" in row 1 and column 4 in the R channel BR of the original carrier image in Table 10 (where the row and column numbers start from 1) 0 00001", the position where the watermark needs to be embedded is obtained by the embedded position matrix CS shown in Table 12. The value of the corresponding position in CS is 5, so it is necessary to add "2^5" to this value to get "11" 1 0 0001";
[0153] The value "1010000" in row 2 and column 3 in the R channel BR of the original carrier image in Table 10 0 "According to the embedded position matrix CS, the embedded position is the 0th position, so you need to add "2^0" to this value to get "1010000 1 ";
[0154] The value "011100" in row 2 and column 4 in the R channel BR of the original carrier image in Table 10 0 0" According to the embedded position matrix CS, the embedded position is the 1st bit, so you need to add "2^1" to this value to get "011100" 1 0";
[0155] The value "101" in row 3, column 1 in R channel BR of the original carrier image in Table 10 0 0001" According to the embedded position matrix CS, the embedded position is the 4th bit, so you need to add "2^4" to this value to get "101 1 0001";
[0156] The value "1" in row 4 and column 3 in R channel BR of the original carrier image in Table 10 0 011010" According to the embedded position matrix CS, the embedded position is the sixth bit, so you need to add "2^6" to this value to get "1" 1 011010";
[0157] After the above process is completed, the obtained value is copied to the watermark image WB, and the value in WB at this time is:
[0158]
[0159] Step 3: Process Rule C
[0160] In the watermark W and the corresponding position of the R channel BR pixel of the original carrier image, the watermark value is 1, and the bit value of the bit involved in the operation on the R channel BR of the carrier image is 1. If this situation is met, it belongs to rule C, and the original The pixel value of the corresponding pixel of the R channel BR of the carrier image will go to 2^n, and the value of n is determined by the position matrix CS.
[0161] The watermark W and original carrier image R channel BR conforming to this rule are shown in the white background part in Table 13 and Table 14.
[0162] Table 13 Original carrier image R channel BR
[0163]
[0164] Table 14 Watermark W
[0165]
[0166] For this part of the value, it is necessary to subtract 2^n from the value in the R channel BR of the carrier image, where n is the bit position in the binary number of the corresponding pixel in the R channel BR of the carrier image where the watermark is to be embedded, which is obtained by the position matrix CS , and set the corresponding position of CS to a white background as shown in Table 15.
[0167] Table 15 Embedding position matrix CS
[0168]
[0169] Therefore, according to the embedded position matrix CS shown in Table 15, according to the rule C, we can get:
[0170] The value "1101000" in row 1, column 1 in R channel BR of the original carrier image in Table 13 1 "Need to subtract "2^0" to get "1101000 0 ";
[0171] The value "1100010" in row 1 and column 2 in the R channel BR of the original carrier image in Table 13 1 "Need to subtract "2^0" to get "1100010 0 ";
[0172] The value of row 1, column 3 in R channel BR of the original carrier image in Table 13" 1 0100011" need to subtract "2^7" to get " 0 0100011";
[0173] The value "0111110" in row 2, column 1 in R channel BR of the original carrier image in Table 13 1 "Need to subtract "2^0" to get "0111110 0 ";
[0174] The value "111101" in row 2, column 2 in the R channel BR of the original carrier image in Table 13 1 1" needs to be subtracted from "2^1" to get "111101 0 1";
[0175] The value "111" in the 3rd row and 3rd column in the R channel BR of the original carrier image in Table 13 1 0011" needs to be subtracted from "2^4" to get "111" 0 0011";
[0176] The value "011" in row 4, column 4 in the R channel BR of the original carrier image in Table 13 1 1111" needs to subtract "2^4" to get "011" 0 1111";
[0177] After the above process is completed, the obtained value is copied to the watermark image WB, and the value in WB at this time is:
[0178]
[0179]
[0180] The decimal form of the watermarked image WB is:
[0181] 208
[0182] The above watermarked image WB is used as the R channel of the watermarked color image, and it is combined with the G channel rgb[1] and B channel rgb[2] separated from the original carrier image to synthesize the watermarked color image.
[0183] After completing the above steps, save the watermark image.
[0184] (5) Display image
[0185] Convert the channel order to the original carrier image and watermark image to be displayed, so as to facilitate the display.
[0186] Display original carrier image, watermark image and watermark image respectively.
[0187] The flowchart of the embedding process is as follows figure 1 shown.
[0188] 2 Extraction process
[0189] The extraction process is to complete the extraction process of "identifying watermark information", and the specific steps are as follows:
[0190] (1) Extract the R channel of the original carrier image
[0191] Read in the original carrier image, obtain the image size M*N, decompose it into channels, and divide it into R channel, G channel, and B channel.
[0192] For example, there is the original carrier image O, whose size is 4*4, which is channel decomposed and divided into R channel rgb[0], G channel rgb[1], B channel rgb[2]. The extracted R channel rgb[0] is:
[0193] 209
[0194] Its corresponding binary value BR is:
[0195] 11010001
[0196] (2) Extract the R channel of the watermark carrier image
[0197] Read in the watermark carrier image, obtain the image size M*N, decompose it into channels, and divide it into R channel, G channel, and B channel.
[0198] For example, there is a watermark carrier image OW whose size is 4*4, which is channel-decomposed and divided into R channel OWrgb[0], G channel OWrgb[1], B channel OWrgb[2]. The extracted R channel OWrgb[0] is:
[0199] 208
[0200] Its corresponding binary value OWBR is:
[0201] 11010000
[0202] (3) Extract the bit plane
[0203] According to the initial value of the chaotic system, an extraction position matrix of size M*N is generated, and the binary bit values ​​on the designated bits of each pixel in the R channel of the original carrier image and the R channel of the watermark carrier image are respectively extracted according to the matrix, and these The bit values ​​form the bit plane required for subsequent operations.
[0204] If the value of the pixel in the watermark image is 218, and the corresponding position in the corresponding position matrix CS (the pixel has the same coordinate) has a value of 3, it is necessary to start from the 3rd bit of the binary bit of the pixel (note: the serial number Starting from 0, that is, the least significant bit is the 0th bit) to extract the watermark information. The details are shown in Table 14.
[0205] Table 14 Extracted watermark example
[0206] watermark pixel value
[0207] In the specific implementation of the program, several bits of information Nleft on the left are obtained by shifting the binary value of the watermark pixel to the right by the number of bits specified by the CS value of the extraction position information matrix, so that the watermark information is in the least significant bit. The least significant bit, that is, the watermark information, can be obtained by taking the value Nleft modulo 2. For example, a pixel value of 216 has a binary value of "1101 1 000", the corresponding CS value is 3, so first shift it to the right by 3 bits to get "11011", and then take the value modulo 2 to get the watermark value "1" to be extracted.
[0208] The calculation expression of the extraction rule is:
[0209] (11011000>>3)%2
[0210] For example, if the initial value of the known chaotic system is 0.98, the extracted position information matrix CS of size 4*4 can be generated as:
[0211] 0
[0212] According to the extraction bit determined by CS, extract a specific bit plane from the original carrier image R channel BR according to the extraction rules. The operations that need to be performed are:
[0213] (11010001>>0)%2
[0214] From the above formula, the specific bit plane BRB extracted from the R channel BR of the original carrier image can be obtained as:
[0215] 1
[0216] According to the extraction bit determined by CS, extract a specific bit plane from the R channel OWBR of the watermark carrier image according to the extraction rules. The operations that need to be performed are:
[0217] (11010000>>0)%2
[0218] From the above formula, the bit plane OWBRB extracted from the R channel OWBR of the watermark carrier image according to the extraction rules is:
[0219] 0
[0220] 【hint】
[0221] By performing the bitwise AND operation on the image and a Mat-type matrix whose internal values ​​are all 2^n, the information at different positions specified by n can also be extracted. Different from extracting a specific bit plane, the value of n used in the calculation here is obtained through the position matrix CS, and the value of n is not fixed for different pixels.
[0222] (4) Extract watermark information
[0223] The "recognized watermark information" is obtained by performing XOR operation on two bit planes composed of the bit values ​​on the designated bits extracted from the original carrier image and the watermark carrier image.
[0224] For example, an XOR operation is performed between the bit plane BRB extracted from the R channel BR of the original carrier image and the bit plane OWBRB extracted from the R channel OWBR of the watermark carrier image to obtain the binary value watermark image WS of the "identification watermark information". for:
[0225] 1
[0226] (5) Watermark processing
[0227] Threshold the "Identified Watermark Information" and display it.
[0228] For example, the extracted binary watermark image WS is subjected to threshold processing, and 1 is adjusted to 255. The sentences used are:
[0229] threshold(WS,WS,0,255,THRESH_BINARY)
[0230] After the above-mentioned processing, the binary watermark image WB of "identifying watermark information" can be obtained as:
[0231] 255
[0232] Call the custom function to display the above watermark in the main interface.
[0233] (6) Display the watermark carrier image
[0234] Perform channel sequence conversion on the watermark carrier image to display the carrier image.
[0235] The flow chart of the extraction process is as follows figure 2 shown.

PUM

no PUM

Description & Claims & Application Information

We can also present the details of the Description, Claims and Application information to help users get a comprehensive understanding of the technical details of the patent, such as background art, summary of invention, brief description of drawings, description of embodiments, and other original content. On the other hand, users can also determine the specific scope of protection of the technology through the list of claims; as well as understand the changes in the life cycle of the technology with the presentation of the patent timeline. Login to view more.
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products