Steganalysis of an image using Bacterial Foraging Optimization Technique

DOI : 10.17577/IJERTCONV1IS02010

Download Full-Text PDF Cite this Publication

Text Only Version

Steganalysis of an image using Bacterial Foraging Optimization Technique

Steganalysis of an image using Bacterial Foraging Optimization Technique

1Jaskiran Bhatti, 2Amritpal Singh Bains

1Assistant Professor,Department of Computer Science and Engg. Sant Longowal Institute of Engg. And Technology Deemed University, Longowal ,Sangrur.

2 Assistant Professor, Computer Engineering Department, Geeta Engginerring College , Naultha Panipat


        Steganography: The term Steganography refers to the knack of clandestine interactions. By implementing steganography ,it is possible for Alice to send a secret message to Bob in such a way that no one else will know that the message exists. Classically, the message is rooted within another item known as a face Work, by tuning its properties. The resulting output, known as a stegogramme is engineered such that it is a near identical perceptual model of the face Work, but it will also contain the hidden message. It is this stegogramme that is sent between Alice and Bob. If anybody intercepts the message, they will obtain the stegogramme, but as it is so similar to the cover, it is a difficult task for them to tell that the stegogramme is anything but above suspicion. It is therefore the duty of steganography to ensure that the

        opposition regards the stegogramme and thus, the communication-as inoffensive.

        Steganalysis: Steganalysis is the art of identifying stegogrammes that contain a surreptitious message. Steganalysis does not however consider the successful mining of the message; this is usually a requirement for cryptanalysis. Typically, steganalysis begins by identifying any artifacts that exist in the suspect case as a result of embedding a message. None of the steganographic systems that are known today achieve perfect defense, and this means that they all leave hints of embedding in the stegogramme. This gives the steganalyst a useful way in to identifying whether a secret message exists or not.

        Bacterial Foraging Behavior : The course of action of likely choice tends to eradicate animals with poor foraging strategies (methods for locating, handling, and ingesting food) and support the propagation of genes of those animals that have successful foraging strategies, since they are more likely to enjoy reproductive sensation (they obtain enough food to enable them to reproduce). After many generations move on, poor foraging strategies are either eliminated or shaped into good ones (redesigned).Plausibly, such evolutionary principles have led scientists in the field of foraging theory to hypothesize that it is appropriate to model the activity of foraging as an optimization practice: a foraging animal takes actions to maximize the energy obtained per unit time spent foraging, in the face of constraints presented by its own physiology(e.g., sensing and cognitive capabilities) and environment(e.g., density of prey, risks from predators, physical characteristics of the search area). Evolution has evenhanded these constraints and essentially engineered what is sometimes referred to as an optimal foraging policy (such terminology is especially justified in cases where the models and policies have been ecologically validated).Optimization models are also valid for social foraging where groups of animals communicate to courteously forage. Foraging can be

        modeled as an optimization process where an animal seeks to exploit the energy obtained per unit time spent foraging. We begin by over viewing the significant investigation in foraging theory, foraging by communicating organisms (social foraging) which sometimes maneuver in swarms, and the relevance of these areas to optimization.


        Steganalysis refers to art and science of bias between stego-objects and cover-objects. Steganalysis need to be done without any knowledge of secret key used for embedding and may be even the embedding algorithms. However, message does not have to be gleaned; just its presence is detected.

        Figure 1: Image goes uncovered

        Basic technique: The quandary is generally handled with statistical examination. A set of basic files of the same type, and supremely from the same source (for example, the same model of digital camera, or if possible, the same digital camera; digital audio from a CD MP3 files have been "ripped" from; etc.) as the set being inspected, are analyzed for various statistics. Some of these are as straightforward as spectrum analysis, but since most image and audio files these days are compressed with lossy compression algorithms, such as JPEG and MP3, they also attempt to look for inconsistencies in the mode this data has been compressed. For example, a common artifact in JPEG compression is "edge ringing", where high-frequency workings (such as the high-contrast edges of black text on a white background) distort neighboring pixels. This deformation is predictable, and simple steganographic indoctrination algorithms will produce artifacts that are detectably unlikely. One case where detection of suspect files is undemanding is when the unique, basic carrier is available for comparison. Comparing the package against the

        original file will yield the differences caused by encoding the payloadand, thus, the payload can be extracted.

        The Bacterial Foraging Optimization Technique

        The bacterial foraging system consists of four principal mechanisms, namely chemotaxis, swarming, reproduction and elimination-dispersal [7]. A brief description of each of these processes along with the pseudo-code of the complete algorithm is described below.

        Chemo taxis: This process simulates the movement of an E.coli cell through swimming and tumbling via flagella. Biologically an E.coli bacterium can move in two different ways. It can swim for a period of time in the same direction or it may tumble, and alternate between these two modes of operation for the entire life time [8]. In the original BFO , a unit walk of the bacteria with random direction represents a tumble and a unit walk with the same direction in the last step indicates a run. Suppose øi (j, k ,l) represents the bacterium at jth chemo tactic ,kth reproductive, and lth elimination-dispersal step. Let Nc be the length of the life time of the bacterias measured by number of chemo tactic steps taken by them during their life cycle, C(i) is the chemo tactic step size during each run or tumble (i.e., run-length unit). Then in each computation chemotactic step, the movement of the ith bacterium can be represented as [7]

        øi (j+1,k,l)=øi (j, k, l) + c(i) (i)/ T (i) (i)

        Figure 2 : swimming , tumbling and chemotactic behavior of E.coli

        where (i) is the direction vector of the jth chemotactic step. When the bacterial movement is run , (i) is the same with the last step; otherwise ,

        (i) is random vector whose elements lie in [-1,1].

        If at øi (j+1,k,l) the cost is better (lower)than øi (j,k,l) then another step of size c(i) will be taken in the same direction, again, if that step resulted in a position with a better cost value than at the previous step, another step is taken. This swim is continued as long as it continues to reduce the cost, but only upto a maximum number of steps,[Ns] this represents that

        the cell will tend to keep moving if it is headed in the direction of increasingly favorable environments.[7]

        1. Swarming: – A particularly interesting group behavior has been demonstrated for several motile species of bacteria, including E.coli and S.typhimurium, where intricate stable spatio temporal patterns (swarms) are frmed in semisolid nutrient media[8][9]. (Microbiologists reserve the term swarming for other characteristics of groups of bacteria. Here, we abuse the terminology and favor using the terminology that is used for higher forms of animals such as bees.) semisolid nutrient medium. A group of E.coli cells arrange themselves in a traveling ring by moving up the nutrient gradient when placed amidst a semisolid matrix with a single nutrient chemo-effecter. The cells when stimulated by a high level of succinate, release an attractant aspertate, which helps them to aggregate into groups and thus move as concentric patterns of swarms with high bacterial density.[8] The cell-to-cell signaling in E. coli swarm may be represented by the following function.

          J cc (, (, i (j,k,l)

          = -d attractant exp(-w attractant

          m im )2 )] +

          -h repellent exp(-w

          repellent m im )2 )]

          where J cc (, P(j, k, l) is the objective function value to be added to the actual objective function (to be minimized) to present a time varying objective function, S is the total number of bacteria, p is the number of variables to be optimized, which are present in each bacterium and =[1, 2,

          P]T is a point in the p-dimensional search domain. dattractant , w attractant , h repellent , w repellent are different coefficients that should be chosen properly.[8]

        2. Reproduction: The least healthy bacteria eventually die while each of the healthier bacteria (those yielding lower value of the objective function) asexually split into two bacteria, which are then placed in the same location. This keeps the swarm size constant. All bacteria are stored in descending order according to health status. In the reproduction step only the first half of the population survives. The surviving population is divided into two identical ones, which are then placed in the same locations at

          which their parents were. Thus the total population of bacteria keeps constant. [7][8]

        3. Elimination and Dispersal: Gradual or sudden changes in the local environment where a bacterium population lives may occur due to various reasons

        e.g. a significant local rise of temperature may kill a group of bacteria that are currently in a region with a high concentration of nutrient gradients. Events can take place in such a fashion that all the bacteria in a region are killed or a group is dispersed into a new location. To simulate this phenomenon in BFOA some bacteria are liquidated at random with a very small probability while the new replacements are randomly initialized over the search space.[7][8] What is the effect of elimination and dispersal events on chemotaxis? They have the effect of possibly destroying chemotactic progress, but they also have the effect of assisting in chemotaxis, since dispersal may place bacteria near good food sources. From a broad perspective, elimination and dispersal are parts of the population-level long-distance motile behavior.[7]

        C (i) – Step size

        1. – Bacterium number

        2. – Counter for chemotactic step

        J (i, j, k, l)- Cost at the location of ith bacterium Jcc – Swarm attractant cost

        Ji heal – Health of bacterium i

        – Counter for reproduction step

        l – Counter for elimination-dispersal step m – Counter for swimming locomotion

        Nc – Maximum number of chemotactic steps N ed – Number of elimination-dispersal events Nre – Maximum number of reproduction steps Ns – Maximum number of swims

        P – Dimension of the optimization problem Ped – Probability of occurrence of elimination-

        dispersal events

        s – Population of the E. coli bacteria

        i(j, k, l) – Location of the ith bacterium at jth chemotactic step, kth reproduction step, and l the elimination-dispersal step

        Wattract – Width of attractant W repellen – Width of repellent

        Hrepellent – Height of repellent Dattract – Depth of attract Algorithm for BFO

        Step 1: Initialize parameters n, s, Nc, Ns, Nre, Ned, Ped, c(i) (i=1,2,.s), øi .

        Step 2: Elimination Dispersal Loop: l=l+1. Step 3: Reproduction Loop: k=k+1.

        Step 4: Chemotaxis Loop: j=j+1.

        Substep 4.1: For i= 1= 1,2,3..,s, take a chemotactic step for bacterium I as follows.

        Substep 4.2: Compute fitness function , J(I,j,k,l) Substep 4.3: let Jlast = J(i,j,k,l) to save this value since we may find better value via a run

        Substep 4.4: Tumble . Generate a random vector (i) Rn with each element m(i) , m= 1,2,—-n , a random number on [-1,1].

        Substep 4.5: Move . Let

        øi (j+1,k,l)=øi (j,k,l) + c(i) (i)/ T (i) (i)

        This results ina step size c(i) in the direction of the tumble for bacterium I .

        Substep 4.6: Compute J(i,j+1,k,l) with øi (j+1,k,l) . Substep 4.7: Swimming.

        Let m=0 (counter for swim length ). While m< Ns ( if has not climbed down too long ), the following hold.

        • Let m=m+1

        • If J(i,j+1,k,l)< Jlast . let Jlast =J(i,j+1,k,l), then another step of size c(i) in this same direction will be taken as and use the new generated

        • øi (j+1,k,l) to compute the new J(i,j+1,k,l)

        • Else let m= Ns.

        Substep 4.8: Go to next bacterium (i+1) . If i s, go to substep 4.2 to process the next bacterium.

        Step 5: If j< Nc , go to step 3. In this case , continue Chemotaxis since the life of bacteria is not over.

        Step 6: The Sn bacteria with the highest Jhealth values die and the and the other Sn bacteria with the best values split and the same locations as their parents.

        Step 7: If k < Nre ; go to step 2. In this case the number of specified reproduction steps is not reached and start the the next generation in the chemotaxis loop.

        Step 8: Elimination dispersal : for i=1,2,.,s, with probability Ped , eliminate and disperse each bacterium , which results in keeping the number of bacteria in the population constant . to do this, if a bacterium is eliminated , simply disperse one to a random location on the optimization domain. If l < Ned , then go to step 2 ; otherwise end.


        Bacteria foraging optimization technique is a population oriented algorithm to search optimal solutions. In this research each pixel of image is considered as the bacteria and the color of pixel is considered as the food of bacteria. The aim of the proposed algorithm will be to minimize the food source, i.e. to reduce the number of colors in the image. In our research all the pixels of image are initially having some color, and our objective will be to optimize those colors so that we can get the result that is any kind of data hidden in the image. All the colors in the image will be evaluated as the number

        of pixels having that color. This evaluation will define the heath status of all kind of colors which are in the image. After which depending on the health status well be dividing the colors into two categories those will be popular color or the unpopular color. If the health status of a particular color comes to be high then that color is present on too many pixels and will be known as popular one and all the colors with low health status will be considered as the unpopular ones.

        Here well be considering a stegnographed jpeg image, which will be in the RGB model.

        • Our first motive will be to remove any kind of noise from the image if present.

        • After removing noise from the image we will be extracting the R, G, B components of the given stegnographed image.

        • Now the stage comes where we need to identify the similar kind of patches of one color in the particular image.

        • Now extract least significant bit of each pixel in the region , where at the present time we are working out with the bacterias.

        • Evaluate the difference between the least significant bits which we extracted with all the pixels of that patch under consideration using some fitness


        • Here we ought to takefitness function as given below:

          z = x(1)^2 – 2*x(1)*x(2) +

          6*x(1) + x(2)^2 – 6*x(2). Where x is the value of next bacterium.

        • Considering threshold value for comparison is

          36.23. from where we will be getting the healthy values of the pixels.

        • If a drastic or sudden change appears in the least significant bit observation then yes something is hidden there.

        • Hence , from which we will conclude the hidden data in the provided image.


From the above analysis and basic study of the optimization technique we concluded that BFO algorithm ais the data clustering algorithms by implementing swarm behavior. BFO is a clustering algorithm in the areas of mutli-objective, and constraint handling. BFO can be analyzed and studied for future enhancement such that new research could be focused to produce better solution by improving the effectiveness and reducing the limitations. And we are working for image

steganalysis based on bacterial foraging technique; soon well be ready with the above mentioned algorithm and its implementation.


  1. E. Shaw, The schooling of fishes," Sci. Am., vol. 206, pp. 128-138,1962.

  2. E. Bonabeau, M. Dorigo, and G. Theraulaz, Swarm Intelligence: From Natural to Articial systems. NY: Oxford Univ. Press,1999.

  3. R. Arkin, Behavior-Based Robotics. Cambridge, MA:MIT Press,1998.

  4. G. Beni and J.Wang, Swarm intelligence in cellular robotics systems," in Proceeding of NATO Advanced Workshop on Robots and Biological System,1989.

  5. M.Pachter and P.Chandler,Challenges of autonomous control," IEEE Control Systems Magazine,pp.92-97, April1998.

  6. Yang Liu and Kevin M. Passino Dept. of Electrical Engineering The Ohio State University Swarm Intelligence : literature overview, March 2000.

  7. Passino K. M. Biomimicry of Bacterial Foraging for Distributed Optimization and Control, IEEE Control Systems Magazine, Vol. 22, No. 3, pp. 52-67, June 2002.

  8. Sambarta Dasgupta , Arijit Biswas , Swagatam Das , Bijaya Ketan Panigrahi and Ajith Abraham, A Micro-Bacterial Foraging Algorithm for High- Dimensional Optimization

  9. Liu Yanfei, Passino K.M., Biomimicry of Social Foraging Behavior for Distributed Optimization: Models, Principles, and Emergent Behaviors, Journal of Optimization Theory and Applications, Vol. 115, No. 3, pp. 603-628, Dec. 2002.

  10. Beni, G., Wang, J. Swarm Intelligence in Cellular Robotic Systems, Proceed. NATO Advanced Workshop on Robots and Biological Systems, Tuscany, Italy, June 2630 (1989)


  11. Kaveh, A.; Talatahari, S. (2010). "A Novel Heuristic Optimization Method: Charged System Search". Acta Mechanica 213 (3-4): 267289. doi:10.1007/s00707-009-0270-4. [12]Swarm_intelligencefrom [13]S. Dumitrescu, X.Wu, and Z.Wang. "Detection of LSB Steganography via Sample Pair Analysis", Lecture Notes in Computer Science, vol.2578, pp.355-372,2003.

  1. H.Farid. "Detecting Hidden Messages Using Higher-Order Statistical Models", Proceedings of the International Conference on ImageProcessing, Rochester ,NY, USA, 2002.

  2. J. Fridrich, M. Goljan, and D.Hogea. "Attacking the Out Guess", Proceedings of the Information Hiding Workshop on Multimedia and security 2002, Juan-les-Pins,


[16]N.Memon, I.Avcibas, and B.Sankur. "Steganalysis Based on Image Quality Metrics", emph IEEE: Security and Watermarking of Multimedia Contents,vol.4314, 2001.

[17]C.Ming, Z.Ru, N.Xinxin, and Y.Yixian. "Analysis of Current Steganography Tools: Classifications & Features", Intelligent Information Hiding and Multimedia Signal Processing 2006, pp.384-387,2006.

[18]N.Provosand P.Honeyman. "Detecting Steganographic Content on the Internet", CITI Technical Report,vol.1,pp.1-11,2001.

[19] N.Provos. "Defending Against Statistical Steganalysis", Proceedings of the 10 USENIX Security Symposium, vol.10, pp.323-335, 2001. [20]N.Provosand P.Honeyman. "Hide and Seek: An Introduction to Steganography", IEEE: Security & Privacy, vol.1, pp.32-44, 2003.

Leave a Reply

Your email address will not be published.