1.前言
Halcon功能,展示在桌面上,可应用于工业软件。
2.代码
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 HalconDotNet;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
String path = "";
HObject ho_Image;
HObject grayImage;
//读取图片按钮
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog openFile = new OpenFileDialog();
if (openFile.ShowDialog() == DialogResult.OK && openFile.FileName != "")
{
path = openFile.FileName;
}
HOperatorSet.ReadImage(out ho_Image, path);
hWindowCo