Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You will need to convert your image to 8 bit.

So, try this:

Mat input8bit;
input16bit.convertTo(input8bit, CV_8U, 1.0/256);