Form1.cs 781 B

12345678910111213141516171819202122232425262728293031
  1. using HalconDotNet;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.Data;
  6. using System.Drawing;
  7. using System.Linq;
  8. using System.Text;
  9. using System.Threading.Tasks;
  10. using System.Windows.Forms;
  11. namespace Test1
  12. {
  13. public partial class Form1 : Form
  14. {
  15. public Form1()
  16. {
  17. InitializeComponent();
  18. }
  19. private void button1_Click(object sender, EventArgs e)
  20. {
  21. HObject ho_Image;
  22. // Initialize local and output iconic variables
  23. HOperatorSet.GenEmptyObj(out ho_Image);
  24. ho_Image.Dispose();
  25. HOperatorSet.ReadImage(out ho_Image, "D:/Halcon/演示图片/Image_20231102133100714.bmp");
  26. ho_Image.Dispose();
  27. }
  28. }
  29. }