Skip to content

Image contrast enhancement via a hybrid of ant colony optimization, genetic algorithm, and simulated annealing

Notifications You must be signed in to change notification settings

pouryahoseini/Nature-Inspired-Image-Enhancement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hybrid Ant Colony Optimization, Genetic Algorithm, and Simulated Annealing for Image Contrast Enhancement

The MATLAB code for enhancing the contrast of gray-scale images using nature-inspired methods can be found in this repo. The nature inspired methods are ant colony optimization, genetic algorithm, and simulated annealing, which generate a global transfer function to convert input images to higher contrast ones, while trying to keep the natural look of the images.

Description

The details of the image enhancer method are published in our papers: DSP (pdf or ScienceDirect) and CEC (pdf or IEEE Xplore).

The method works by placing a few artificial agents (aka artificial ants) in a search space to generate a transfer function useful for converting any image to a higher contrast one. The ants start from the origin of the transfer function (bottom left) and move to the top right point of that. Any ant probabilistically chooses among its available movement options, which are shown below:

Movement of ants on the transfer function pane

After reaching the last point, a transfer function is created and its fitness is evaluated. Based on how good is a transfer function, pheromones are deposited on the path the ants have travelled. Pheromone on a point increases the chance of an ant in the next iteration to choose passing over it when nearby. Here is an example of pheromone traces of ants after moving on a transfer function pane for a while.

Pheromone deposits of artificial ants

Each artificial ant has a genetic code during the process. The population of ants evolves via genetic algorithm. This changes the characteristics of the ants and their preferences in traversing their path in the search space. After selecting the best transfer functions, the simulated annealing tries to fine-tune them in an artificial annealing process. This is the flowchart of the general steps in the method:

Flowchart

After this process is finished, the best transfer function is selected and is used to convert the input image. Check these samples out:

Example 1

Example 2
Left: original images, Right: after enhancement

The Code

The MATLAB code in the file imenhance.m, under the im-enhance folder, contains the function to perform the image contrast enhancement. The function takes the input image and two optional arguments, one for the number of iterations and the other for disabling the simulated annealing if preferred to increase speed and probably at some performance cost.

Citation

To refer to this work, you may cite our papers published at Elsevier Digital Signal Processing and IEEE Congress on Evolutionary Computation:

@article{hoseini2013efficient,
  title={Efficient contrast enhancement of images using hybrid ant colony optimisation, genetic algorithm, and simulated annealing},
  author={Hoseini, Pourya and Shayesteh, Mahrokh G},
  journal={Digital Signal Processing},
  volume={23},
  number={3},
  pages={879--893},
  year={2013},
  publisher={Elsevier}
}
@inproceedings{hoseini2010hybrid,
  title={Hybrid ant colony optimization, genetic algorithm, and simulated annealing for image contrast enhancement},
  author={Hoseini, Pourya and Shayesteh, Mahrokh G},
  booktitle={IEEE Congress on Evolutionary Computation},
  pages={1--6},
  year={2010},
  organization={IEEE}
}

Developers

Pourya Hoseini

Contact

I can be reached at hoseini@nevada.unr.edu.