shimat / opencvsharp

OpenCV wrapper for .NET
Apache License 2.0
5.39k stars 1.15k forks source link

Cv and mat.ToBitmap is missing #1466

Closed yeganehaym closed 1 year ago

yeganehaym commented 2 years ago

Summary of your issue

Cv class is missing mat object doesn't have ToBitmap method

Environment

Windows 10 - .net 6 - OpenCVSharp 4

Example code:

var img = Cv.CreateImage(new CvSize(128, 128), BitDepth.U8, 1);

            for (var y = 0; y < img.Height; y++)
            {
                for (var x = 0; x < img.Width; x++)
                {
                    Cv.Set2D(img, y, x, x + y);
                }
            }

            Cv.NamedWindow("window");
            Cv.ShowImage("window", img);
            Cv.WaitKey();
            Cv.DestroyWindow("window");

            Cv.ReleaseImage(img);
lwqwag commented 2 years ago

The extension method ToBitmap is in OpenCvSharp4.Extensions package . You need install OpenCvSharp4.Extensions.dll first

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.