简单的读取图片
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 _0408简单读取
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public partial class HDevelopExport
{
public HTuple hv_ExpDefaultWinHandle;
// Main procedure
private void action()
{
// Local iconic variables
HObject ho_image;
// Local control variables
HTuple hv_Width = new HTuple(), hv_Height = new HTuple();
// Initialize local and output iconic variables
HOperatorSet.GenEmptyObj(out ho_image);
//dev_close_window(...);
ho_image.Dispose();
HOperatorSet.ReadImage(out ho_image, "C:/Users/Administrator/Desktop/sad.jpg");
hv_Width.Dispose(); hv_Height.Dispose();
HOperatorSet.GetImageSize(ho_image, out hv_Width, out hv_Height);
//dev_open_window(...);
HOperatorSet.DispObj(ho_image, hv_ExpDefaultWinHandle);
ho_image.Dispose();
hv_Width.Dispose();
hv_Height.Dispose();
// hv_WindowHandle.Dispose();
}
public void InitHalcon()
{
// Default settings used in HDevelop
HOperatorSet.SetSystem("width", 512);
HOperatorSet.SetSystem("height", 512);
}
public void RunHalcon(HTuple Window)
{
hv_ExpDefaultWinHandle = Window;
action();
}
}
private void button1_Click(object sender, EventArgs e)
{
HDevelopExport HD = new HDevelopExport();
HD.RunHalcon(hWindowControl1.HalconWindow);
}
}
}
资源文件列表
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í.csproj , 3922
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Form1.Designer.cs , 2873
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Form1.cs , 2130
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Form1.resx , 6022
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Program.cs , 498
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Properties/AssemblyInfo.cs , 1370
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Properties/Resources.Designer.cs , 2886
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Properties/Resources.resx , 5612
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Properties/Settings.Designer.cs , 1104
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/Properties/Settings.settings , 249
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/bin/Debug/0408╝≥╡Ñ╢┴╚í.exe , 9728
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/bin/Debug/0408╝≥╡Ñ╢┴╚í.pdb , 26112
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/bin/Debug/0408╝≥╡Ñ╢┴╚í.vshost.exe , 22472
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/bin/Debug/halcondotnet.dll , 1516040
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/bin/Debug/halcondotnet.xml , 4555857
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/obj/Debug/0408╝≥╡Ñ╢┴╚í.csproj.FileListAbsolute.txt , 986
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/obj/Debug/0408╝≥╡Ñ╢┴╚í.csproj.GenerateResource.Cache , 975
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/obj/Debug/0408╝≥╡Ñ╢┴╚í.exe , 9728
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/obj/Debug/0408╝≥╡Ñ╢┴╚í.pdb , 26112
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache , 6979
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/obj/Debug/_0408╝≥╡Ñ╢┴╚í.Form1.resources , 180
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í/obj/Debug/_0408╝≥╡Ñ╢┴╚í.Properties.Resources.resources , 180
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í.sln , 938
0408╝≥╡Ñ╢┴╚í/0408╝≥╡Ñ╢┴╚í.v11.suo , 35328
