[英]OpenCV function to convert 8U image to 16U
Is anyone aware of any functions in OpenCV which support 8U
to 16U
conversion?有人知道 OpenCV 中支持
8U
到16U
转换的任何功能吗? I tried cvConvertImage
, cvConvertScale
but they are all meant to operate only on 8U
image formats.我试过
cvConvertImage
, cvConvertScale
但它们都只能在8U
图像格式上运行。
If you're using the newer C++ API, then check out Mat::convertTo
如果您使用的是较新的 C++ API,请查看
Mat::convertTo
Mat a(rows, cols, CV_8U);
Mat b;
a.convertTo(b, CV_16U);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.