I have 16 bit openCV Mat. I am looking to complement the MAT and then convert it into 8 bit openCV Mat. I have done it in MATLAB but don't know how to do it in openCV.
My MATLAB code is:
imComplement = imcomplement(image);
img8Bit = im2uint8(imComplement);