35 void operator()(
const SrcPixelT &src, DstPixelT &dst)
const {
36 using namespace boost::gil;
40 sizeof(
typename color_space_type<SrcPixelT>::type) ==
sizeof(uint8_t),
41 "Invalid pixel type.");
44 get_color(src, red_t()) +
45 (get_color(src, green_t()) * 256) +
46 (get_color(src, blue_t()) * 256 * 256);
47 const float normalized = depth /
static_cast<float>(256 * 256 * 256 - 1);
48 color_convert(gray32fc_pixel_t{normalized}, dst);