Is there function in OpenCV similar to ind2rgb in MATLAB ?

asked 2015-09-08 18:05:23 -0600

ChaoyuanYeh gravatar image

I have a 16-bit indexed image that I'd like to convert to color image using my own lookup table. In MATLAB, this can be done with

color_img = ind2rgb(ind_img, colormap)

I'm wondering if there is any OpenCV function that does the same thing? I've only found cvtColor, which I don't think gives user any control over the colormap it's using.

edit retag flag offensive close merge delete


have you seen this post? I hope I'm wrong but I think you have to write your own code

LBerger gravatar imageLBerger ( 2015-09-09 01:05:59 -0600 )edit

there's applyColorMap which is basically using cv::LUT

unfortunately , it is restricted to 8bit input.

berak gravatar imageberak ( 2015-09-09 11:39:45 -0600 )edit