EmguCV System.ArgumentException:'Unable to decode file'

EmguCV System.ArgumentException: 'Unable to decode file'

我正在尝试 instantiate an EmguCv Mat 使用文件路径和 EmguCVEnum 作为参数。

代码如下所示

using (Mat mat = new Mat("Y:\Desktop\test.dng", ImreadModes.Unchanged))

但是它抛出错误:

System.ArgumentException: 'Unable to decode file: Y:\Desktop\demTest\ATHS4829.dng'

有没有办法使用 DNG 文件或其图像数据创建垫子?

我引用:

DNG is also considered to be a RAW image file. It is Adobe's proprietary image standard that was created to store image data in a generic, highly-compatible format, unlike RAW files that have specific formats based on manufacturer and camera type.

所以我怀疑 EmguCV/OpenCV 能否读取 Adob​​e 专有格式。

道格

我能够通过检索存储在 DNG 中的字节并将它们放入数组中来解决这个问题。然后使用字节数组创建一个 Image<Bgr, ushort> 对象。之后我可以打电话给

UMat mat = img.ToUMat();