opencvsharp icon indicating copy to clipboard operation
opencvsharp copied to clipboard

Cv and mat.ToBitmap is missing

Open yeganehaym opened this issue 3 years ago • 1 comments

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);

yeganehaym avatar Aug 28 '22 13:08 yeganehaym

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

lwqwag avatar Sep 06 '22 08:09 lwqwag

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.

stale[bot] avatar Mar 18 '23 06:03 stale[bot]