using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
using Emgu.CV.UI;
namespace test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
var dialog = new OpenFileDialog();
dialog.Filter = "图片(*.jpg/*.png/*.gif/*.bmp)|*.jpg;*.png;*.gif;*.bmp";
if (dialog.ShowDialog() == DialogResult.OK)
{
Mat img = CvInvoke.Imread(dialog.FileName);//, LoadImageType.Unchanged
pictureBox1.Image = img.Bitmap;
}
}
}
}
EMGU 第一个程序 读取图片
最新推荐文章于 2023-12-11 14:10:28 发布