c# opencvsharp bitmap转mat--mat转bitmap

c# opencvsharp bitmap转mat--mat转bitmap

 // Mat mat = OpenCvSharp.Extensions.BitmapConverter.ToMat(bitmap); //bitmap转mat
            // mat = mat.CvtColor(ColorConversionCodes.GRAY2RGB);//转彩色图像
            // mat = DrawCross(mat, new System.Drawing.Point(640, 512), 0.0, 1000, Scalar.Red, 2);

            Bitmap bitmap;
            bitmap = OpenCvSharp.Extensions.BitmapConverter.ToBitmap(result.src); //mat转bitmap
            bitmap.Save(Application.StartupPath + "\\pics\\reels_in_box.bmp");

 

posted @ 2024-01-23 10:18  txwtech  阅读(889)  评论(0编辑  收藏  举报