How to use Matlab's 512 element lookup table array in OpenCV?
问题 I am designing morphological operations in OpenCV. I am trying to mimic the functions remove and bridge in Matlab's bwmorph. To do this I referred to the function definition of bwmorph.m, there I obtained the Look up table arrays for remove and bridge. After that step the procedure is same for both Matlab and OpenCV. lut(img,lutarray,img) Problem is that Matlab uses a 512 element (9bit) look up table scheme while OpenCV uses a 256 element (8bit) look up scheme, how do I use the Matlab