Realm

oa::image::apply_color_map

Map a single-channel FP32 image to RGB through a colormap. Each luminance value is clamped to [0, 1] and mapped by the admitted analytic colormap definition (Jet, Hot, Hsv, or Rainbow) to an RGB triplet, producing a three-channel Rgb image per plane following the applyColorMap contract. Errors Returns an error unless the image is nonempty FP32 NCHW/CHW with a single channel.

FnRust public API

Function Documentation

pub fn apply_color_map( input: &Image, colormap: ColorMap ) -> Result<Image>
Map a single-channel FP32 image to RGB through a colormap. Each luminance value is clamped to [0, 1] and mapped by the admitted analytic colormap definition (Jet, Hot, Hsv, or Rainbow) to an RGB triplet, producing a three-channel Rgb image per plane following the applyColorMap contract. Errors Returns an error unless the image is nonempty FP32 NCHW/CHW with a single channel.