Form1.cs 918 B

123456789101112131415161718192021222324252627282930313233343536
  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. /// <summary>
  20. ///
  21. /// </summary>
  22. /// <param name="sender"></param>
  23. /// <param name="e"></param>
  24. private void button1_Click(object sender, EventArgs e)
  25. {
  26. HObject ho_Image;
  27. // Initialize local and output iconic variables
  28. HOperatorSet.GenEmptyObj(out ho_Image);
  29. ho_Image.Dispose();
  30. HOperatorSet.ReadImage(out ho_Image, "D:/Halcon/演示图片/Image_20231102133100714.bmp");
  31. ho_Image.Dispose();
  32. }
  33. }
  34. }