ouster.sdk.examples.colormaps module

Copyright (c) 2021, Ouster, Inc. All rights reserved.

Ouster spezia colormap

colorize(image)[source]

Use Ouster spezia colormap to get from gray to color space.

Parameters:

image (ndarray) – 2D array of values in the range [0, 1]

Returns:

Array of RGB values of the same dimension selected from the color map

normalize(data, percentile=0.05)[source]

Normalize and clamp data for better color mapping.

This is a utility function used ONLY for the purpose of 2D image visualization. The resulting values are not fully reversible because the final clipping step discards values outside of [0, 1].

Parameters:
  • data (ndarray) – array of data to be transformed for visualization

  • percentile (float) – values in the bottom/top percentile are clamped to 0 and 1

Returns:

An array of doubles with the same shape as image with values normalized to the range [0, 1].