Skip to content

A command-line program for n-dimensional image enhancement and color balancing.

License

Notifications You must be signed in to change notification settings

ofgulban/iphigen

Repository files navigation

DOI PyPI version

Iphigen (work in progress)

A simple command-line interface for image enhancement and color balancing.

This application is being developed mainly to play with a few algorithms that I like. I am aiming at making the implementations work for 2D, 3D and 4D images. Currently implemented algorithms are:

  • Multi-scale retinex [1, 3]
  • Simplest color balance [2]
  • Simplex color balance (based on [3, 4], not published)

Getting started

Dependencies

Python 3 and the following packages:

Package Tested version
OpenCV 3.4.4
SciPy 1.2.0
NiBabel 2.2.1
NumPy 1.15.4

Installation

Clone this repository or download the latest release. In your command line, change directory to folder of this package and run the following:

python setup.py install

If everything went fine, typing iphigen -h or iphigen_nifti -h in the command-line should show the help menu now.

Usage

Retinex with intensity balance

iphigen /path/to/image.png --retinex --intensity_balance

Color balance

iphigen /path/to/image.png --simplest_color_balance

Retinex with simplest color balance

iphigen /path/to/image.png --retinex --simplest_color_balance

Use with Nifti files

iphigen_nifti /path/to/data.nii.gz --retinex

Use within python scripts

See script examples here.

Support

Please use github issues to report bugs or make suggestions.

License

The project is licensed under BSD-3-Clause.

References

This application is based on the following work:

  1. Jobson, D. J., Rahman, Z. U., & Woodell, G. A. (1997). A multiscale retinex for bridging the gap between color images and the human observation of scenes. IEEE Transactions on Image Processing, 6(7), 965–976. http://doi.org/10.1109/83.597272

  2. Limare, N., Lisani, J., Morel, J., Petro, A. B., & Sbert, C. (2011). Simplest Color Balance. Image Processing On Line, 1(1), 125–133. http://doi.org/10.5201/ipol.2011.llmps-scb

  3. Petro, A. B., Sbert, C., & Morel, J. (2014). Multiscale Retinex. Image Processing On Line, 4, 71–88. http://doi.org/10.5201/ipol.2014.107

  4. Gulban, O. F. (2018). The Relation between Color Spaces and Compositional Data Analysis Demonstrated with Magnetic Resonance Image Processing Applications. Austrian Journal of Statistics, 47(5), 34–46. http://doi.org/10.17713/ajs.v47i5.743