using HalconDotNet; 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; namespace Test1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { HObject ho_Image; // Initialize local and output iconic variables HOperatorSet.GenEmptyObj(out ho_Image); ho_Image.Dispose(); HOperatorSet.ReadImage(out ho_Image, "D:/Halcon/演示图片/Image_20231102133100714.bmp"); ho_Image.Dispose(); } } }