First time here? Check out the FAQ!
answered 2017-05-31 10:44:20 -0600
Use convertTo method.
Mat x(10,12,CV_8UC1),y; x.convertTo(y,CV_16S,128); // y =128*x;