/Python-RGB-to-HSI

A small Python algorithm made for a project at AAU. Converts an RGB image to the HSI spectrum.

Primary LanguagePythonMIT LicenseMIT

Python-RGB-to-HSI

A small Python algorithm made for a project at AAU. Converts an RGB image to the HSI spectrum.

The algorithm is based upon the following mathematical equation: alt text

Based on this equation the algorithm will convert the RGB channels in the image that has been set as input and converts those channels to HSI (Hue, Saturation, Intensity).

This will make the image that is given to the algorithm go from: alt text

To this:

alt text

Important!

The algorithm is not perfect and does not convert the image perfectly. If you wish to develop further on it then you're more than welcome!

What I Learned

  • How to deconstruct an image file into 3 different colour channels
  • How to program with Python and the Numpy library
  • How to use recalculate the RGB colour spectrum to the HSI spectrum