applyColormap for CV_64F matrix?

asked 2015-02-23 12:02:11 -0500

TrustMeImAnEngineer gravatar image

I've been trying to use the applyColormap function. I'm working with a matrix with a datatype of CV_64F. If I apply a color map, the image is still B&W (using imshow). But if I convert the matrix to CV_8U, then apply the color map, it works. This is fine for right now, but later on I will need to apply a color map to a matrix with datatype CV_64F and I will not be able to convert it to CV_8U because it will have negative values and decimal points.

Any suggestions would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

it all works with [0..256] LUT's internally... so chances are low.

but note, that convertTo also takes scale/offset values, so you might be able to adapt yout CV_64 to CV_8U

berak gravatar imageberak ( 2015-02-23 12:26:28 -0500 )edit