Is there function in OpenCV similar to ind2rgb in MATLAB ?

asked Sep 9 '15

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.

Preview: (hide)

Comments

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

LBerger gravatar imageLBerger (Sep 9 '15)edit

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

unfortunately , it is restricted to 8bit input.

berak gravatar imageberak (Sep 9 '15)edit