Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
目前我正在做一个从相机拍摄图像的项目。问题是,它提供 14 位或 42 位 3 通道图像(取决于设置)。
我想弄清楚,但真的找不到任何关于我能以某种方式将传入的 14 位或 42 位图像转换为可用于 OpenCV 的格式吗?
如果我设法将其设置为 CV_8U 就足够了,在这种情况下是 3 个设置。
任何人都可以给我任何见解吗?
谢谢。
您如何将数据放入您的程序中?它是否保存在文件中,您是否阅读它们cv::imread()?Mat::type()然后呢?
cv::imread()
Mat::type()
最好的方法似乎是将 14 位数据简单地乘以 4 来将其缩放为 16 位。因此您可以将其存储在 CV_16U Mat 中。