Skip to content

IbraDje/VIBGYOR-Color-Segmentation

Repository files navigation

VIBGYOR Color Segmentation

Python implementation of the VIBGYOR Color Segmentation Algorithm.

The distance between peaks (high points) in wave is called wavelength. The wavelength term is commonly use in electromagnetic radiation like radios waves, light waves or infrared (heat) waves. Each waves containing shapes and length. VIBGYOR is just the expression of the color of the spectrum of white light, which are Violet, Indigo, Blue, Green, Yellow, Orange and Red. Each color is associated with light of a particular wavelength. Red light has longer wavelengths than the blue light. The angle of deviation by a prism is not the same for the entire wavelength (colors) of light. The violet is the most deviated while the red is the least deviated. The wavelength aka VIBGYOR define the different color based on their wavelength range on the image, then segment different color light, and apply the color filter to remove the color selected.

  • Algorithm explanation: We use a color image, as input image. We define two functions:
  1. Function for color image segmentation :
    • Where we divide different objects on the image in the space. Row, column and planes.
    • Where plane must be equal to three.
    • Then we can select a color in the image.
  2. Function for color filter:
    • Is to filter the different colors in the image in the space. With this function, we extract the selected color in the image

Source : https://dipcsc2014.wordpress.com/author/iefyerhemlock/

Parameters of the main function (VIBGYORsegmentation) :

  • image : a 3D numpy array (plane must be equal to 3)
  • color :
    • 'v' / 'V' - for Violet Color
    • 'i' / 'I' - for Indigo Color
    • 'b' / 'B' - for Blue Color
    • 'g' / 'G' - for Green Color
    • 'y' / 'Y' - for Yellow Color
    • 'o' / 'O' - for Orange Color
    • 'r' / 'R' - for Red Color

Return values :

  • C : the filtered image

About

VIBGYOR Image Color Segmentation Algorithm in Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages