Loading...
Searching...
No Matches
pcl::visualization::FloatImageUtils Class Reference
Module visualization

Provide some general functionalities regarding 2d float arrays, e.g., for visualization purposes More...

`#include <pcl/visualization/common/float_image_utils.h>`

## Static Public Member Functions

static void | getColorForFloat (float value, unsigned char &r, unsigned char &g, unsigned char &b)
| Get RGB color values for a given float in [0, 1] or special cases like -INFINITY(light green), INFINITY(light blue), NAN(light red)
static void | getColorForAngle (float value, unsigned char &r, unsigned char &g, unsigned char &b)
| Get RGB color values for a given float in [-PI, PI] or special cases like -INFINITY(light green), INFINITY(light blue), NAN(light red) The colors are black(-PI) -> blue(-PI/2) -> white(0) -> green(PI/2) -> black(PI) with accordant values in between.
static void | getColorForHalfAngle (float value, unsigned char &r, unsigned char &g, unsigned char &b)
| Get RGB color values for a given float in [0, PI] or special cases like -INFINITY(light green), INFINITY(light blue), NAN(light red) The colors are black(-PI/2) -> blue(-PI/4) -> white(0) -> green(PI/4) -> black(PI/2) with accordant values in between.
static unsigned char * | getVisualImage (const float *float_image, int width, int height, float min_value=-std::numeric_limits< float >::infinity(), float max_value=std::numeric_limits< float >::infinity(), bool gray_scale=false)
| Use getColorForFloat for all elements of the given arrays, whereas the values are first normalized to [0,1], either using the given min/max values or based on the actual minimal and maximal values existing in the array.
static unsigned char * | getVisualImage (const unsigned short *float_image, int width, int height, unsigned short min_value=0, unsigned short max_value=std::numeric_limits< unsigned short >::max(), bool gray_scale=false)
| Use getColorForFloat for all elements of the given arrays, whereas the values are normalized to [0,1] with the given min/max values.
static unsigned char * | getVisualAngleImage (const float *angle_image, int width, int height)
| Use getColorForAngle for all elements of the given arrays.
static unsigned char * | getVisualHalfAngleImage (const float *angle_image, int width, int height)
| Use getColorForHalfAngle for all elements of the given arrays.

## Detailed Description

Provide some general functionalities regarding 2d float arrays, e.g., for visualization purposes

Author
  Bastian Steder

Definition at line 50 of file float_image_utils.h.

## Member Function Documentation

## getColorForAngle()

static void pcl::visualization::FloatImageUtils::getColorForAngle | ( | float | value,
|  | unsigned char & | r,
|  | unsigned char & | g,
|  | unsigned char & | b
| ) |  |

static

Get RGB color values for a given float in [-PI, PI] or special cases like -INFINITY(light green), INFINITY(light blue), NAN(light red) The colors are black(-PI) -> blue(-PI/2) -> white(0) -> green(PI/2) -> black(PI) with accordant values in between.

## getColorForFloat()

static void pcl::visualization::FloatImageUtils::getColorForFloat | ( | float | value,
|  | unsigned char & | r,
|  | unsigned char & | g,
|  | unsigned char & | b
| ) |  |

static

Get RGB color values for a given float in [0, 1] or special cases like -INFINITY(light green), INFINITY(light blue), NAN(light red)

## getColorForHalfAngle()

static void pcl::visualization::FloatImageUtils::getColorForHalfAngle | ( | float | value,
|  | unsigned char & | r,
|  | unsigned char & | g,
|  | unsigned char & | b
| ) |  |

static

Get RGB color values for a given float in [0, PI] or special cases like -INFINITY(light green), INFINITY(light blue), NAN(light red) The colors are black(-PI/2) -> blue(-PI/4) -> white(0) -> green(PI/4) -> black(PI/2) with accordant values in between.

## getVisualAngleImage()

static unsigned char * pcl::visualization::FloatImageUtils::getVisualAngleImage | ( | const float * | angle_image,
|  | int | width,
|  | int | height
| ) |  |

static

Use getColorForAngle for all elements of the given arrays.

## getVisualHalfAngleImage()

static unsigned char * pcl::visualization::FloatImageUtils::getVisualHalfAngleImage | ( | const float * | angle_image,
|  | int | width,
|  | int | height
| ) |  |

static

Use getColorForHalfAngle for all elements of the given arrays.

## getVisualImage() [1/2]

static unsigned char * pcl::visualization::FloatImageUtils::getVisualImage | ( | const float * | float_image,
|  | int | width,
|  | int | height,
|  | float | min_value = `-std::numeric_limits< float >::infinity()`,
|  | float | max_value = `std::numeric_limits< float >::infinity()`,
|  | bool | gray_scale = `false`
| ) |  |

static

Use getColorForFloat for all elements of the given arrays, whereas the values are first normalized to [0,1], either using the given min/max values or based on the actual minimal and maximal values existing in the array.

The output is a byte array of size 3*width*height containing the colors in RGB order. If gray_scale is true, the outcome will still be an RGB image, but all colors apart for the special colors of non-finite numbers, will be gray values

## getVisualImage() [2/2]

static unsigned char * pcl::visualization::FloatImageUtils::getVisualImage | ( | const unsigned short * | float_image,
|  | int | width,
|  | int | height,
|  | unsigned short | min_value = `0`,
|  | unsigned short | max_value = `std::numeric_limits< unsigned short >::max()`,
|  | bool | gray_scale = `false`
| ) |  |

static

Use getColorForFloat for all elements of the given arrays, whereas the values are normalized to [0,1] with the given min/max values.

The output is a byte array of size 3*width*height containing the colors in RGB order. If gray_scale is true, the outcome will still be an RGB image, but all colors will be gray values.

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

- pcl/visualization/common/float_image_utils.h