Using Genetic Algorithm to Embed Important Information in an Image Compression File Chair Professor Chin-Chen Chang (張真誠) National Tsing Hua University National Chung Cheng University Feng Chia University http://msn.iecs.fcu.edu.tw/~ccc
Introduction Information Hiding Hiding system Stego image Cover image 1 0 1 0 1 0 0 1 0 1 1 1 1 0 0 Secret message
Introduction (Cont.) Cover Carriers Image Compression code Video Sound Text
Kim et al.’s Method : 9 1 2 3 4 5 6 7 8 …
Kim et al.’s Method (Embedding) 5 8 3 4 7 6 1 2 : 9 1 2 3 4 5 6 7 8 Cover Image Cover Image 6 9 7 3 8 1 2 5 4 … Stego Image Stego Image
Kim et al.’s Method (Embedding) 6 9 7 3 8 1 2 5 4 : 9 1 2 3 4 5 6 7 8 Stego Image Stego Image …
Zhang and Wang’s Method (Embedding) Extracting function: 8 7 9 4 79 54 55 11 20 21 12 24 10 Secret data: 1000 1011… p2 255 1 2 3 4 1 2 3 4 1 : : : : : : : : : : : : : 10002 1 35 … 11 2 3 4 1 2 3 4 1 2 3 2 … 10 1 2 3 4 1 2 3 4 1 Cover image … 9 3 4 1 2 3 4 1 2 3 4 3 … 8 1 2 3 4 1 2 3 4 1 2 1 … 7 4 1 2 3 4 1 2 3 4 4 … 6 2 3 4 1 2 3 4 1 2 3 2 … 5 1 2 3 4 1 2 3 4 1 7 10 4 … 4 3 4 1 2 3 4 1 2 3 4 3 … 3 1 2 3 4 1 2 3 4 1 2 1 … 2 4 1 2 3 4 1 2 3 4 4 … 1 2 3 4 1 2 3 4 1 2 3 2 … 1 2 3 4 1 2 3 4 1 Stego image 1 2 3 4 5 6 7 8 9 10 11 … 255 p1 Magic Matrix
Zhang and Wang’s Method (Extracting) p2 7 10 4 255 1 2 3 4 1 2 3 4 1 : : : : : : : : : : : : : … 11 2 3 4 1 2 3 4 1 2 3 2 … 10 1 2 3 4 1 2 3 4 1 … 9 3 4 1 2 3 4 1 2 3 4 3 … 8 1 2 3 4 1 2 3 4 1 2 1 Stego image … 7 4 1 2 3 4 1 2 3 4 4 … 6 2 3 4 1 2 3 4 1 2 3 2 … 5 1 2 3 4 1 2 3 4 1 … 4 3 4 1 2 3 4 1 2 3 4 3 … 3 1 2 3 4 1 2 3 4 1 2 1 … 2 4 1 2 3 4 1 2 3 4 4 1 35 … 1 2 3 4 1 2 3 4 1 2 3 2 … 1 2 3 4 1 2 3 4 1 p1 1 2 3 4 5 6 7 8 9 10 11 … 255 Extracted secret data: 10002 Magic Matrix
Pixels in the Image Block 248 76 49 62 57 24 96 118 125 144 56 41 82 97 211 114
Generate Compression Code 248 76 49 62 57 24 96 118 125 144 56 41 82 97 211 114 1 AVERAGE: 100 H L 160 64
LSB Data Hiding SECRET 010 100 H L 160 64 H’ L’ 162 68 H L 10100 000 01000 000 H’ L’ 10100 010 01000 100 LSB Data Hiding
Recovery of the Image Block 160 64 162 68 H L 160 64 H’ L’ 162 68
Substitution Tables SECRET 010 100 2 4 SECRET ’ 100 110 4 6 Table 1 1 1 2 3 4 5 6 7 Table 2 1 2 3 4 5 6 7 Table 3 2 1 3 4 5 6 7 Table 40320 7 1 6 2 5 3 4
Flowchart of Genetic Algorithm Initial Mating Pool Max(Fitness)-Avg(Fitness) <Terminate Threshold Fitness(Table) SELECTION Yes End No Max(Fitness)-Avg(Fitness) <Threshold Add 30% New Tables CROSSOVER 80% MUTATION 0.1% No Yes
Initial Mating Pool Initial Mating Pool Table 1 Table 3 Table 17 Table 1 Table 3 Table 17 Table 323 Table 777 Table 4500 Table 9122 Table 24010 Table 26023 Table 40300
Fitness Function = f( ) f( ) f( ) 30 23 5 18 4 9 1 7 2 Fitness(Table) Fitness(Table) Table 1 Table 3 Table 17 Table 323 Table 777 Table 4500 Table 9122 Table 24010 Table 26023 Table 40300 f( ) f( ) f( ) = 30 23 5 18 4 9 1 7 2
Selection SELECTION
Crossover CROSSOVER 80% Table 1 1 2 3 4 5 6 7 Table 3 2 1 3 4 5 6 7 1 2 3 4 5 6 7 Table 3 2 1 3 4 5 6 7 Table 1’ 2 1 3 4 5 6 7 Table 3’ 1 2 4 3 5 6 7
Mutation MUTATION 0.1% Table 1 1 2 3 4 5 6 7 Table 1’ 1 2 6 3 4 5 7
Example Initial Mating Pool Yes End Add 30% New Tables 1 3 17 323 Fitness 30 23 5 18 Survival Probability 40% 30% 7% 23% Initial Mating Pool Max(Fitness)-Avg(Fitness) <Terminate Threshold Table 1 3 323 Fitness(Table) SELECTION Terminate Threshold 30 – 25.25 = 4.75 > 2 Yes End Fitness 30 23 18 No Threshold 30 – 25.25 = 4.75 < 5 Table 1 3’ 777’ Table 1 3 777 Max(Fitness)-Avg(Fitness) <Threshold CROSSOVER 80% MUTATION 0.1% Add 30% New Tables No Yes Threshold 30 – 21.75 = 8.25 > 5 Fitness 30 23 4 Table 1 3’’ 777’
Experimental Results LSB GA ELSB Image PSNR EC Time Lena 31.10 0.375 32.43 2.43 32.68 4022.48 Tiffany 30.27 31.67 2.57 31.86 4087.23 Zelda 32.90 34.83 2.68 34.96 4062.41 Boat 30.33 31.15 2.51 31.35 4087.52 Barbara 28.25 28.86 2.56 28.92 4076.73 Baboon 27.06 27.63 27.68 4129.56 Elaine 31.53 32.91 2.54 32.98 4034.32 Pepper 31.62 33.02 33.24 4028.19 Average 30.38 31.56 2.55 31.71 4066.06 in C language
Conclusions A novel method for embedding secrets in compression code based on GA is presented. The obtained substitution table is near optimal. Higher embedding capacity always result in lower stego image quality.