First time here? Check out the FAQ!
answered 2013-10-21 13:35:35 -0600
You will need to convert your image to 8 bit.
So, try this:
Mat input8bit; input16bit.convertTo(input8bit, CV_8U, 1.0/256);