Image transformation and information hiding technology based on genetic algorithm
EURASIP Journal on Image and Video Processing volume 2018, Article number: 115 (2018)
Information hiding technology has always been a hot research field in the field of information security. How to hide information in images is also a major research field of image transformation. Today’s information hiding technology has the problems of complicated encryption technology and large amount of information. Based on the genetic algorithm, this paper studies the image information hiding technology based on genetic algorithm, performs image simulation on different types of mothers, and displays the results. For the images that need to be hidden, no matter how the size changes, the mother image can achieve good information hiding. The change of the parent image is not large. Compared with the Least Significant Bit (LSB) technique, this method has a larger peak signal-to-noise.
With the increasing popularity of computer network applications, information security has become a hot area, and information hiding technology has become the focus of information security technology. Information hiding hides information such as plain text and password images in multimedia information, like images, videos, and audio. Since the information hiding technology mainly hides the existence of information, it is not easy to attract the attention of the attacker, and only the authorized legal users can use the corresponding method to accurately extract the secret information from the carrier information. It is precisely because of this information hiding technology that shows its strong advantages and development potential in the field of information security.
Information hiding technology is a cross-discipline. It involves mathematics, cryptography, information theory, computer vision, and other computer application technologies. It is a hot topic that researchers in various countries pay attention to and study. In the research of information hiding, the research results of information hiding carriers are rich now. The principle is to use the redundant information existing in the image to hide the secret object in order to achieve digital signature and authentication or achieve secure communication. At present, it is easier to attack and intercept data transmitted over the Internet through the Internet. If some important secret information is maliciously destroyed or eavesdropped during transmission, it will cause incalculable losses to users. How to provide a secure transmission method for users, that is, to transmit information in a secret manner and avoid the perception of third-party recipients, has become an urgent problem that needs to be solved and thus has led to the rapid development of information hiding technology. After years of research, information hiding technology has developed rapidly, and many information hiding algorithms have also been proposed [1,2,3,4]. Although in some respects it has been relatively mature, there are still a large number of practical problems to be solved such as information hiding capacity, anti-attack, and anti-statistical analysis. Therefore, there are many places where information hiding technology is worth for further research to better apply to the field of information security.
The basic idea of information hiding is to embed secret information into a carrier signal through an embedded algorithm in the process of hiding information to generate a hidden carrier that is not easily perceived. Secret information is released through the transmission of hidden carriers. It is difficult for a person trying to illegally steal information to visually distinguish whether other seemingly unknown secret information is concealed in this seemingly ordinary carrier signal. Even if hidden information is found in the transmitted information, such information is difficult to extract and delete, so that information encryption transmission can be realized in this way. Information hiding technology plays an important role in protecting important information from being destroyed or stolen. Therefore, compared with traditional cryptography, information hiding technology addresses information security issues from different perspectives. Traditional cryptography [5,6,7,8] favors protecting the information content itself. After being encrypted, the secret information becomes a garbled code, making it difficult to understand, but it is also very obvious that this garbled is telling others that the information is very important. It is easy to attract the attention of the attackers, stimulate the motivation of illegal interceptors to crack confidential information, and increase the risk of this information being intercepted and attacked. Information hiding technology can greatly reduce the probability that information is intercepted and attacked. However, this does not mean that information hiding technology can replace encryption technology because both research have different aspects of protected information. It is to strengthen the security of information from different perspectives. First of all, the encryption technology mainly covers information by masking the information content, while the information hiding technology is realized by covering the existence of information. Encryption process is equivalent to adding a lock on the content of information without being cracked. Information hiding technology is to disguise the content of information through another carrier and not be discovered by others. Therefore, the two are not only inconsistent but also complementary. If we can combine the two, we can better protect secret information.
Genetic algorithm [9,10,11] is a computational model designed by simulating Darwin’s genetic selection and biological evolution. The most important idea of Darwin’s genetic selection evolution is the survival principle of the fittest, which means that when the environment changes, only Individuals who can adapt to the environment can survive. In the evolutionary process, individuals with good quality are mainly preserved and combined through genetic manipulation, so that new individuals are continuously produced. Each individual will inherit the basic characteristics of the father but will produce new changes that are different from the parent, so that the population will evolve forward and continue to approach or obtain the optimal solution. Genetic algorithms have a good ability to solve complex system optimization problems, especially some combinatorial optimization problems, and have been solved in complex problems , image processing [13, 14], image partitioning [15, 16], machine learning [17, 18], and artificial life [19, 20]; and other fields have been successfully applied and show good performance.
At present, the main contents of information hiding algorithm research include the relationship between the embedded strength of information [21, 22], hidden capacity [23, 24], and imperceptibility. In order to find hidden algorithms that meet the invisibility and large capacity of the carrier image at the same time, some scholars use genetic algorithms to optimize the embedded parameters and find the optimal solution, thus opening up a new research approach. Genetic algorithm is an optimized search algorithm with strong robustness. It can quickly and efficiently calculate complex nonlinear multidimensional data. It is good at solving global optimization problems. Genetic algorithms have two distinct characteristics, namely global search characteristics and parallelism. At present, the research of genetic algorithm in information hiding is mainly applied in some digital watermarking technologies . The goal of using genetic algorithm to optimize is mainly to search for appropriate embedded parameters and embedded positions, and genetic algorithms are used to optimize the objective function consisting of invisibility and robustness.
This chapter proposes an information hiding algorithm based on genetic algorithm. The implementation process of genetic algorithm in information hiding is introduced, including the coding method, fitness function, selection of genetic operator, and the processing of operating parameters and constraints of genetic algorithm. The hidden algorithm and extraction algorithm are proposed. By applying an airspace information hiding algorithm, the algorithm is relatively simple and practical. In order to reduce the influence on the visual effect of the image when hiding information, the optimal embedded method of secret information is found by introducing a genetic algorithm. Moreover, according to the requirements of the fitness function taken, the quality of the image after hiding the information is greatly improved. The main contributions of this article can be described as follows: This paper establishes image information hiding method based on genetic algorithm from multiple steps of population, coding, genetics, and variation and compares it with LSB method. The simulation results show that this method can achieve better hiding effect and analyze the result. In Chinese, this paper transforms hidden images to test the robustness of genetic algorithms.
2 Proposed method
2.1 Genetic algorithm
Because of the uncertainty of genes in the genetic process, it is impossible to crack this process, so the use of information hiding can enhance the difficulty of cracking. The genetic algorithm was first proposed by Professor J. Holland in 1975. By simulating the process of natural selection and mating, reproduction, and mutation that occur in heredity, we started from an initial population and generated random selection, crossover, and mutation operations. The new and more suitable individuals for the environment have evolved populations into areas where the search space is increasingly closer to optimal solutions. Through such continuous iteration and evolution from generation to generation, it gradually converges to a group of individuals who are most suitable for the environment and finally achieves the goal of finding the optimal solution or approaching the optimal solution.
The natural evolution process takes population as the unit, through the intersection of genes, variation, and the choice of competitive environment to achieve the continuous development of species. Therefore, in the genetic algorithm, a gene is a basic genetic unit that occupies a certain position in a chromosome. It is also called a genetic factor. A plurality of genes compose a chromosome. The composition ratio of different genes and their arrangement order determines the individual’s manifestation, namely the level of fitness. Chromosomes are the main carriers of genetic material. The internal components of genes are composed of genes. The internal genes determine the external performance of individuals. In genetic algorithms, chromosomes correspond to solutions’ code. An individual is an entity with a characteristic chromosome, which is the solution in the solution space of a genetic algorithm. A population is a collection of genetically encoded individuals. The number of individuals in a population is called the population size.
The genetic algorithm can effectively use the information of the parent individuals throughout the evolutionary process to select and speculate on the better performing solutions in the next generation of individuals. When designing a genetic algorithm, the five major components involved are parameter encoding, initial population setting, fitness function determination, genetic manipulation, and control parameter selection. The genetic algorithm starts from any initialized population and selects the good individuals with large applicability values to the next generation. Crossover is the exchange of information between excellent individuals. Variation is the introduction of new individuals to maintain the diversity of populations. It is approximated by many iterations to the nearest point in the search space until it converges to the optimal solution point. The population size refers to the total number of individuals in any generation. The larger the population size, the more likely it is to find a global solution, but the running time is also relatively long. Generally, the value is between 40 and 100. Different values can be selected according to different requirements.
The basic process of genetic algorithm is shown in Fig. 1.
At present, the coding methods of genetic algorithms mainly include binary encoding and real encoding. Binary coding is the genetic manipulation and calculation of the bit string by mapping the original problem’s solution into a bit string consisting of 0,1. Real-coded encoding uses the decimal method to encode the solution to the problem and then directly performs genetic operations on the solution space. When designing and using genetic algorithms to optimize the solution space, the first important step is to encode the parameters of the problem sought. The choice of coding scheme is based on the nature of the problem sought and the design of the genetic operator. This paper selects the real number encoding, which is the decimal code we often use, and genetically manipulates the value of the arrangement position of the pixels of the secret information as the genetic value of the decision variable. Moreover, the use of real-coded to avoid cross-operations and mutations may lead to the same individual in the same chromosome. Two image encodings (Sk-need to hide images, C-maternal images) are grouped by a certain length. It is coded as follows:
2.1.2 Initial population
In genetic algorithms, after the coding design, the initial population needs to be set, and the iterative operation is started from the initial population until it terminates the iteration according to a certain termination criterion. The larger the initial population size, the wider the search range and the longer the genetic manipulation per generation. In contrast, the smaller the initial population setting, the smaller the corresponding search range and the shorter the genetic manipulation time per generation. One of the most commonly used initialization population methods is the unsupervised random initialization method. There are 2k! kinds of possible occurrences of Sk. When the value is large, calculation is required for each case, the calculation difficulty will be quite large, and the operation efficiency will be very low. Therefore, one of the 2k! species sequences was randomly selected as the initial population.
2.1.3 Fitness function
The composition of the adaptation function is closely related to the objective function, which is often changed by the objective function. It is very important to choose the correct and reliable fitness function, because it will directly affect the convergence speed of the genetic algorithm and whether it can find the optimal solution. In order to be able to directly relate the fitness function to the individual quality of the population in the genetic algorithm, it is specified that the fitness value is always non-negative, and in any case, the larger the fitness value is, the better. The fitness scale transformations currently used are mainly linear scale transformations, power-scale transformations, and exponential scaling transformations. In this paper, peak signal-to-noise ratio (PSNR) is used as an index of image quality evaluation, and performance comparison between various algorithms can be performed conveniently. The peak signal-to-noise ratio of the mother image C and the secret image F is
The specific fitness function used in this algorithm can be defined as:
w is the scale-up factor used to amplify the differences between individuals in order to select individual performance evaluations. c is a constant, it can make some individuals with lower fitness also have the opportunity to enter the next generation, in order to maintain the diversity of the individual.
Selection: Selection is to select individuals with large values in the population to generate new populations, so that the individual values in the population continue to converge toward the optimal solution. The genetic algorithm uses a selection operator to select individuals. The operation process is a process in which the survival of the fittest takes place. Through this approach, the individual’s overall quality in a group is improved. The selection operator can select algorithms such as roulette selection, random traversal sampling, local selection, truncated selection, and tournaments. The first step in the selection process is to calculate the fitness. The fitness can be calculated according to the proportion, or the fitness can be calculated according to the sorting method. After calculating the fitness, the tall individuals who have selected the applicable values in the parent group according to the fitness enter the next generation group.
Crossover: Crossover is the process of selecting two individuals from the population and exchanging parts of the two individuals. This is the core of the genetic algorithm. When there are many identical chromosomes in the population or the chromosomes of the offspring are not much different from the previous generation, a new generation of chromosomes can be generated by chromosome crossing. When using crossover operations in a genetic algorithm, first randomly select two individuals to be mated in the new population, set the length of the selected individual bit string to k, and randomly select one or more integer points n in [1, k-1] as a cross position. Then, the crossover operation is performed according to the crossover probability P. The selected two individuals exchange their respective partial data according to the set requirements at the cross position to obtain two new individuals. Crossover operators commonly used by genetic algorithms have a little bit of crossover and multi-point intersections. This article chooses a single-point crossover operator.
Variation: The variation is that the offspring change the value of a position in the string by a small probability. In binary coding, it changes 1 to 0 and 0 to 1. Mutation operators provide new information for the population to maintain the diversity of the population’s chromosomes. The use of mutation in genetic algorithms is based on the set mutation probability P to change the value of the gene at the relevant gene position. The mutation operator in this paper uses a multi-point mutation operator for all gene segments. Firstly, determine whether each gene is mutated. If it is mutated, then a random number is generated between [0 2k-1], which is to transform the position of some hidden information. However, the newly generated random number cannot be equal to or adjacent to the current chromosome’s genetic value, that is, the newly generated value of the mutation cannot be duplicated or adjacent to the current chromosome’s contained gene value, so as to ensure that the replaced gene value does not conflict with the current gene value.
2.1.5 Control parameters
The control parameters mainly include population size, code length, number of iterations, mutation probability, and crossover probability. These parameters are all set to fixed values in the basic genetic algorithm. In addition, when selecting a specific operator, parameters related to the operator are also selected. The proper choice of genetic algorithm parameters directly relates to the convergence speed and accuracy of the algorithm. However, because there are many factors influencing the parameter selection, it is necessary to combine the characteristics of the problem itself to make a corresponding transformation, so that the genetic algorithm has the ability to solve and optimize different types of problems and powerful global search capabilities.
2.1.6 The choice of evolutionary termination criteria
There are two termination conditions of the loop, one is to set the maximum termination algebra, and the other is to terminate the loop when the conditions are met. The other is when the variance between the individual fitness in the population is less than a certain set value, the loop is terminated. In this paper, the algorithm is terminated if it meets the condition that the upper bound reached by the evolution algebra is 200 or the fourth consecutive generation has no change condition. After the individual with the highest fitness value finally decodes according to the encoding rules, it becomes the information hiding optimal distribution scheme.
2.2 Information hiding and extraction
Information hiding steps:
Encrypt the image
Select the mother image
Optimize embedding according to the genetic algorithm
Calculate the optimal solution and hide the image.
Image extraction steps:
Extract embedded information
According to the value of the genetic algorithm parameters do the appropriate operation to restore the secret information before embedding
The secret information is restored to the original image based on the scramble key and the seed.
2.3 Arnold transform
The Arnold transform is a transformation proposed by the Russian mathematician Vladimir I. Arnold, a 2D Arnold of N × N digital images.
Transform is defined as:
x, y are the pixel coordinates of the original image, and x’, y’ are the transformed pixel coordinates. Guarantee |ad-bc| = 1.
3 Experimental results
3.1 Picture attribute
In order to verify the feasibility and effectiveness of the algorithm, we chose four images as masters respectively. As shown in Fig. 4, the encrypted image has a size of 512 × 256. Four master images contain one shot with a phone named MI 4. Life photos, three pictures from the Internet, two of them are color pictures, 1 is a black and white picture, this article was sequentially encoded as 1 (life photos), 2 (Internet color pictures), 3 (Internet color pictures), and 4 (Internet black and white). Encrypted pictures come from the Internet.
3.2 Simulation environment
The data processing in this paper is based on the MATLAB R2014b 8.4 software environment operating system for Windows 7 Ultimate Edition 64-bit SP1.
3.3 Genetic algorithm parameters
In this paper, the genetic algorithm environment is set to population size = 30, crossover probability = 0.5, mutation probability = 0.02, and to find the optimal solution iterations = 200.
For image hiding technology, first of all, transform the image you want to hide and scramble the original image according to a certain coding method to form the key form. For a RGB image, original image, R layer, G layer, and B layer images, such as Fig. 2 are shown.
It can be seen from the results of Fig. 3 that the scrambling display effects of different layers are different. For example, the information of the R layer and the B layer is scrambled and the background is black, and there is a certain similarity between the two, but the scrambling result of the G layer is similar to the three-layer encrypted image, the only difference is the color. To display the original image, you need to reverse the settings. This can achieve the effect of image encryption.
Four parent maps and images that need to be embedded are shown in Fig. 4.
In order to be able to compare the effect of the encrypted image embedded in the mother map, this article changes the photos that need to be encrypted into different sizes for testing. The sizes are 512 × 256, 384 × 256, 256 × 256, and 128 × 256. After embedding the four parent images, the effect is as shown in Fig. 5.
Figure 5 shows the results of hidden pictures after they are coded by this method and hidden behind the parent figure. From the display results of the parent figure, the hidden method of this article can maintain good visual effects of the parent figure.
LSB algorithm is a commonly used information hiding algorithm. Peak signal-to-noise ratio represents the merits of the algorithm. Compared with LSB algorithm, the signal-to-noise ratio of this method is obviously higher. The result is shown in Fig. 6. The embedding effect is shown in Fig. 7. The result of Fig. 7 shows that the hidden effect of LSB is obviously worse than the method of this paper (Table 1).
The hiding capacity of the algorithm proposed in this paper can be adjusted according to specific conditions, and the amount of information per bit embedded in the image can be reached at most. Using the idea of genetic algorithm to get the most embedding effect, it can be seen from the experimental results that the effect of the vector image embedded in the information is basically consistent with that of the original image. The algorithm also has poor robustness and is easy to be attacked. It is also a common problem of using the airspace to hide information. As a non-deterministic quasi natural algorithm, genetic algorithm provides a new method for the optimization of complex systems and has proved to be effective. Although the genetic algorithm has a wide range of application value in many fields, it still has some problems. The scholars in various countries have been exploring the improvement of the genetic algorithm so that the genetic algorithm has a wider range of applications.
Least Significant Bit
Peak signal-to-noise ratio
Red Green Blue
Y.E. Wei, G.L. Wang, X.G. Gong, Internal information hiding algorithm based on discrete cosine transform in cloud computing environment[J]. Sci. Technol. Engrg. 18(7), 166–171 (2018)
Z. Shou, A. Liu, S. Li, et al., Spatial outlier information hiding algorithm based on complex transformation[C]// International Conference on Security, Privacy and Anonymity in Computation, Communication and Storage (Springer, Cham, 2017), pp. 241–255
Y. Liu, Information Hiding Algorithm of Wavelet Transform Based on JPEG Image[J] (Journal of Beihua University, 2017), 18(5), 697–700
W.A. Shukur, K.K. Jabbar, Information hiding using LSB technique based on developed PSO algorithm[J]. Int. J. Electr. Comput. Engrg. 81(2), 1156–1168 (2018)
D. Dolev, Dwork, et al., Non-malleable cryptography[J]. SIAM Rev. 45(4), 727–784 (2003)
D. Deutsch, A. Ekert, R. Jozsa, et al., Quantum privacy amplification and the security of quantum cryptography over noisy channels[J]. Phys. Rev. Lett. 77(13), 2818–2821 (1996)
T. Jennewein, C. Simon, G. Weihs, et al., Quantum cryptography with entangled photons[J]. Phys. Rev. Lett. 84(20), 4729 (2000)
O. Goldreich, Foundations of cryptography: basic applications[J]. J. ACM 10(509), 359–364 (2004)
D.E. Goldberg, Genetic algorithm in search optimization and machine learning[J]. Addison Wesley xiii(7), 2104–2116 (1989)
D.E. Goldberg, D.M. Goldberg, D.E. Goldberg, et al., Genetic algorithm is search optimization and machine learning[J]. xiii(7), 2104–2116 (1989)
K. Deb, S. Agrawal, A. Pratap, et al., A fast elitist non-dominated sorting genetic algorithm for multi-objective optimisation: NSGA-II[C]// International Conference on Parallel Problem Solving From Nature (Springer-Verlag, 2000), pp. 849–858
Y. Laalaoui, N. Bouguila, Pre-run-time scheduling in real-time systems: Current researches and Artificial Intelligence perspectives[J]. Expert Systems with Applications. 41(5), 2196–2210 (2014)
Jennane R, Almhdie-Imjabber A, Hambli R, et al. Genetic algorithm and image processing for osteoporosis diagnosis[C]// International Conference of the IEEE Engineering in Medicine & Biology. Conf. Proc. IEEE Eng. Med. Biol. Soc., 2010:5597
M. Yoshioka, S. Omatu, Noise reduction method for image processing using genetic algorithm[C]// IEEE International Conference on Systems, Man, and Cybernetics, 1997. Comput. Cybern. Simul. IEEE, 2650–2655, 3 (2002)
C. Alippi, R. Cucchiara, Cluster partitioning in image analysis classification: a genetic algorithm approach[C]// CompEuro’92. ‘Computer Systems and Software Engineering’, proceedings. IEEE, 139–144 (1992)
U. Maulik, S. Bandyopadhyay, Fuzzy partitioning using a real-coded variable-length genetic algorithm for pixel classification[J]. IEEE Trans. Geosci. Remote Sens. 41(5), 1075–1081 (2003)
M. Asjad, S. Khan, Analysis of maintenance cost for an asset using thegenetic algorithm[J]. International Journal of System Assurance Engineering & Management. 8(2), 1–13 (2016)
A.R.F. Pinto, A.F Crepaldi, M.S Nagano. A Genetic Algorithm applied to pick sequencing for billing[J]. J Int Manuf. 1–18. (2017)
M. Conner, C. Patel, M. Little, Genetic algorithm/artificial life evolution of security vulnerability agents[C]// Military Communications Conference Proceedings, 1999. Milcom. IEEE 1, 739–743 (1999)
X.P. Wang, L.M. Cao, H.B. Shi, Design of artificial life demo system based on genetic algorithm[J]. J. Tongji Univ. 31(2), 224–228 (2003)
Q. Zong, W. Guo, A speech information hiding algorithm based on the energy difference between the frequency band[C]// International Conference on Consumer Electronics, Communications and Networks. IEEE, 3078–3081 (2012)
Y. Hu, C. Zhang, Y. Su, Information hiding based on intra prediction modes for H.264/AVC[C]// IEEE International Conference on Multimedia and Expo. IEEE, 1231–1234 (2007)
J. Xie, C. Yang, D. Huang, High capacity information hiding algorithm for DCT domain of image[C]// International Conference on Intelligent Information Hiding and Multimedia Signal Processing. IEEE Comput. Soc., 269–272 (2008)
X.I.E. Jian-quan, Y.A.N.G. Chun-hua, X.I.E. Qing, et al., High capacity information hiding algorithm in a binary host image[J]. J. Chin. Comput. Syst. 29(10), 1874–1877 (2008)
C. Jiang, A summary to algorithms of digital multimedia information hiding technology and its applications of digital watermarking[J]. J. Shanxi Educ. College 2(3), 25–28 (2003)
The authors thank the editor and anonymous reviewers for their helpful comments and valuable suggestions. I would like to acknowledge all the team members, especially Yiqin Sun.
About the authors
Xiaowei Gu was born in Rudong, Jiangsu, People’s Republic of China, in 1980. He received the Ph.D. degree in physical electronics from the University of Electronic Science and Technology of China, Chengdu, China, in 2011. From 2008 to 2011, he was with the University of Electronic Science and Technology of China. Since 2011, he has been an associate professor with the School of Information Science and Technology, Zhejiang Sci-Tech University, Hangzhou, China. From 2013 to 2015, he conducted the Post-Doctoral Research with the College of Electrical Engineering, Zhejiang University, Hangzhou. His current research interests include electronic technology, information science, and computational intelligence.
Yiqin Sun was born in Rudong, Jiangsu, People’s Republic of China, in 1981. She received her Master’s degree from the University of Electronic Science and Technology of China, Chengdu, China, in 2008. Now, she works in Key Laboratory for RF Circuits and Systems of Ministry of Education, Hangzhou Dianzi University, Hangzhou, China. Her research interests include electronic science and computer technology, image processing, and information security.
This research was supported by the National Natural Science Foundation of China under grant no. 51407156, Public welfare Technology Application Research Programs of Science and Technology Department of Zhejiang province under grant no. 2016C33018, and the Project Grants 521 Talents Cultivation of Zhejiang Sci-Tech University and Key Laboratory for RF Circuits and Systems (Hangzhou Dianzi University), Ministry of Education.
Availability of data and materials
We can provide the data.
Ethics approval and consent to participate
Consent for publication
The authors declare that they have no competing interests.
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Xiaowei Gu and Yiqin Sun contributed equally and are co-authors of this manuscript.
About this article
Cite this article
Gu, X., Sun, Y. Image transformation and information hiding technology based on genetic algorithm. J Image Video Proc. 2018, 115 (2018). https://doi.org/10.1186/s13640-018-0348-9