For working with other 3rd party libraries, e.g. OpenCV, I would like to convert a layer of floating precision data type to a raw copy of the underlying data.
Like described here, if the data at a cell evaluates std::isfinite to false, its value in the conversion is zero. Furthermore, scaling takes place when converting to and from Mat.
Especially for floating type data, I would like to have the option to propagate numeric limits, like std::nanf and std::numeric_limits<float>::infinity
I looked at the code, and it seems to me that adding a function
is clearer, than adding more overloads to the function. Especially since without scaling many assumptions on images are not fulfilled. We write float values images, including non-finite values, to .pfm file. Its not the most widely used format, but I haven't seen something else for float images.
For working with other 3rd party libraries, e.g. OpenCV, I would like to convert a layer of floating precision data type to a raw copy of the underlying data.
Like described here, if the data at a cell evaluates
std::isfinite
to false, its value in the conversion is zero. Furthermore, scaling takes place when converting to and from Mat.Especially for floating type data, I would like to have the option to propagate numeric limits, like
std::nanf
andstd::numeric_limits<float>::infinity
I looked at the code, and it seems to me that adding a function
is clearer, than adding more overloads to the function. Especially since without scaling many assumptions on images are not fulfilled. We write float values images, including non-finite values, to .pfm file. Its not the most widely used format, but I haven't seen something else for float images.