Image Transformation based on HSI

Introduction

There’re a few ways to analyze an image. Few of them are CIE LUV, CIE LAB and converting them to HSI, HSV, HSL, etc. CIE LUV and CIE LAB are similar for the case of “L” which is responsible for Lightness of an image. A and B (U and V) are responsible for red/green opponent colors and yellow/blue opponent colors respectively. CIE LAB is more suitable for coloured surface and dyes. CIE LUV is more suitable for the characterization of colour displays. Here, we’ll be using HSI instead because our interest is by changing a specified range of Hue of an image in to another range.

HSV (hue-saturation-value), HSI (hue-saturation-intensity) and HSL (hue-saturation-lightness) are the three most common cylindrical-coordinate representations of points in an RGB color model.

We’ll be using HSI here. Below is the model representing HSI.

Image result for hsi color model

Image result for intensity hsi

Intensity is self-explanatory, it represents the lightness and darkness of a pixel. We’re able to tweak the colour of an image based on the Hue of an image. Hue is represented in degrees thus we’re able to specify the range/angle of the portion of hue that we want to deal with. From the image below, we’re able to clearly identify the hue range of an image:

Image result for hue chart

For intensity, it’s responsible for the depth of a colour. For instance, for a fixed hue, we’re able to change the “strength” of that particular hue based on its saturation.

Implementation

Below shows an input image ready to be scanned and modified:

Alt text

My main goal is to provide a dusk feeling to that image, thus we’ve to specify the hue range that we want to work on. The range of hue is based mainly on the hue chart given above. Our main focus here will be on the sky and the grass. So we’ll have 2 colour in our mind, blue and green. We’ll add a bias on that two colour range.

We’ll need to provide a dull feeling as well, so we’ll make the colour of the sky a little dimmer by reducing its saturation.

The intensity is also reduced to provide a dull feel of the sky as well.

The results based on the manipulations given above is shown below:

Alt text

I’ve also made a version where you can play around with the Hue, Saturation and Intensity of an image:

2016-10-22_120013_1200x740

Source code of my implementation: Image Transformation

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s