OpenCV function to convert 8U image to 16U
开发者_如何学运维Is anyone aware of any functions in OpenCV which support 8U
to 16U
conversion? I tried cvConvertImage
, cvConvertScale
but they are all meant to operate only on 8U
image formats.
If you're using the newer C++ API, then check out Mat::convertTo
Mat a(rows, cols, CV_8U);
Mat b;
a.convertTo(b, CV_16U);
精彩评论