Extracting bpp without explicitly mapping value to data types
Hi,
I need to calculate the bits per pixel of a matrix and wonder if there is a decent method to extract the depth of an image in bits directly without explicitly mapping the types CV_8U,.... to the appropriate values (or using if-else constructs)?
cv::Mat has a depth() member, which gives you bytes per pixel.
"without explicitly mapping the types CV_8U" -- why would you do that ?
there can be float,double, or complex data inside. not every type is measurable in bits.