C# opencv加载图片

C# opencv 加载图片

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

using OpenCvSharp;

namespace WindowsFormsApplication1
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            test1();

        }

        static void test1()
        {
            Mat img1 = new Mat("D:\\image_1\\1.jpg", ImreadModes.Color);
            Cv2.ImShow("win1", img1);
            Cv2.WaitKey(0);
        }
    }
}

 

 

#########################

posted @ 2021-06-15 15:04  西北逍遥  阅读(615)  评论(0编辑  收藏  举报