|
想用C#写一个opencv的简单程序,可是总是报错。试过了很多方法,添加环境变量,在bin/debug 里面加入引用的包,都试了。。可还是报错。真的是没办法了。求助各位大神- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- using Emgu.CV;
- using Emgu.CV.CvEnum;
- using Emgu.CV.Structure;
- namespace WindowsFormsApplication4
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- Image<Bgr, byte> img = new Image<Bgr, byte>(480, 320, new Bgr(0, 255, 0));
- MCvFont f = new MCvFont(FONT.CV_FONT_HERSHEY_TRIPLEX, 1.0, 1.0);
- img.Draw("Hello World", ref f, new Point(10, 80), new Bgr(0, 0, 0));
- pictureBox1.Image = img.ToBitmap();
- }
- private void pictureBox1_Click(object sender, EventArgs e)
- {
-
- }
- }
- }
复制代码
C:\Users\lenovo\Desktop。
|
|