// convert images to the 8Bit version
// This sample uses a fixed scaling of the values to (0, 255) to avoid flickering.
// You can also replace this with an automatic scaling by using
// normalize(zImage, zImage8, 0, 255, NORM_MINMAX, CV_8UC1)
// normalize(grayImage, grayImage8, 0, 255, NORM_MINMAX, CV_8UC1)
zImage.convertTo (zImage8, CV_8UC1);
// convert images to the 8Bit version
// This sample uses a fixed scaling of the values to (0, 255) to avoid flickering.
// You can also replace this with an automatic scaling by using
// normalize(zImage, zImage8, 0, 255, NORM_MINMAX, CV_8UC1)
// normalize(grayImage, grayImage8, 0, 255, NORM_MINMAX, CV_8UC1)
zImage.convertTo (zImage8, CV_8UC1);