30 void operator()(
const SrcPixelT &src, DstPixelT &dst)
const {
31 using namespace boost::gil;
33 sizeof(
typename color_space_type<SrcPixelT>::type) ==
sizeof(uint8_t),
34 "Invalid pixel type.");
36 get_color(src, red_t()) +
37 (get_color(src, green_t()) * 256) +
38 (get_color(src, blue_t()) * 256 * 256);
39 const float normalized = depth /
static_cast<float>(256 * 256 * 256 - 1);
40 color_convert(gray32fc_pixel_t{normalized}, dst);