Jetson Inference
DNN Vision Library
|
Defines various colormaps and color mapping functions. More...
Enumerations | |
enum | cudaColormapType { COLORMAP_INFERNO, COLORMAP_MAGMA, COLORMAP_PARULA, COLORMAP_PLASMA, COLORMAP_TURBO, COLORMAP_VIRIDIS, COLORMAP_INFERNO_INVERTED, COLORMAP_MAGMA_INVERTED, COLORMAP_PARULA_INVERTED, COLORMAP_PLASMA_INVERTED, COLORMAP_TURBO_INVERTED, COLORMAP_VIRIDIS_INVERTED, COLORMAP_FLOW, COLORMAP_NONE, COLORMAP_LINEAR, COLORMAP_DEFAULT = COLORMAP_VIRIDIS } |
Enumeration of built-in colormaps. More... | |
Functions | |
cudaColormapType | cudaColormapFromStr (const char *colormap) |
Parse a cudaColormapType enum from a string. More... | |
const char * | cudaColormapToStr (cudaColormapType colormap) |
Convert a cudaColormapType enum to a string. More... | |
template<typename T > | |
cudaError_t | cudaColormap (float *input, T *output, size_t width, size_t height, const float2 &input_range=make_float2(0, 255), cudaDataFormat input_format=FORMAT_DEFAULT, cudaColormapType colormap=COLORMAP_DEFAULT, cudaStream_t stream=NULL) |
Apply a colormap from an input image or vector field to RGB/RGBA. More... | |
cudaError_t | cudaColormap (float *input, void *output, size_t width, size_t height, const float2 &input_range=make_float2(0, 255), cudaDataFormat input_format=FORMAT_DEFAULT, imageFormat output_format=IMAGE_UNKNOWN, cudaColormapType colormap=COLORMAP_DEFAULT, cudaStream_t stream=NULL) |
Apply a colormap from an input image or vector field to RGB/RGBA. More... | |
template<typename T > | |
cudaError_t | cudaColormap (float *input, size_t input_width, size_t input_height, T *output, size_t output_width, size_t output_height, const float2 &input_range=make_float2(0, 255), cudaDataFormat input_format=FORMAT_DEFAULT, cudaColormapType colormap=COLORMAP_DEFAULT, cudaFilterMode filter=FILTER_LINEAR, cudaStream_t stream=NULL) |
Apply a colormap from an input image or vector field to RGB/RGBA. More... | |
cudaError_t | cudaColormap (float *input, size_t input_width, size_t input_height, void *output, size_t output_width, size_t output_height, const float2 &input_range=make_float2(0, 255), cudaDataFormat input_format=FORMAT_DEFAULT, imageFormat output_format=IMAGE_UNKNOWN, cudaColormapType colormap=COLORMAP_DEFAULT, cudaFilterMode filter=FILTER_LINEAR, cudaStream_t stream=NULL) |
Apply a colormap from an input image or vector field to RGB/RGBA. More... | |
cudaError_t | cudaColormapInit () |
Initialize the colormap palettes by allocating them in CUDA memory. More... | |
cudaError_t | cudaColormapFree () |
Free the colormap palettes after they are done being used. More... | |
Defines various colormaps and color mapping functions.
enum cudaColormapType |
Enumeration of built-in colormaps.
Enumerator | |
---|---|
COLORMAP_INFERNO | Inferno colormap, see http://bids.github.io/colormap/. |
COLORMAP_MAGMA | Magma colormap, see http://bids.github.io/colormap/. |
COLORMAP_PARULA | Parula colormap, see https://www.mathworks.com/help/matlab/ref/parula.html. |
COLORMAP_PLASMA | Plasma colormap, see http://bids.github.io/colormap/. |
COLORMAP_TURBO | Turbo colormap, see https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html. |
COLORMAP_VIRIDIS | Viridis colormap, see http://bids.github.io/colormap/. |
COLORMAP_INFERNO_INVERTED | Inferno colormap (inverted), see http://bids.github.io/colormap/. |
COLORMAP_MAGMA_INVERTED | Magma colormap (inverted), see http://bids.github.io/colormap/. |
COLORMAP_PARULA_INVERTED | Parula colormap (inverted), see https://www.mathworks.com/help/matlab/ref/parula.html. |
COLORMAP_PLASMA_INVERTED | Plasma colormap (inverted), see http://bids.github.io/colormap/. |
COLORMAP_TURBO_INVERTED | Turbo colormap (inverted), see https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html. |
COLORMAP_VIRIDIS_INVERTED | Viridis colormap (inverted), see http://bids.github.io/colormap/. |
COLORMAP_FLOW | Optical flow x/y velocity (2D) |
COLORMAP_NONE | Pass-through (no remapping applied) |
COLORMAP_LINEAR | Linearly remap the values to [0,255]. Default colormap (Viridis) |
COLORMAP_DEFAULT |
cudaError_t cudaColormap | ( | float * | input, |
size_t | input_width, | ||
size_t | input_height, | ||
T * | output, | ||
size_t | output_width, | ||
size_t | output_height, | ||
const float2 & | input_range = make_float2(0,255) , |
||
cudaDataFormat | input_format = FORMAT_DEFAULT , |
||
cudaColormapType | colormap = COLORMAP_DEFAULT , |
||
cudaFilterMode | filter = FILTER_LINEAR , |
||
cudaStream_t | stream = NULL |
||
) |
Apply a colormap from an input image or vector field to RGB/RGBA.
If the input and output dimensions differ, this function will rescale the image using bilinear or nearest-point interpolation as set by the filter
mode.
input_range | the minimum and maximum values of the input image. |
colormap | the colormap to apply ( |
filter | the interpolation mode used for rescaling. |
format | layout of multi-channel input data (HWC or CHW). |
cudaError_t cudaColormap | ( | float * | input, |
size_t | input_width, | ||
size_t | input_height, | ||
void * | output, | ||
size_t | output_width, | ||
size_t | output_height, | ||
const float2 & | input_range = make_float2(0, 255) , |
||
cudaDataFormat | input_format = FORMAT_DEFAULT , |
||
imageFormat | output_format = IMAGE_UNKNOWN , |
||
cudaColormapType | colormap = COLORMAP_DEFAULT , |
||
cudaFilterMode | filter = FILTER_LINEAR , |
||
cudaStream_t | stream = NULL |
||
) |
Apply a colormap from an input image or vector field to RGB/RGBA.
If the input and output dimensions differ, this function will rescale the image using bilinear or nearest-point interpolation as set by the filter
mode.
input_range | the minimum and maximum values of the input image. |
colormap | the colormap to apply ( |
filter | the interpolation mode used for rescaling. |
format | layout of multi-channel input data (HWC or CHW). |
cudaError_t cudaColormap | ( | float * | input, |
T * | output, | ||
size_t | width, | ||
size_t | height, | ||
const float2 & | input_range = make_float2(0,255) , |
||
cudaDataFormat | input_format = FORMAT_DEFAULT , |
||
cudaColormapType | colormap = COLORMAP_DEFAULT , |
||
cudaStream_t | stream = NULL |
||
) |
Apply a colormap from an input image or vector field to RGB/RGBA.
If the input and output dimensions differ, this function will rescale the image using bilinear or nearest-point interpolation as set by the filter
mode.
input_range | the minimum and maximum values of the input image. |
colormap | the colormap to apply ( |
format | layout of multi-channel input data (HWC or CHW). |
cudaError_t cudaColormap | ( | float * | input, |
void * | output, | ||
size_t | width, | ||
size_t | height, | ||
const float2 & | input_range = make_float2(0, 255) , |
||
cudaDataFormat | input_format = FORMAT_DEFAULT , |
||
imageFormat | output_format = IMAGE_UNKNOWN , |
||
cudaColormapType | colormap = COLORMAP_DEFAULT , |
||
cudaStream_t | stream = NULL |
||
) |
Apply a colormap from an input image or vector field to RGB/RGBA.
If the input and output dimensions differ, this function will rescale the image using bilinear or nearest-point interpolation as set by the filter
mode.
input_range | the minimum and maximum values of the input image. |
colormap | the colormap to apply ( |
format | layout of multi-channel input data (HWC or CHW). |
cudaError_t cudaColormapFree | ( | ) |
Free the colormap palettes after they are done being used.
Only needs to be called if the other colormap functions were.
cudaColormapType cudaColormapFromStr | ( | const char * | colormap | ) |
Parse a cudaColormapType enum from a string.
cudaError_t cudaColormapInit | ( | ) |
Initialize the colormap palettes by allocating them in CUDA memory.
const char* cudaColormapToStr | ( | cudaColormapType | colormap | ) |
Convert a cudaColormapType enum to a string.