Ask Your Question

Revision history [back]

i found the solution here

use result.convertTo() to convert it from CV_16S to CV_8U than you can convert color to gray.

...
Mat result8u,gray;
result.convertTo(result8u,CV_8U);
cvtColor(result8u,gray,COLOR_BGR2GRAY);