C#图像处理-OpenCVSharp教程(四)OpenCVSharp图像读
取、显⽰与保存
本⽂作者Color Space,⽂章未经作者允许禁⽌转载!
本⽂将介绍OpenCVSharp图像读取、显⽰与保存操作!writeline教程
代码演⽰与说明:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using OpenCvSharp;
namespace Lesson_03
{
class Program
{
static void Main(string[] args)
{
Mat srcImg = Cv2.ImRead("./2.jpg");
if (srcImg.Empty())
{
Console.WriteLine("图⽚读取失败!");
return;
}
Console.WriteLine("图⽚读取成功!");
Console.WriteLine("图像的宽度是{0}", srcImg.Cols);
Console.

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。