51 return static_cast<float>(t[0]) / 255.0f;
61 return (
static_cast<unsigned char>(t * 255));
Storage< unsigned char, 1 > U8C1
Storage< float, 3 > F32C3
It replicates one channel to 3 channels.
visioncpp::pixel::F32C3 operator()(float t)
It replicates one channel to 3 channels.
It converts float to uchar converting [0.0f, 1.0f] to [0, 255].
visioncpp::pixel::U8C1 operator()(float t)
It converts float to uchar converting [0.0f, 1.0f] to [0, 255].
It converts float to uchar.
unsigned char operator()(float t)
It converts float to uchar.
It converts uchar to float converting range [0, 255] to [0.0f, 1.0f].
float operator()(visioncpp::pixel::U8C1 t)
It converts uchar to float converting range [0, 255] to [0.0f, 1.0f].