iRoCS Toolbox  1.1.0
Static Public Member Functions
ColorConvert Class Reference

Converts different color spaces into each other. More...

#include <ColorConvert.hh>

Collaboration diagram for ColorConvert:

Static Public Member Functions

static void hsv2rgb (const float &h, const float &s, const float &v, unsigned char &r, unsigned char &g, unsigned char &b)
 Convert HSV to RGB. More...
 
static void hsv2rgb (const blitz::TinyVector< float, 3 > &colHSV, BlitzRGBColor &colRGB)
 Convert HSV to RGB. More...
 
static void hsv2rgb (blitz::Array< float, 3 > &srcArray, blitz::Array< unsigned char, 3 > &destArray)
 Convert a HSV (layered) image to a RGB image. More...
 
static void hsv2rgb (blitz::Array< blitz::TinyVector< float, 3 >, 2 > &srcArray, blitz::Array< blitz::TinyVector< unsigned char, 3 >, 2 > &destArray)
 Convert a HSV (vectorial) image to a RGB image. More...
 
static void hsv2rgb (const blitz::Array< float, 3 > &srcArray, ImageAccessWrapper &destArray)
 Convert a HSV image to a RGB image (wrapper version that does all the work) *. More...
 
static void rgb2gray (const unsigned char &r, const unsigned char &g, const unsigned char &b, unsigned char &gray)
 Convert RGB to Gray. More...
 
static void rgb2gray (const blitz::TinyVector< unsigned char, 3 > &colRGB, unsigned char &gray)
 Convert RGB to Gray. More...
 
static void rgb2gray (blitz::Array< unsigned char, 3 > &srcArray, blitz::Array< unsigned char, 2 > &destArray)
 Convert a RGB (layered) image to a gray image. More...
 
static void rgb2gray (blitz::Array< blitz::TinyVector< unsigned char, 3 >, 2 > &srcArray, blitz::Array< unsigned char, 2 > &destArray)
 Convert a RGB (vectorial) image to a gray image. More...
 
static void rgb2gray (const ImageAccessWrapper &srcArray, blitz::Array< unsigned char, 2 > &destArray)
 Convert a RGB image to a gray image (wrapper version that does all the work) More...
 
static void rgb2gray (const ImageAccessWrapper &srcArray, blitz::Array< float, 2 > &destArray)
 Convert a RGB image to a float gray image (wrapper version that does all the work) More...
 
static void rgb2gray (blitz::Array< blitz::TinyVector< unsigned char, 3 >, 2 > &srcArray, blitz::Array< float, 2 > &destArray)
 Convert a RGB (vectorial) image to a float gray image. More...
 
static void rgb2gray (blitz::Array< unsigned char, 3 > &srcArray, blitz::Array< float, 2 > &destArray)
 Convert a RGB (vectorial) image to a float gray image. More...
 
static void rgb2hsv (const unsigned char &r, const unsigned char &g, const unsigned char &b, float &h, float &s, float &v)
 Convert RGB to HSV. More...
 
static void rgb2hsv (const blitz::TinyVector< unsigned char, 3 > &colRGB, blitz::TinyVector< float, 3 > &colHSV)
 Convert RGB to HSV. More...
 
static void rgb2hsv (blitz::Array< unsigned char, 3 > &srcArray, blitz::Array< float, 3 > &destArray)
 Convert a RGB (layered) image to a HSV image. More...
 
static void rgb2hsv (blitz::Array< blitz::TinyVector< unsigned char, 3 >, 2 > &srcArray, blitz::Array< blitz::TinyVector< float, 3 >, 2 > &destArray)
 Convert a RGB (vectorial) image to a HSV image. More...
 
static void rgb2hsv (const ImageAccessWrapper &srcArray, blitz::Array< float, 3 > &destArray)
 Convert a RGB image to a HSV image (wrapper version that does all the work) *. More...
 

Detailed Description

Converts different color spaces into each other.

Definition at line 48 of file ColorConvert.hh.

Member Function Documentation

◆ rgb2gray() [1/8]

static void ColorConvert::rgb2gray ( const unsigned char &  r,
const unsigned char &  g,
const unsigned char &  b,
unsigned char &  gray 
)
static

Convert RGB to Gray.

Parameters
rthe red color component, range between 0-255
gthe green color component, range between 0-255
bthe blue color component, range between 0-255
graythe resulting gray color, range between 0-255

◆ rgb2gray() [2/8]

static void ColorConvert::rgb2gray ( const blitz::TinyVector< unsigned char, 3 > &  colRGB,
unsigned char &  gray 
)
static

Convert RGB to Gray.

Parameters
colRGBthe rgb color in a tinyVector
graythe gray color in a tinyVector, the 3 values are the same

◆ rgb2hsv() [1/5]

static void ColorConvert::rgb2hsv ( const unsigned char &  r,
const unsigned char &  g,
const unsigned char &  b,
float &  h,
float &  s,
float &  v 
)
static

Convert RGB to HSV.

Parameters
rthe red color component, range between 0-255
gthe green color component, range between 0-255
bthe blue color component, range between 0-255
hthe hue component, range between 0-1
sthe saturation component, range between 0-1
vthe value component, range between 0-1

◆ rgb2hsv() [2/5]

static void ColorConvert::rgb2hsv ( const blitz::TinyVector< unsigned char, 3 > &  colRGB,
blitz::TinyVector< float, 3 > &  colHSV 
)
static

Convert RGB to HSV.

Parameters
colRGBthe rgb color in a TinyVector
colHSVthe hsv color in a TinyVector

◆ hsv2rgb() [1/5]

static void ColorConvert::hsv2rgb ( const float &  h,
const float &  s,
const float &  v,
unsigned char &  r,
unsigned char &  g,
unsigned char &  b 
)
static

Convert HSV to RGB.

Parameters
hthe hue component, range between 0-1
sthe saturation component, range between 0-1
vthe value component, range between 0-1
rthe red color component, range between 0-255
gthe green color component, range between 0-255
bthe blue color component, range between 0-255

◆ hsv2rgb() [2/5]

static void ColorConvert::hsv2rgb ( const blitz::TinyVector< float, 3 > &  colHSV,
BlitzRGBColor colRGB 
)
static

Convert HSV to RGB.

Parameters
colHSVthe hsv color in a TinyVector
colRGBthe rgb color in a TinyVector

◆ rgb2gray() [3/8]

static void ColorConvert::rgb2gray ( blitz::Array< unsigned char, 3 > &  srcArray,
blitz::Array< unsigned char, 2 > &  destArray 
)
static

Convert a RGB (layered) image to a gray image.

Parameters
srcArraysource RGB image
destArraytarget gray image

◆ rgb2gray() [4/8]

static void ColorConvert::rgb2gray ( blitz::Array< blitz::TinyVector< unsigned char, 3 >, 2 > &  srcArray,
blitz::Array< unsigned char, 2 > &  destArray 
)
static

Convert a RGB (vectorial) image to a gray image.

Parameters
srcArraysource RGB image
destArraytarget gray image

◆ rgb2gray() [5/8]

static void ColorConvert::rgb2gray ( const ImageAccessWrapper srcArray,
blitz::Array< unsigned char, 2 > &  destArray 
)
static

Convert a RGB image to a gray image (wrapper version that does all the work)

Parameters
srcArraysource RGB image
destArraytarget gray image

◆ rgb2gray() [6/8]

static void ColorConvert::rgb2gray ( const ImageAccessWrapper srcArray,
blitz::Array< float, 2 > &  destArray 
)
static

Convert a RGB image to a float gray image (wrapper version that does all the work)

Parameters
srcArraysource RGB image
destArraytarget gray image, values in range 0-1 (float)

◆ rgb2gray() [7/8]

static void ColorConvert::rgb2gray ( blitz::Array< blitz::TinyVector< unsigned char, 3 >, 2 > &  srcArray,
blitz::Array< float, 2 > &  destArray 
)
static

Convert a RGB (vectorial) image to a float gray image.

Parameters
srcArraysource RGB image
destArraytarget gray image, values in range 0-1 (float)

◆ rgb2gray() [8/8]

static void ColorConvert::rgb2gray ( blitz::Array< unsigned char, 3 > &  srcArray,
blitz::Array< float, 2 > &  destArray 
)
static

Convert a RGB (vectorial) image to a float gray image.

Parameters
srcArraysource RGB image
destArraytarget gray image, values in range 0-1 (float)

◆ rgb2hsv() [3/5]

static void ColorConvert::rgb2hsv ( blitz::Array< unsigned char, 3 > &  srcArray,
blitz::Array< float, 3 > &  destArray 
)
static

Convert a RGB (layered) image to a HSV image.

Parameters
srcArraysource RGB image
destArraytarget gray image

◆ rgb2hsv() [4/5]

static void ColorConvert::rgb2hsv ( blitz::Array< blitz::TinyVector< unsigned char, 3 >, 2 > &  srcArray,
blitz::Array< blitz::TinyVector< float, 3 >, 2 > &  destArray 
)
static

Convert a RGB (vectorial) image to a HSV image.

Parameters
srcArraysource RGB image
destArraytarget gray image

◆ rgb2hsv() [5/5]

static void ColorConvert::rgb2hsv ( const ImageAccessWrapper srcArray,
blitz::Array< float, 3 > &  destArray 
)
static

Convert a RGB image to a HSV image (wrapper version that does all the work) *.

Parameters
srcArraysource RGB image
destArraytarget gray image

◆ hsv2rgb() [3/5]

static void ColorConvert::hsv2rgb ( blitz::Array< float, 3 > &  srcArray,
blitz::Array< unsigned char, 3 > &  destArray 
)
static

Convert a HSV (layered) image to a RGB image.

Parameters
srcArraysource RGB image
destArraytarget gray image

◆ hsv2rgb() [4/5]

static void ColorConvert::hsv2rgb ( blitz::Array< blitz::TinyVector< float, 3 >, 2 > &  srcArray,
blitz::Array< blitz::TinyVector< unsigned char, 3 >, 2 > &  destArray 
)
static

Convert a HSV (vectorial) image to a RGB image.

Parameters
srcArraysource RGB image
destArraytarget gray image

◆ hsv2rgb() [5/5]

static void ColorConvert::hsv2rgb ( const blitz::Array< float, 3 > &  srcArray,
ImageAccessWrapper destArray 
)
static

Convert a HSV image to a RGB image (wrapper version that does all the work) *.

Parameters
srcArraysource RGB image
destArraytarget gray image

The documentation for this class was generated from the following file: