Colour spaces
In this article we will introduce the idea of colour spaces, a way of visualising and defining a range of colours. This will start with the RGB colour definitions we’ve seen already, then look at how RGB colour may be converted to grayscale, before concluding by introducing another common type colour space, HSV and HSL colour.
RGB Colour Space
As we have already seen each pixel in a colour image consists of three numbers, between 0 and 255 (for 8-bit resolution), corresponding to the level of red, green and blue for that pixel. This means that any pixel can take 256 x 256 x 256 = 16,777,216 different unique colour values. This is known more generally as the RGB colour space. If you visualise this by thinking of the RGB values as co-ordinates in 3D space then the set of colours in RGB colour space can be thought of as a cube.
Grayscale
HSV/HSL Colour Space
Hue can be thought of as the main colour property. As you look around the top of the colour wheel in the figure you will be able to see all the colours you can name such as red, orange, yellow, green, cyan, blue and magenta. Saturation can be thought of as the depth of colour, or how little grey there is in the colour (high saturation has strong colour, low values appear almost completely grey or washed out). Finally lightness/luminance (in HSL), or ‘value’ (in HSV) is a measure of the brightness of the colour, with low values appearing black and higher values appearing whiter. The difference between the HSV and HSL systems is that the HSL scale goes all the way to pure white, while HSV stops halfway along this scale.
Summary
- Colour spaces are methods of precisely and numerically defining specific colours
- The colour space used in digital images and in most image analysis is RGB colour, based on the intensity of red, green and blue light
- The RGB colour space can be visualised as a cube in 3D space with the level of red, green and blue as the axes
- Grayscale is purely a measure of brightness with no colour information.
- Different methods or weighting are in use for the conversion of RGB colour data to grayscale depending on the application
- HSV/HSL is an alternative colour space for creative applications using hue, saturation and lightness/brightness to define colour rather than red, green and blue
Introduction to Image Analysis for Plant Phenotyping

Introduction to Image Analysis for Plant Phenotyping

Reach your personal and professional goals
Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.
Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.
Register to receive updates
-
Create an account to receive our newsletter, course recommendations and promotions.
Register for free