CN109300077B - Dynamic information steganography method and computer readable storage medium - Google Patents

Dynamic information steganography method and computer readable storage medium Download PDF

Info

Publication number
CN109300077B
CN109300077B CN201710616729.5A CN201710616729A CN109300077B CN 109300077 B CN109300077 B CN 109300077B CN 201710616729 A CN201710616729 A CN 201710616729A CN 109300077 B CN109300077 B CN 109300077B
Authority
CN
China
Prior art keywords
pixel
color
components
calculating
coefficient
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710616729.5A
Other languages
Chinese (zh)
Other versions
CN109300077A (en
Inventor
涂岩恺
陈义华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Xiamen Yaxon Networks Co Ltd
Original Assignee
Xiamen Yaxon Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Xiamen Yaxon Networks Co Ltd filed Critical Xiamen Yaxon Networks Co Ltd
Priority to CN201710616729.5A priority Critical patent/CN109300077B/en
Publication of CN109300077A publication Critical patent/CN109300077A/en
Application granted granted Critical
Publication of CN109300077B publication Critical patent/CN109300077B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • G06T1/005Robust watermarking, e.g. average attack or collusion attack resistant

Abstract

The invention discloses a dynamic information steganography method and a computer readable storage medium, wherein the method comprises the following steps: the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel; calculating the average value of the three first components of all the pixels to obtain the average main color intensity of the image; calculating to obtain a color margin index of the image according to the average main color intensity and a preset margin coefficient; traversing each pixel in the image; calculating the average value of three first components of a pixel to obtain the component average value of the pixel; calculating to obtain a Keyny coefficient of a pixel according to three first components of the pixel; embedding the information to be hidden in the lower four bits or the lowest bit of the three color components of a pixel according to the comparison result of the component mean value and the color abundance index of the pixel and the comparison result of the kuni coefficient of the pixel and a preset threshold value. The invention can improve the data volume and the safety of the hidden information.

Description

Dynamic information steganography method and computer readable storage medium
Technical Field
The present invention relates to the field of data hiding technologies, and in particular, to a dynamic information steganography method and a computer-readable storage medium.
Background
Information steganography is a method of hiding confidential information in a large amount of host information without being easily discovered by others. For example, a common information hiding manner is to hide data to be kept secret in a picture without affecting the original visual effect of the picture, thereby achieving the purpose of hiding confidential information.
The existing information steganography method based on pictures mainly utilizes image data hiding information with high spatial frequency, a least significant bit method to hide information into picture pixels, a method to hide information on a statistical model of pixel brightness of a digital image, and the like.
The least significant bit method is simple and quick to process, and because only the least significant bit of the pixel value is changed, the human eyes cannot detect the tiny change of the pixel color of the image, so the display quality of the original image can be well kept, and the image is not easy to be detected by the human eyes. However, the least significant bit method has its drawbacks, that is, firstly, the hidden information capacity is limited, and only the lowest bit of the color component of each pixel can be inserted with the information to be hidden; secondly, the data hiding position of each pixel is fixed at the lowest position in a static hiding mode, so that the data hiding position is easy to crack by people, and the safety is low.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a dynamic information steganography method and a computer readable storage medium are provided, which can improve the data volume and the security of the hidden information.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a method of dynamic information steganography, comprising:
acquiring three color components of each pixel in an image;
the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel;
calculating the average value of three first components of all pixels in the image to obtain the average main color intensity of the image;
calculating to obtain a color margin index of the image according to the average main color intensity and a preset margin coefficient;
traversing each pixel in the image;
calculating the average value of three first components of a pixel to obtain the component average value of the pixel;
calculating a kini coefficient of the pixel according to the three first components of the pixel;
and embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kuni coefficient of the pixel and a preset threshold.
The invention also relates to a computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of:
acquiring three color components of each pixel in an image;
the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel;
calculating the average value of three first components of all pixels in the image to obtain the average main color intensity of the image;
calculating to obtain a color margin index of the image according to the average main color intensity and a preset margin coefficient;
traversing each pixel in the image;
calculating the average value of three first components of a pixel to obtain the component average value of the pixel;
calculating a kini coefficient of the pixel according to the three first components of the pixel;
and embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kuni coefficient of the pixel and a preset threshold.
The invention has the beneficial effects that: judging the color intensity of the pixel based on the image global color abundance index and the single-pixel color harmony index, thereby embedding more information in some color components without influencing the visual effect; the invention expands the limitation that the traditional least significant bit method can only embed information at the lowest bit, so that the maximum information can be embedded at the lower four bits, thereby greatly improving the capacity of the hidden information; meanwhile, because the number of bits of the information which can be embedded into each pixel is different and can be changed along with the difference of the image content, the method is not an information hiding method with a fixed position and has changed dynamics, the complexity of information embedding and reading is much higher than that of a static method, the hidden information is more difficult to guess and crack by people, and the safety of the hidden information is improved.
Drawings
FIG. 1 is a flow chart of a dynamic information steganography method;
fig. 2 is a flowchart of a method according to a first embodiment of the invention.
Detailed Description
In order to explain technical contents, objects and effects of the present invention in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.
The most key concept of the invention is as follows: according to the color intensity of each pixel, information to be hidden is embedded in the lower four bits or the lowest bit of the color component.
Referring to fig. 1, a dynamic information steganography method includes:
acquiring three color components of each pixel in an image;
the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel;
calculating the average value of three first components of all pixels in the image to obtain the average main color intensity of the image;
calculating to obtain a color margin index of the image according to the average main color intensity and a preset margin coefficient;
traversing each pixel in the image;
calculating the average value of three first components of a pixel to obtain the component average value of the pixel;
calculating a kini coefficient of the pixel according to the three first components of the pixel;
embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component average value of the pixel and the color abundance index and the comparison result of the kini coefficient of the pixel and a preset threshold value.
From the above description, the beneficial effects of the present invention are: the capacity of the hidden information is improved, and the safety of the hidden information is improved.
Further, after the "calculating the color abundance index of the image" further includes:
if the color rich index is greater than 255, the color rich index is set to 255.
As can be seen from the above description, the maximum value of the limiting color gamut index cannot exceed the maximum value 255 of the pixel color component.
Further, the "calculating a kini coefficient of the pixel according to the three first components of the pixel" specifically includes:
calculating a sum of three first components of the pixel;
respectively calculating the specific gravities of the three first components in the sum, and sequencing the three calculated specific gravities from small to large to obtain a first specific gravity, a second specific gravity and a third specific gravity;
calculating to obtain a first accumulated sum specific gravity according to the first specific gravity;
calculating to obtain a second accumulated specific gravity according to the first specific gravity and the second specific gravity;
and calculating the Keyny coefficient of the pixel according to the first accumulated sum specific gravity and the second accumulated sum specific gravity.
From the above description, the computation principle of the kini coefficient is used to compute the kini coefficient of the pixel color component, which is used to indicate the fairness index of the color distribution.
Further, the "embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component average value of the pixel and the color abundance index and the comparison result of the kini coefficient of the pixel and the preset threshold" is specifically:
if the component mean value of the pixel is greater than or equal to the color tolerance index and the Keyny coefficient of the pixel is less than or equal to a preset threshold value, embedding information to be hidden in the lower four bits of the three color components of the pixel;
if the component average value of the pixel is greater than or equal to the color abundance index and the kini coefficient of the pixel is greater than a preset threshold value, embedding information to be hidden in the lower four bits of the weakest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel;
if the component mean value of the pixel is smaller than the color abundance index and the Keyny coefficient of the pixel is smaller than or equal to a preset threshold value, embedding information to be hidden in the lowest position of the three color components of the pixel;
and if the component average value of the pixel is less than the color abundance index and the Gini coefficient of the pixel is greater than a preset threshold value, embedding the information to be hidden in the lower four bits of the strongest color component of the pixel, and embedding the information to be hidden in the lowest bits of the other color components of the pixel.
It can be known from the above description that the influence on the human vision is mainly determined by a certain stronger color, so that more information can be embedded in some color components without affecting the visual effect.
The invention also proposes a computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring three color components of each pixel in an image;
the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel;
calculating the average value of three first components of all pixels in the image to obtain the average main color intensity of the image;
calculating to obtain a color margin index of the image according to the average main color intensity and a preset margin coefficient;
traversing each pixel in the image;
calculating the average value of three first components of a pixel to obtain the component average value of the pixel;
calculating a kini coefficient of the pixel according to the three first components of the pixel;
and embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kuni coefficient of the pixel and a preset threshold.
Further, after the "calculating the color abundance index of the image" further includes:
if the color rich index is greater than 255, the color rich index is set to 255.
Further, the "calculating the kini coefficient of the pixel according to the three first components of the pixel" specifically includes:
calculating the sum of the three first components of the pixel;
respectively calculating the specific gravities of the three first components in the sum, and sequencing the three calculated specific gravities from small to large to obtain a first specific gravity, a second specific gravity and a third specific gravity;
calculating to obtain a first accumulated sum specific gravity according to the first specific gravity;
calculating to obtain a second accumulated specific gravity according to the first specific gravity and the second specific gravity;
and calculating the Keyny coefficient of the pixel according to the first accumulated sum specific gravity and the second accumulated sum specific gravity.
Further, the "embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kini coefficient of the pixel and the preset threshold" specifically includes:
if the component mean value of the pixel is greater than or equal to the color tolerance index and the Keyny coefficient of the pixel is less than or equal to a preset threshold value, embedding information to be hidden in the lower four bits of the three color components of the pixel;
if the component mean value of the pixel is greater than or equal to the color abundance index and the kuni coefficient of the pixel is greater than a preset threshold, embedding information to be hidden in the lower four bits of the weakest color component of the pixel, and embedding information to be hidden in the lowest bits of the other color components of the pixel;
if the component mean value of the pixel is smaller than the color abundance index and the Keyny coefficient of the pixel is smaller than or equal to a preset threshold value, embedding information to be hidden in the lowest position of the three color components of the pixel;
if the component mean value of the pixel is smaller than the color tolerance index and the Keyny coefficient of the pixel is larger than a preset threshold value, embedding information to be hidden in the lower four bits of the strongest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel.
Example one
Referring to fig. 2, a first embodiment of the present invention is: a dynamic information steganography method, based on an image global color abundance index and a single-pixel color kiney index, comprising the steps of:
s1: the intensity values of three color components, namely R, G and B color channels, of each pixel in the image are obtained, and the value of each color component ranges from 0 to 255 and can be represented by eight-bit binary numbers.
S2: the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel; the three first components of a pixel respectively correspond to the three color components of the pixel one by one, for example, if a color component is 10101010, the first component corresponding to the color component is 10100000.
Further, to facilitate the calculation in the following steps, the three first components of each pixel may be first converted into decimal.
S3: calculating the average value of three first components of all pixels in the image to obtain the average main color intensity M of the image;
s4: calculating to obtain a color margin index T of the image according to the average main color intensity M and a preset margin coefficient; the average main color intensity M is multiplied by a preset rich coefficient, which is the color rich index T, wherein the preset rich coefficient is 1.5, and the color rich index T =1.5 × M.
Further, the maximum value of the color margin index T is restricted not to exceed the maximum value of the color component 255, i.e., if the color margin index is greater than 255, the color margin index is set to 255.
S5: sequentially acquiring a pixel of the image;
s6: calculating the average value of three first components of a pixel to obtain the component average value V of the pixel; for example, assuming that the three first components of the pixel are R4, G4, and B4, respectively, the component mean V = (R4 + G4+ B4)/3 of the pixel.
S7: calculating a Keyny coefficient G of the pixel according to the three first components of the pixel;
specifically, the steps include the steps of:
s701: calculating a sum S = R4+ G4+ B4 of the three first components of the one pixel;
s702: respectively calculating the specific gravities of the three first components in the sum, and sequencing the three calculated specific gravities from small to large to obtain a first specific gravity, a second specific gravity and a third specific gravity; of course, the three first components may be sorted from small to large, the sorted values are labeled as P1, P2, and P3, and then the specific gravity ui = Pi/S of the sum S of P1, P2, and P3 is calculated, so as to obtain a first specific gravity u1, a second specific gravity u2, and a third specific gravity u3;
s703: calculating to obtain a first accumulated sum specific gravity according to the first specific gravity; specifically, the first cumulative sum specific gravity W1= u1;
s704: calculating to obtain a second accumulated specific gravity according to the first specific gravity and the second specific gravity; specifically, the second cumulative sum specific gravity W2= u1+ u2.
S705: and calculating the Keyny coefficient of the pixel according to the first accumulated sum specific gravity and the second accumulated sum specific gravity. Specifically, the kini coefficient G is calculated according to the first formula described below.
The first formula:
Figure BDA0001360764490000071
s8: and judging whether the component mean value of the pixel is greater than or equal to the color tolerance index, namely judging whether V is greater than or equal to T, if so, executing the step S9, and if not, executing the step S12.
S9: in this embodiment, the preset threshold is 0.4, that is, it is determined whether G > 0.4 is satisfied, if so, step S10 is executed, and if not, step S11 is executed.
S10: embedding information to be hidden in the lower four bits of the weakest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel; step S15 is performed.
S11: embedding information to be hidden in the lower four bits of the three color components of the pixel; step S15 is performed.
S12: and judging whether the Keyny coefficient of the pixel is larger than a preset threshold value or not, namely judging whether G is larger than 0.4 or not, if so, executing a step S13, and if not, executing a step S14.
S13: embedding information to be hidden in the lower four bits of the strongest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel; step S15 is performed.
S14: embedding information to be hidden in the lowest bits of the three color components of the pixel; step S15 is performed.
S15: and judging whether the information to be hidden is embedded completely, if not, acquiring the next pixel of the image, and executing the step S5.
For steps S8 to S14, if V is greater than or equal to T, it indicates that the pixel has a strong color, and hidden information can be embedded in the lower four bits of more color components, and due to the coverage of the strong color of the upper four bits, the hidden information embedded in the lower four bits does not cause obvious influence on the visual perception of people. If the Keynie coefficient G is less than 0.4, the R, G and B of the pixel are strong color with similar intensity, and information can be embedded in the lower four bits without obviously influencing visual effect; if the Keyny coefficient G is larger than or equal to 0.4, at least one relatively unbalanced weak color exists in R, G and B of the pixel, and the visual effect is mainly determined by other strong colors, so that 4-bit information can be embedded in the lower four bits of the color component with the weakest color, and 1-bit information can be embedded in the other color components only in the lowest bits.
If V < T, it indicates that the pixel is not intense in color, and it is not necessary that all color components embed information in the lower four bits. If the Keyny coefficient G is less than 0.4, the R, G and B of the pixel are weak colors with similar intensities, and information can be embedded only in the lowest 1 bit, so that the visual effect is not influenced. If the Keyny coefficient G is more than or equal to 0.4, at least one strong unbalanced color exists in R, G and B of the pixel, and the visual effect is mainly determined by the high four bits and the low bit of the strong color, so that 4-bit information can be embedded in the low four bits of the color component with the strongest color, and 1-bit information is embedded in the other color components only at the lowest bit.
The information to be hidden needs to be converted into binary number, and the information embedded in each pixel is obtained from the information to be hidden in sequence.
The economic indicator, the kini (Gini) coefficient, used in this embodiment is an indicator for indicating the fairness of social income distribution. The embodiment utilizes the calculation principle of the kini coefficient to calculate the kini coefficient of the pixel color component, which is used for indicating the fairness index of color distribution. In pixels with unfair color distribution, it is indicated that there are strong colors and weak colors, and the influence on human vision is mainly determined by some strong color, so that more information can be embedded in some color components without influencing the visual effect.
The embodiment expands the limitation that the traditional least significant bit method can only embed information at the lowest bit, and realizes the maximum embedding of information at the lower four bits, so the capacity of hidden information is greatly improved; meanwhile, because the number of bits of the information which can be embedded into each pixel is different and can be changed along with the difference of the image content, the method is not an information hiding method with a fixed position and has changed dynamics, the complexity of information embedding and reading is much higher than that of a static method, the hidden information is more difficult to guess and crack by people, and the safety of the hidden information is improved.
Example two
The present embodiment is a specific application scenario of the first embodiment.
Suppose the information to be hidden is 011111001000111001.
Assume that an image as an information hiding carrier has two pixels, wherein the three color components of the first pixel are 00011001 (R), 00001000 (G) and 00000111 (B), respectively, and the three color components of the second pixel are 11110001 (R), 11100000 (G) and 11110011 (B), respectively.
The first components of the two pixels, i.e., the lower four positions 0 of the color component, are extracted, the three first components of the first pixel are 00010000, 00000000, and 00000000, respectively, and the three first components of the second pixel are 11110000, 11100000, and 11110000, respectively.
The above six first components correspond to decimal values respectively: 16,0, 240, 239, 240; then the average main color intensity of the image M = (16 +0+240+239+ 240)/6 =122; the color tolerance index T =1.5 × M =183 of the image.
An average value V1= (16 + 0)/3 =5.33 of the three first components of the first pixel is calculated.
After the three first components of the first pixel are sorted from small to large, the specific gravity is calculated, and u1= 0/(0 + 16) =0, u2= 0/(0 + 16) =0, and u3= 16/(0 + 16) =1; then calculating a first cumulative sum specific gravity W1= u1=0, a second cumulative sum specific gravity W2= u1+ u2=0; substituting W1 and W2 into the first formula, the first pixel has a damping coefficient G1=0.667.
For the first pixel, since V1<T, and G1>0.4, so information is embedded in the strong color four bits lower, and the lowest of the 2 weak colors. The embedded value is represented by underlining, and the three color components of the first pixel after information embedding hiding are respectively: 00010111,00001001,00000111(ii) a That is, the first four bits of 00011001 are 0111, the lowest bit of 00001000 is the fifth bit 1, and the lowest bit of 00000111 is the sixth bit 1.
At this point the information is not fully embedded and so the next pixel is traversed on.
The average value V2= (240 +239+ 240)/3 =239.67 for the three first components of the second pixel is calculated.
The specific gravities are calculated after the three first components of the second pixel are sorted from small to large, and respectively are u1= 239/(240 +239+ 240) =0.332, u2= 240/(240 +239+ 240) =0.334, and u3=0.334; then calculating a first cumulative sum specific gravity W1= u1=0.332, a second cumulative sum specific gravity W2= u1+ u2=0.666; substituting W1 and W2 into the first formula, the second pixel has a kini coefficient G2=0.0013.
For the second pixel, since V2 > T, and G2<0.4, so the pixel is a well balanced strong color, four lower per color componentThe bits may embed information. The embedded value is underlined, and then the three color components of the second pixel after information embedding hiding are: 11110010,11100011,11111001(ii) a That is, the lower four bits of 11110000 are set to the seventh bit to the tenth bit 0010 of the information to be hidden, the lower four bits of 11100000 are set to the eleventh bit to the fourteenth bit 0011 of the information to be hidden, and the lower four bits of 11110000 are set to the fifteenth bit to the eighteenth bit 1001 of the information to be hidden.
At this time, the information 011111001000111001 is completely embedded and hidden in the image pixel, and the information steganography process is completed.
EXAMPLE III
The present embodiment is a computer-readable storage medium corresponding to the above-mentioned embodiments, on which a computer program is stored, which when executed by a processor, performs the steps of:
acquiring three color components of each pixel in an image;
the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel;
calculating the average value of three first components of all pixels in the image to obtain the average main color intensity of the image;
calculating to obtain a color margin index of the image according to the average main color intensity and a preset margin coefficient;
traversing each pixel in the image;
calculating the average value of three first components of a pixel to obtain the component average value of the pixel;
calculating a kini coefficient of the pixel according to the three first components of the pixel;
and embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kuni coefficient of the pixel and a preset threshold.
Further, after the "calculating the color abundance index of the image" further includes:
if the color margin index is greater than 255, the color margin index is set to 255.
Further, the "calculating the kini coefficient of the pixel according to the three first components of the pixel" specifically includes:
calculating the sum of the three first components of the pixel;
respectively calculating the specific gravities of the three first components in the sum, and sequencing the three calculated specific gravities from small to large to obtain a first specific gravity, a second specific gravity and a third specific gravity;
calculating to obtain a first accumulated sum specific gravity according to the first specific gravity;
calculating to obtain a second accumulated specific gravity according to the first specific gravity and the second specific gravity;
and calculating the Keyny coefficient of the pixel according to the first accumulated sum specific gravity and the second accumulated sum specific gravity.
Further, the "embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kini coefficient of the pixel and the preset threshold" specifically includes:
if the component mean value of the pixel is greater than or equal to the color tolerance index and the Keyny coefficient of the pixel is less than or equal to a preset threshold value, embedding information to be hidden in the lower four bits of the three color components of the pixel;
if the component average value of the pixel is greater than or equal to the color abundance index and the kini coefficient of the pixel is greater than a preset threshold value, embedding information to be hidden in the lower four bits of the weakest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel;
if the component mean value of the pixel is smaller than the color abundance index and the Keyny coefficient of the pixel is smaller than or equal to a preset threshold value, embedding information to be hidden in the lowest position of the three color components of the pixel;
if the component mean value of the pixel is smaller than the color tolerance index and the Keyny coefficient of the pixel is larger than a preset threshold value, embedding information to be hidden in the lower four bits of the strongest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel.
In summary, the dynamic information steganography method and the computer-readable storage medium provided by the present invention determine the color intensity of a pixel based on the image global color abundance index and the single-pixel color kuni index, so as to embed more information in some color components without affecting the visual effect; the invention expands the limitation that the traditional least significant bit method can only embed information at the lowest bit, so that the maximum information can be embedded at the lower four bits, thereby greatly improving the capacity of hidden information; meanwhile, because the number of bits of the information which can be embedded into each pixel is different and can be changed along with the difference of the image content, the method is not an information hiding method with a fixed position and has changed dynamics, the complexity of information embedding and reading is much higher than that of a static method, the hidden information is more difficult to guess and crack by people, and the safety of the hidden information is improved.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all equivalent changes made by using the contents of the present specification and the drawings, or applied directly or indirectly to the related technical fields, are included in the scope of the present invention.

Claims (6)

1. A method for dynamic steganography, comprising:
acquiring three color components of each pixel in an image;
the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel;
calculating the average value of three first components of all pixels in the image to obtain the average main color intensity of the image;
calculating to obtain a color margin index of the image according to the average main color intensity and a preset margin coefficient;
traversing each pixel in the image;
calculating the average value of three first components of a pixel to obtain the component average value of the pixel;
calculating to obtain a Gini coefficient of the pixel according to the three first components of the pixel;
embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kuni coefficient of the pixel and a preset threshold;
the "calculating the kini coefficient of the pixel according to the three first components of the pixel" specifically includes:
calculating a sum of three first components of the pixel;
respectively calculating the proportions of the three first components in the sum, and sequencing the three proportions from small to large to obtain a first proportion, a second proportion and a third proportion;
calculating to obtain a first accumulated sum specific gravity according to the first specific gravity;
calculating to obtain a second accumulated specific gravity according to the first specific gravity and the second specific gravity;
and calculating the Keyney coefficient of the pixel according to the first accumulated sum proportion and the second accumulated sum proportion.
2. The method according to claim 1, wherein said step of calculating the color tolerance index of the image further comprises:
if the color margin index is greater than 255, the color margin index is set to 255.
3. The method according to claim 1, wherein said embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kuni coefficient of the pixel and the preset threshold value is specifically:
if the component mean value of the pixel is larger than or equal to the color abundance index and the Keyny coefficient of the pixel is smaller than or equal to a preset threshold value, embedding information to be hidden in the lower four bits of the three color components of the pixel;
if the component mean value of the pixel is greater than or equal to the color abundance index and the kuni coefficient of the pixel is greater than a preset threshold, embedding information to be hidden in the lower four bits of the weakest color component of the pixel, and embedding information to be hidden in the lowest bits of the other color components of the pixel;
if the component mean value of the pixel is smaller than the color abundance index and the Keyny coefficient of the pixel is smaller than or equal to a preset threshold value, embedding information to be hidden in the lowest position of the three color components of the pixel;
if the component mean value of the pixel is smaller than the color tolerance index and the Keyny coefficient of the pixel is larger than a preset threshold value, embedding information to be hidden in the lower four bits of the strongest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel.
4. A computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, carries out the steps of:
acquiring three color components of each pixel in an image;
the lower four bits of the three color components of each pixel are set to be zero to obtain three first components of each pixel;
calculating the average value of three first components of all pixels in the image to obtain the average main color intensity of the image;
calculating to obtain a color margin index of the image according to the average main color intensity and a preset margin coefficient;
traversing each pixel in the image;
calculating the average value of three first components of a pixel to obtain the component average value of the pixel;
calculating to obtain a Gini coefficient of the pixel according to the three first components of the pixel;
embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean value of the pixel and the color abundance index and the comparison result of the kuni coefficient of the pixel and a preset threshold;
the "calculating the kini coefficient of the pixel according to the three first components of the pixel" specifically includes:
calculating a sum of three first components of the pixel;
respectively calculating the specific gravities of the three first components in the sum, and sequencing the three calculated specific gravities from small to large to obtain a first specific gravity, a second specific gravity and a third specific gravity;
calculating to obtain a first accumulated sum specific gravity according to the first specific gravity;
calculating to obtain a second accumulated specific gravity according to the first specific gravity and the second specific gravity;
and calculating the Keyny coefficient of the pixel according to the first accumulated sum specific gravity and the second accumulated sum specific gravity.
5. The computer-readable storage medium of claim 4, wherein after calculating the color abundance index of the image, further comprising:
if the color rich index is greater than 255, the color rich index is set to 255.
6. The computer-readable storage medium according to claim 4, wherein the embedding information to be hidden in the lower four bits or the lowest bit of the three color components of the pixel according to the comparison result of the component mean of the pixel and the color abundance index and the comparison result of the kuni coefficient of the pixel and the preset threshold is specifically:
if the component mean value of the pixel is greater than or equal to the color tolerance index and the Keyny coefficient of the pixel is less than or equal to a preset threshold value, embedding information to be hidden in the lower four bits of the three color components of the pixel;
if the component average value of the pixel is greater than or equal to the color abundance index and the kini coefficient of the pixel is greater than a preset threshold value, embedding information to be hidden in the lower four bits of the weakest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel;
if the component mean value of the pixel is smaller than the color abundance index and the Keyny coefficient of the pixel is smaller than or equal to a preset threshold value, embedding information to be hidden in the lowest position of the three color components of the pixel;
if the component mean value of the pixel is smaller than the color tolerance index and the Keyny coefficient of the pixel is larger than a preset threshold value, embedding information to be hidden in the lower four bits of the strongest color component of the pixel, and embedding information to be hidden in the lowest bits of other color components of the pixel.
CN201710616729.5A 2017-07-24 2017-07-24 Dynamic information steganography method and computer readable storage medium Active CN109300077B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710616729.5A CN109300077B (en) 2017-07-24 2017-07-24 Dynamic information steganography method and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710616729.5A CN109300077B (en) 2017-07-24 2017-07-24 Dynamic information steganography method and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN109300077A CN109300077A (en) 2019-02-01
CN109300077B true CN109300077B (en) 2023-03-28

Family

ID=65168039

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710616729.5A Active CN109300077B (en) 2017-07-24 2017-07-24 Dynamic information steganography method and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN109300077B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103903214A (en) * 2013-12-16 2014-07-02 浙江工业大学 Method for assessing DCT-domain image steganography capacity based on MCUU model
CN105376541A (en) * 2014-08-29 2016-03-02 展讯通信(天津)有限公司 Image processing system and method
CN106780283A (en) * 2016-12-27 2017-05-31 Tcl集团股份有限公司 Steganography information coding method and device and steganography information decoding method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AUPS206802A0 (en) * 2002-05-01 2002-06-06 Canon Kabushiki Kaisha Steganographic image encoding
EP2297695B1 (en) * 2008-06-06 2018-08-08 FotoNation Limited Techniques for reducing noise while preserving contrast in an image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103903214A (en) * 2013-12-16 2014-07-02 浙江工业大学 Method for assessing DCT-domain image steganography capacity based on MCUU model
CN105376541A (en) * 2014-08-29 2016-03-02 展讯通信(天津)有限公司 Image processing system and method
CN106780283A (en) * 2016-12-27 2017-05-31 Tcl集团股份有限公司 Steganography information coding method and device and steganography information decoding method and device

Also Published As

Publication number Publication date
CN109300077A (en) 2019-02-01

Similar Documents

Publication Publication Date Title
US8355566B2 (en) Method and device for use in converting a colour image into a grayscale image
EP3410685B1 (en) Image processing device, image processing method, and program
TWI376648B (en) Method and device for keeping image background by multiple gauss models
CN104182927B (en) Picture watermark adding method and device
CN101739657A (en) DCT domain-based color image digital watermark embedding method and DCT domain-based color image digital watermark extracting method
CN105894491A (en) Image high-frequency information positioning method and device
CN107888925A (en) A kind of embedding grammar and detection method of digital video hiding information
JP5847341B2 (en) Image processing apparatus, image processing method, program, and recording medium
CN114626967A (en) Digital watermark embedding and extracting method, device, equipment and storage medium
JP4777185B2 (en) Image processing apparatus and control method thereof, computer program, computer-readable storage medium, and image encoding apparatus
Garg et al. Comparison Of Lsb & Msb Based Steganography
CN105955754B (en) A kind of user interface character displaying method and device
US10445865B1 (en) Method and apparatus for converting low dynamic range video to high dynamic range video
CN112507923A (en) Certificate copying detection method and device, electronic equipment and medium
CN104346809A (en) Image quality evaluation method for image quality dataset adopting high dynamic range
CN111784703A (en) Image segmentation method and device, electronic equipment and storage medium
CN109472874B (en) Display method, display device, VR display device and storage medium
CN104281850A (en) Character area identification method and device
CN105898324A (en) Video watermark hidden insertion method and device
CN109300077B (en) Dynamic information steganography method and computer readable storage medium
CN105554488B (en) Signal conversion method
CN113962838A (en) Watermark image embedding/enhancing method, device and computer system
US20110170774A1 (en) Image manipulating system and method
Biswas Novel gray scale conversion techniques based on pixel depth
CN106055632A (en) Video authentication method based on scene frame fingerprints

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant