Background
With the advent of the 5G age, the transmission rate of networks has been greatly improved. People can acquire a lot of information in different forms from the network more conveniently and quickly, including characters, pictures, videos and the like. Although the life of people is greatly enriched, a lot of information leakage is caused.
The picture is used as a most common carrier of information, the information is hidden in the image, the information transmission quantity can be greatly improved, and meanwhile, the information can be well protected. However, the image with hidden information needs to be uploaded, transmitted, downloaded and the like on the network, and is subject to interference of different degrees and different types of interference sources, so that the secret information is also damaged to different degrees after being extracted from the image, if the secret information is an image, namely, the secret image is hidden in another image, the secret image is extracted after being transmitted on the network, and the secret image may have larger difference from the original secret image.
If the secret information and the carrier are images, the hidden image is destroyed after the noise is destroyed, the destroyed bit of the hidden image is marked, if the upper 5 bits of the hidden image pixel are not destroyed, the difference between the pixel and the original pixel is smaller, the pixel is called as a trusted pixel, otherwise, the pixel is not the trusted pixel. And determining an untrusted pixel distortion range, searching a restoration value by using a group intelligent symbiotic biological search algorithm, and recovering the hidden image.
Disclosure of Invention
The invention aims at overcoming the defects of the prior art and provides an information hiding image recovery method based on symbiont searching. The hidden image recovered by the method has good vision and higher peak signal-to-noise ratio.
The technical scheme for realizing the aim of the invention is as follows:
an information hidden image restoration method based on symbiont search comprises the following steps:
1) Restoring the hidden image, namely restoring the unreliable pixels, supposing that m bits of the unreliable pixels p are damaged, and because the damaged bits take 0 or 1,2 m possible values are shared, enabling k= m and k to be the number of the hidden image symbiont search ecosystem population, setting an individual ecosystem population established by the k possible values of the unreliable pixels p as X= { p 1,p2,p3,…,pk }, setting the maximum value of the population X as ub = max { p 1,p2,p3,…,pk }, and the minimum value as lb = min { p 1,p2,p3,…,pk }, wherein the search range of the ecosystem is [ lb, ub ], the maximum iteration number of the search is 2 m, the variance is represented by variance, the smaller the fitness is better, the larger the variance is the worse the fitness is, the trusted pixels in p neighborhood are searched, calculating the individual and the neighbor trusted pixels in the population X, and selecting the individual with the best fitness as the current optimal variance Pbest;
2) The mutilation phase of hidden image recovery is that two possible values p i and p j are randomly selected from the population X of hidden image pixels p and i+.j, and the relation feature vector between p i and p j is calculated:
MV=(pi+pj)/2,
Possible values of hidden image pixel mutually beneficial symbiotic relationship:
pinew=pi+α*(Pbest-MV*BF1),
pjnew=pj+β*(Pbest-MV*BF2),
Wherein BF 1 and BF 2 are benefit factors, the value of the benefit factors is 0 or 1, alpha and beta are random numbers in the interval of [0,1],
Calculating the variance of p inew、pjnew and the neighborhood credible pixels, wherein if the variance var (p inew) < variance var (p i), p inew is used for replacing p i to update the population X of the hidden image pixel points p, otherwise, p i is kept unchanged, and similarly, if the variance var (p jnew) < variance var (p j), p jnew is used for replacing p j in the population X of the hidden image pixel points p, otherwise, p j is kept unchanged;
3) The partial symbiotic phase of hidden image recovery, namely randomly selecting another possible pixel value p l (i noteq.l) from the group X of hidden image pixel points p, calculating the profit situation of p i from the symbiotic relation of p l, while p l is unchanged, and the calculation method is as follows:
pinew=pi+δ*(Pbest-pl),
Wherein δ is a random number between [ -1,1], calculating the variance of p inew and the trusted pixels in the neighborhood, if the variance var (p inew) < variance var (p i), replacing p i of the population X of hidden image pixels p with p inew, otherwise, p i remains unchanged;
4) The parasitic phase of hidden image recovery is that a pixel estimated value is randomly generated in the [ lb, ub ] interval:
pinew=lb+φ*(ub-lb),
And if the variance var (p inew) < variance var (p i), p inew is used for replacing p i of the population X of the hidden image pixel point p, otherwise, p i is kept unchanged, the variance of each individual in the population X and the trusted pixels in the pixel p neighborhood is calculated again, the individual with the best adaptability is selected as the current optimal solution Prest, step 2), step 3) and step 4) are repeated for 2 m times, the smallest variance value in the population X of the restored image pixel p is found out and is used as the restoration value of the restored pixel p, and the hidden image is restored.
The hidden image recovered by the method has good vision and higher peak signal-to-noise ratio.
Detailed Description
The following describes the invention in more detail with reference to examples, but is not intended to limit the invention.
Examples:
an information hidden image restoration method based on symbiont search comprises the following steps:
1) Initialization of the ecosystem for hidden image recovery: restoring the hidden image, namely restoring the unreliable pixels, assuming that m bits of the unreliable pixels p are destroyed, and 2 m possible values are obtained as the destroyed bits are 0 or 1, so that k=2 m and k are the number of the hidden image symbiont searching ecosystem population, and setting the individual ecosystem population established by the k possible values of the unreliable pixels p as X= { p 1,p2,p3,…,pk }, wherein the maximum value of the population X is ub=max { p 1,p2,p3,…,pk }, and the minimum value is lb=min { p 1,p2,p3,…,pk }, and the range of the ecosystem searching is as follows: [ lb, ub ] the maximum iteration number of the search is 2 m, the variance is used for representing the fitness, the smaller the variance is, the better the fitness is, the larger the variance is, the worse the fitness is, the trusted pixel in p adjacent areas is searched, the variance var (p i) of each individual and the neighborhood trusted pixel in the population X is calculated, the individual with the best fitness is selected as the current optimal solution Prest, in the example, the image block center pixel p=132 is assumed to be an unreliable pixel, namely p is a distortion pixel point to be repaired, two trusted points {157,152} are arranged in 3X 3 adjacent areas with p as the center, as the 4 th bit and the 5 th bit of the pixel are destroyed, the destroyed bit number m=2, the destroyed bit is randomly taken as 0 or 1, the initial population X= {132,140,148,156} of the pixel p ecosystem is formed, 2 2 =4 individuals are shared, the maximum value lb=156 is assumed, namely the maximum iteration number of the search is 4, the initial population X is calculated as the maximum iteration number of the search, the variance of each pixel is 132,156, the variance of each individual in the initial population X is calculated, the {175,76.3333,20.3333,7}, the individual with the smallest variance, i.e. the best fitness, is selected as the current optimal solution pbest=156;
2) The mutilation phase of hidden image recovery is that two possible values p i and p j are randomly selected from the population X of hidden image pixels p and i+.j, and the relation feature vector between p i and p j is calculated:
MV=(pi+pj)/2,
Possible values of hidden image pixel mutually beneficial symbiotic relationship:
pinew=pi+α*(Pbest-MV*BF1),
pjnew=pj+β*(Pbest-MV*BF2),
Wherein BF 1 and BF 2 are benefit factors, the benefit factors have values of 0 or 1, alpha and beta are random numbers in the [0,1] interval, the adaptability of p inew、pjnew and the neighborhood credible pixels is calculated, if the variance var (p inew) < variance var (p i), p i is replaced by p inew, the population X of the hidden image pixels p is updated, otherwise, p i is kept unchanged, the same is treated as p jnew, in this example, one possible value p 1 =132 is randomly selected from the population X of the hidden image pixels p, another possible value p 2 =140 is randomly selected, and the relation feature vector between p 1 and p 2 is calculated:
MV=(132+140)/2=136,
Assuming that the benefit factors BF 1 =1 and BF 2 =0, the random numbers α=0.5, β=0.5, the possible values of the hidden image pixel mutually beneficial symbiotic relationship are as follows:
p1new=132+0.5*(156-136*1)=142,
p2new=140+0.5*(156-136*1)=150,
calculating and comparing the variances of the new individuals and the original individuals, wherein var (142) =58.3333 < var (132) =175 and var (150) =13 < var (140) = 76.3333, replacing 132 with 142 and 140 with 150 to obtain a new population X= {142,150,148,156} of hidden image pixels p;
3) The partial symbiotic stage of hidden image restoration, namely, randomly selecting another possible pixel value p j from the group X of hidden image pixel points p, calculating the profit situation of p i from the symbiotic relation of p j, and keeping p j unchanged, wherein the calculation method is as follows:
pinew=pi+δ*(Pbest-pj),
Where δ is a random number between [ -1,1], calculating the variance of p inew and the trusted pixels in the neighborhood, if var (p inew)<var(pi), replacing p i with p inew and updating the population X of hidden image pixels p, otherwise, p i remains unchanged, in this example, selecting another pixel possible value p 3 randomly from the population X of hidden image pixels p, calculating the profit in the symbiotic relationship of 142 and 148, and 148 remains unchanged, assuming the random value δ=0.2 calculation method:
p1new=142+0.2*(156-148)=143.6,
Since var (143.6) =45.8533 < var (142) = 58.3333, replace 142 with 143.6 to update the population x= {143.6,150,148,156} of hidden image pixels p;
4) The parasitic phase of hidden image recovery is that a pixel estimated value is randomly generated in the [ lb, ub ] interval:
pinew=lb+φ*(ub-lb),
Wherein, phi is a random number in [0,1] interval, calculate the variance of p inew and trusted point in the neighborhood, if var (p inew)<var(pi), replace p i with p inew, and update the population X of hidden image pixel point p, otherwise, p i remains unchanged, repeat step 2), step 3), step 4) until the iteration number reaches 2 m, find out the minimum value of the variance in the population X of restored image pixel p, as the restoration value of restored pixel p, restore the hidden image, in this example, randomly generate a pixel estimation value in [132,156] interval, assume phi=0.3:
p1new=132+0.3*(156-143.6)=135.72,
since var (135.72) =123.8128 > var (143.6) = 45.8533, 143.6 remains unchanged, the variance corresponding to each individual of the new population of pixels x= {143.6,150,148,156} of pixel p is calculated again as {45.8533,13,20.3333,7}, 156 is selected as the current optimal solution because the variance of 156 is the smallest, steps 2), 3) and 4) are repeated for 4 times, and finally the value with the smallest variance in population X is selected as the restoration value of pixel p.