Colormaps#
Helper functions for visualizing outputs
- nerfstudio.utils.colormaps.apply_boolean_colormap(image: Tensor, true_color: Tensor = tensor([1., 1., 1.]), false_color: Tensor = tensor([0., 0., 0.])) Tensor #
Converts a depth image to color for easier analysis.
- Parameters:
image – Boolean image.
true_color – Color to use for True.
false_color – Color to use for False.
- Returns:
Colored boolean image
- nerfstudio.utils.colormaps.apply_colormap(image: Tensor, cmap='viridis') Tensor #
Convert single channel to a color image.
- Parameters:
image – Single channel image.
cmap – Colormap for image.
- Returns:
Colored image
- Return type:
TensorType
- nerfstudio.utils.colormaps.apply_depth_colormap(depth: Tensor, accumulation: Optional[Tensor] = None, near_plane: Optional[float] = None, far_plane: Optional[float] = None, cmap='turbo') Tensor #
Converts a depth image to color for easier analysis.
- Parameters:
depth – Depth image.
accumulation – Ray accumulation used for masking vis.
near_plane – Closest depth to consider. If None, use min image value.
far_plane – Furthest depth to consider. If None, use max image value.
cmap – Colormap to apply.
- Returns:
Colored depth image