OpenCV中文网站

 找回密码
 立即注册
搜索
热搜: 安装 配置
查看: 3298|回复: 0

【求助】关于C#实现一个简单的OpenCV程序 报错。

[复制链接]
发表于 2016-5-15 19:26:48 | 显示全部楼层 |阅读模式
想用C#写一个opencv的简单程序,可是总是报错。试过了很多方法,添加环境变量,在bin/debug 里面加入引用的包,都试了。。可还是报错。真的是没办法了。求助各位大神
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using Emgu.CV;
  11. using Emgu.CV.CvEnum;
  12. using Emgu.CV.Structure;


  13. namespace WindowsFormsApplication4
  14. {
  15.     public partial class Form1 : Form
  16.     {
  17.         public Form1()
  18.         {
  19.             InitializeComponent();
  20.         }

  21.         private void Form1_Load(object sender, EventArgs e)
  22.         {
  23.             Image<Bgr, byte> img = new Image<Bgr, byte>(480, 320, new Bgr(0, 255, 0));
  24.             MCvFont f = new MCvFont(FONT.CV_FONT_HERSHEY_TRIPLEX, 1.0, 1.0);
  25.             img.Draw("Hello World", ref f, new Point(10, 80), new Bgr(0, 0, 0));
  26.             pictureBox1.Image = img.ToBitmap();
  27.         }

  28.         private void pictureBox1_Click(object sender, EventArgs e)
  29.         {
  30.             
  31.         }
  32.     }
  33. }
复制代码

C:\Users\lenovo\Desktop。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|OpenCV中文网站

GMT+8, 2024-4-20 16:28 , Processed in 0.009949 second(s), 16 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表