• 大小: 17.26MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-19
  • 语言: C/C++
  • 标签: opencv  opencvsharp  

资源简介

Sample01: How to create a simple 2D image and show it using OpenCV Window. Sample02: How to load and display images. Sample03: How to create a gray-scale image. Sample04: How to apply different filters to images, such as erode, dilate, etc. Sample04-Winforms: How to use OpenCVSharp in a WindowsForms application. Sample05: How to use OpenCVSharp in a WPF application. Sample06: How to use VideoCapture and WebCams. Sample07: How to access pixels data using the C++ interface of OpenCV. Sample08: How to apply MorphologyEx filters to images. Sample09: How to resize, rotate and blur images. Sample10: How to calculate the histogram of an image. Sample11: How use k-means method of OpenCV. Sample12: How to use watershed transform. Sample13: How to use SURF. Sample14: How to use SimpleBlobDetector. Sample15: How to detect faces using Haar detection. Sample16: How to train your own detector using CascadeClassifier. Sample17: How to detect faces using FisherFaceRecognizer. Sample18: How to create a Simple OCR using OpenCVSharp. Sample19: How to create a Simple BarcodeReader using

资源截图

代码片段和文件信息

using OpenCvSharp;

namespace OpenCVSharpSample01
{
    class Program
    {
        static void Main(string[] args)
        {
            using (var src = new Mat(new Size(128 128) MatType.CV_8U Scalar.All(255)))
            using (var dst = new Mat())
            {
                for (var y = 0; y < src.Height; y++)
                {
                    for (var x = 0; x < src.Width; x++)
                    {
                        var color = src.Get(y x);
                        var temp = color.Item0;
                        color.Item0 = color.Item2; // B <- R
                        color.Item2 = temp;        // R <- B
                        src.Set(y x color);
                    }
                }

                src.CopyTo(dst);

                using (var window = new Window(“window“ image: dst flags: WindowMode.AutoSize))
                {
                    Cv2.WaitKey();
                }
            }
        }

        /*private static void version2xDeprecated()
        {
            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);
        }*/
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\
     文件        2518  2018-08-29 08:36  OpenCVSharp-Samples-master\.gitattributes
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\.github\
     文件         246  2018-08-29 08:36  OpenCVSharp-Samples-master\.github\issue_template.md
     文件        2850  2018-08-29 08:36  OpenCVSharp-Samples-master\.gitignore
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\.nuget\
     文件         164  2018-08-29 08:36  OpenCVSharp-Samples-master\.nuget\NuGet.Config
     文件     1664512  2018-08-29 08:36  OpenCVSharp-Samples-master\.nuget\NuGet.exe
     文件        7484  2018-08-29 08:36  OpenCVSharp-Samples-master\.nuget\NuGet.targets
     文件       11325  2018-08-29 08:36  OpenCVSharp-Samples-master\LICENSE.md
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample01\
     文件        6916  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample01\OpenCVSharpSample01.csproj
     文件        1517  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample01\Program.cs
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample01\Properties\
     文件        1414  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample01\Properties\AssemblyInfo.cs
     文件         152  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample01\packages.config
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample02\
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample02\Images\
     文件       69870  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample02\Images\ocv02.jpg
     文件        6988  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample02\OpenCVSharpSample02.csproj
     文件        2057  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample02\Program.cs
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample02\Properties\
     文件        1414  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample02\Properties\AssemblyInfo.cs
     文件         152  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample02\packages.config
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample03\
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample03\Images\
     文件       69870  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample03\Images\ocv02.jpg
     文件        6988  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample03\OpenCVSharpSample03.csproj
     文件        1995  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample03\Program.cs
     目录           0  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample03\Properties\
     文件        1414  2018-08-29 08:36  OpenCVSharp-Samples-master\OpenCVSharpSample03\Properties\AssemblyInfo.cs
............此处省略3165个文件信息

评论

共有 条评论