콘솔프로젝트로 레니영상 로딩하기
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenCvSharp;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
readImage1();
readImage2();
}
private static void readImage2()
{
using (var src = new Mat(@"c:\lena512.jpg", ImreadModes.Unchanged))
{
using (var window = new Window("Lena_Original", image: src, flags: WindowMode.AutoSize))
{
Cv2.WaitKey();
}
}
}
private static void readImage1()
{
using (var src = new Mat(@"c:\lena512.jpg", ImreadModes.GrayScale))
{
using (var window = new Window("Lena_Gray", image: src, flags: WindowMode.AutoSize))
{
Cv2.WaitKey();
}
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenCvSharp;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
readImage1();
readImage2();
}
private static void readImage2()
{
using (var src = new Mat(@"c:\lena512.jpg", ImreadModes.Unchanged))
{
using (var window = new Window("Lena_Original", image: src, flags: WindowMode.AutoSize))
{
Cv2.WaitKey();
}
}
}
private static void readImage1()
{
using (var src = new Mat(@"c:\lena512.jpg", ImreadModes.GrayScale))
{
using (var window = new Window("Lena_Gray", image: src, flags: WindowMode.AutoSize))
{
Cv2.WaitKey();
}
}
}
}
}
댓글
댓글 쓰기