[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| Polar Color Coordinates [Color Space Conversions] |

## Functions

template<class V>
TinyVector< float, 3 > | lab2Polar (V const &lab)
| Create polar representation form L*a*b*.
template<class V>
TinyVector< float, 3 > | luv2Polar (V const &luv)
| Create polar representation form L*u*v*.
TinyVector< float, 3 > | polar2Lab (double color, double brightness, double saturation)
| Init L*a*b* color triple from polar representation.
TinyVector< float, 3 > | polar2Luv (double color, double brightness, double saturation)
| Init L*u*v* color triple from polar representation.
TinyVector< float, 3 > | polar2YPrimeCbCr (double color, double brightness, double saturation)
| Init Y'CbCr color triple from polar representation.
TinyVector< float, 3 > | polar2YPrimeIQ (double color, double brightness, double saturation)
| Init Y'IQ color triple from polar representation.
TinyVector< float, 3 > | polar2YPrimePbPr (double color, double brightness, double saturation)
| Init Y'PbPr color triple from polar representation.
TinyVector< float, 3 > | polar2YPrimeUV (double color, double brightness, double saturation)
| Init Y'UV color triple from polar representation.
template<class V>
TinyVector< float, 3 > | yPrimeCbCr2Polar (V const &ycbcr)
| Create polar representation form Y'CbCr.
template<class V>
TinyVector< float, 3 > | yPrimeIQ2Polar (V const &yiq)
| Create polar representation form Y'IQ.
template<class V>
TinyVector< float, 3 > | yPrimePbPr2Polar (V const &ypbpr)
| Create polar representation form Y'PbPr.
template<class V>
TinyVector< float, 3 > | yPrimeUV2Polar (V const &yuv)
| Create polar representation form Y'UV.

## Detailed Description

Transform colors from/to a polar representation (hue, brighness, saturation). In many situations, this is more inituitive than direct initialization in a particular color space. The polar coordinates are normalized so that a color angle of 0 degrees is always associated with red (green is at about 120 degrees, blue at about 240 degrees - exact values differ between color spaces). A saturation of 1 is the highest saturation that any RGB color gets after transformation into the respective color space, and saturation 0 corresponds to gray. Thus, different color spaces become somewhat comparable.

## Function Documentation

TinyVector<float, 3> vigra::polar2Lab | ( | double | color,
|  | double | brightness,
|  | double | saturation |
| ) |  |  |

Init L*a*b* color triple from polar representation.

#include <vigra/colorconversions.hxx>
Namespace: vigra

Declarations:

        TinyVector<float, 3>
        polar2Lab(double color, double brightness, double saturation);

        TinyVector<float, 3>
        polar2Lab(TinyVector<float, 3> const & polar);

- color - the color angle in degrees
- brightness - between 0 and 1
- saturation - between 0 and 1

L*a*b* polar coordinates of some important colors:

        black   = [*, 0, 0]    * - arbitrary
        white   = [*, 1, 0]    * - arbitrary

        red     = [      0, 0.532406, 0.781353]
        yellow  = [62.8531, 0.971395, 0.724189]
        green   = [96.0184, 0.877351, 0.895108]
        cyan    = [156.378, 0.911133, 0.374577]
        blue    = [266.287, 0.322957, 0.999997]
        magenta = [288.237, 0.603235, 0.863482]

template<class V>
TinyVector<float, 3> vigra::lab2Polar | ( | V const & | lab | ) |

Create polar representation form L*a*b*.

Declaration:

        namespace vigra {
            TinyVector<float, 3> lab2Polar(TinyVector<float, 3> const & lab);
        }

#include <vigra/colorconversions.hxx>
Namespace: vigra

This realizes the inverse of the transformation described in polar2Lab().

TinyVector<float, 3> vigra::polar2Luv | ( | double | color,
|  | double | brightness,
|  | double | saturation |
| ) |  |  |

Init L*u*v* color triple from polar representation.

#include <vigra/colorconversions.hxx>
Namespace: vigra

Declarations:

        TinyVector<float, 3>
        polar2Luv(double color, double brightness, double saturation);

        TinyVector<float, 3>
        polar2Luv(TinyVector<float, 3> const & polar);

- color - the color angle in degrees
- brightness - between 0 and 1
- saturation - between 0 and 1

L*u*v* polar coordinates of some important colors:

        black   = [*, 0, 0]    * - arbitrary
        white   = [*, 1, 0]    * - arbitrary

        red     = [      0, 0.532406,        1]
        yellow  = [   73.7, 0.971395, 0.597953]
        green   = [115.552, 0.877351, 0.758352]
        cyan    = [  180.0, 0.911133, 0.402694]
        blue    = [  253.7, 0.322957, 0.729883]
        magenta = [295.553, 0.603235, 0.767457]

template<class V>
TinyVector<float, 3> vigra::luv2Polar | ( | V const & | luv | ) |

Create polar representation form L*u*v*.

Declaration:

        namespace vigra {
            TinyVector<float, 3> luv2Polar(TinyVector<float, 3> const & luv);
        }

#include <vigra/colorconversions.hxx>
Namespace: vigra

This realizes the inverse of the transformation described in polar2Luv().

TinyVector<float, 3> vigra::polar2YPrimePbPr | ( | double | color,
|  | double | brightness,
|  | double | saturation |
| ) |  |  |

Init Y'PbPr color triple from polar representation.

#include <vigra/colorconversions.hxx>
Namespace: vigra

Declarations:

        TinyVector<float, 3>
        polar2YPrimePbPr(double color, double brightness, double saturation);

        TinyVector<float, 3>
        polar2YPrimePbPr(TinyVector<float, 3> const & polar);

- color - the color angle in degrees
- brightness - between 0 and 1
- saturation - between 0 and 1

Y'PbPr polar coordinates of some important colors:

        black   = [*, 0, 0]    * - arbitrary
        white   = [*, 1, 0]    * - arbitrary

        red     = [      0,  0.299, 0.988419]
        yellow  = [62.1151,  0.886, 0.948831]
        green   = [123.001,  0.587,        1]
        cyan    = [  180.0,  0.701, 0.988419]
        blue    = [242.115,  0.114, 0.948831]
        magenta = [303.001,  0.413,        1]

template<class V>
TinyVector<float, 3> vigra::yPrimePbPr2Polar | ( | V const & | ypbpr | ) |

Create polar representation form Y'PbPr.

Declaration:

        namespace vigra {
            TinyVector<float, 3> yPrimePbPr2Polar(TinyVector<float, 3> const & ypbpr);
        }

#include <vigra/colorconversions.hxx>
Namespace: vigra

This realizes the inverse of the transformation described in polar2YPrimePbPr().

TinyVector<float, 3> vigra::polar2YPrimeCbCr | ( | double | color,
|  | double | brightness,
|  | double | saturation |
| ) |  |  |

Init Y'CbCr color triple from polar representation.

#include <vigra/colorconversions.hxx>
Namespace: vigra

Declarations:

        TinyVector<float, 3>
        polar2YPrimeCbCr(double color, double brightness, double saturation);

        TinyVector<float, 3>
        polar2YPrimeCbCr(TinyVector<float, 3> const & polar);

- color - the color angle in degrees
- brightness - between 0 and 1
- saturation - between 0 and 1

Y'CbCr polar coordinates of some important colors:

        black   = [*, 0, 0]    * - arbitrary
        white   = [*, 1, 0]    * - arbitrary

        red     = [      0,  0.299, 0.988419]
        yellow  = [62.1151,  0.886, 0.948831]
        green   = [123.001,  0.587,        1]
        cyan    = [  180.0,  0.701, 0.988419]
        blue    = [242.115,  0.114, 0.948831]
        magenta = [303.001,  0.413,        1]

template<class V>
TinyVector<float, 3> vigra::yPrimeCbCr2Polar | ( | V const & | ycbcr | ) |

Create polar representation form Y'CbCr.

Declaration:

        namespace vigra {
            TinyVector<float, 3> yPrimeCbCr2Polar(TinyVector<float, 3> const & ycbcr);
        }

#include <vigra/colorconversions.hxx>
Namespace: vigra

This realizes the inverse of the transformation described in polar2YPrimeCbCr().

TinyVector<float, 3> vigra::polar2YPrimeIQ | ( | double | color,
|  | double | brightness,
|  | double | saturation |
| ) |  |  |

Init Y'IQ color triple from polar representation.

#include <vigra/colorconversions.hxx>
Namespace: vigra

Declarations:

        TinyVector<float, 3>
        polar2YPrimeIQ(double color, double brightness, double saturation);

        TinyVector<float, 3>
        polar2YPrimeIQ(TinyVector<float, 3> const & polar);

- color - the color angle in degrees
- brightness - between 0 and 1
- saturation - between 0 and 1

Y'IQ polar coordinates of some important colors:

        black   = [*, 0, 0]    * - arbitrary
        white   = [*, 1, 0]    * - arbitrary

        red     = [      0, 0.299,        1]
        yellow  = [63.5851, 0.886, 0.707681]
        green   = [137.231, 0.587, 0.933362]
        cyan    = [  180.0, 0.701,        1]
        blue    = [243.585, 0.114, 0.707681]
        magenta = [317.231, 0.413, 0.933362]

template<class V>
TinyVector<float, 3> vigra::yPrimeIQ2Polar | ( | V const & | yiq | ) |

Create polar representation form Y'IQ.

Declaration:

        namespace vigra {
            TinyVector<float, 3> yPrimeIQ2Polar(TinyVector<float, 3> const & yiq);
        }

#include <vigra/colorconversions.hxx>
Namespace: vigra

This realizes the inverse of the transformation described in polar2YPrimeIQ().

TinyVector<float, 3> vigra::polar2YPrimeUV | ( | double | color,
|  | double | brightness,
|  | double | saturation |
| ) |  |  |

Init Y'UV color triple from polar representation.

#include <vigra/colorconversions.hxx>
Namespace: vigra

Declarations:

        TinyVector<float, 3>
        polar2YPrimeUV(double color, double brightness, double saturation);

        TinyVector<float, 3>
        polar2YPrimeUV(TinyVector<float, 3> const & polar);

- color - the color angle in degrees
- brightness - between 0 and 1
- saturation - between 0 and 1

Y'UV polar coordinates of some important colors:

        black   = [*, 0, 0]    * - arbitrary
        white   = [*, 1, 0]    * - arbitrary

        red     = [      0, 0.299,        1]
        yellow  = [63.5851, 0.886, 0.707681]
        green   = [137.231, 0.587, 0.933362]
        cyan    = [  180.0, 0.701,        1]
        blue    = [243.585, 0.114, 0.707681]
        magenta = [317.231, 0.413, 0.933362]

template<class V>
TinyVector<float, 3> vigra::yPrimeUV2Polar | ( | V const & | yuv | ) |

Create polar representation form Y'UV.

Declaration:

        namespace vigra {
            TinyVector<float, 3> yPrimeUV2Polar(TinyVector<float, 3> const & yuv);
        }

#include <vigra/colorconversions.hxx>
Namespace: vigra

This realizes the inverse of the transformation described in polar2YPrimeUV().

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python VIGRA 1.6.0 (13 Aug 2008)