无法将类型转换为 'System.Drawing.Image' 存在显式转换

Cannot convert type to 'System.Drawing.Image' an explicit conversion exists

这是我的新手,我正在为 FLIR (PointGrey) 相机使用 Spinnaker SDK 示例。我正在尝试将 'convertedImage' 转换为在 Windows 表单中的 PictureBox 中使用,但出现错误 "Cannot implicitly convert type to 'System.Drawing.Image'. An explicit conversion exists (are you missing a cast?)"。你能告诉我我需要做什么吗?谢谢!

尝试了一切,包括基本的显式转换。

//Part of Spinnaker SDK example:    
using (IManagedImage convertedImage = 
rawImage.Convert(PixelFormatEnums.Mono8))
{
    String filename = "TriggerQS-CSharp-";
    if (deviceSerialNumber != "")
    {
        filename = filename + deviceSerialNumber + "-";
    }
    Image testImage = convertedImage; 
}

我遇到了同样的问题。 Spinnaker 类型 IManagedImage 有一个名为 ManagedData 的 属性,它是一个包含图像所有字节的一维向量。如果你有下面我的例子中的颜色,它们是交错的。

//cv.ManagedData is a one D array of all pixels in all colors

        int nx = 2592;
        int ny = 1944; //7776/3 = 2592  stride, i.e. rgb are interleaved
        byte[,,] data = new byte[ny, nx, 3];

        for (int j = 0; j < ny; j++)
        {
            for (int i = 0; i < nx; i++)
            {
                for (int k = 0; k < 3; k++)
                {
                    data[j,i, k] = cv.ManagedData[j * 3 * nx + 3 * i + k];
                }

            }
        }

        //emgu cv accepts the [,,] byte array
        Image<Bgr, Byte> im0 = new Image<Bgr, Byte>(data);