資源簡介
halcon實例,其中包括源碼及圖片,對于入門者是個好的參考。
代碼片段和文件信息
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;
//?添加halcon引用
using?HalconDotNet;
namespace?halconForm
{
????public?partial?class?Form1?:?Form
????{
????????//增加代碼:
?????????HDevelopExport?HD?=?new?HDevelopExport();
?????????string?ImagePath;
????????Hobject?ho_Image?ho_GrayImage;
????????public?Form1()
????????{
????????????InitializeComponent();
????????????this.btnImagePro.Enabled?=?false;
????????}
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????}
????????private?void?autozise(HalconDotNet.Hobject?image?int?width??int?height)
????????{
????????????if?(width?>?0?&&?height?>?0)
????????????{
????????????????hWindowControl1.HalconWindow.ClearWindow();
????????????????hWindowControl1.HalconWindow.SetPart(0?0?height?-?1?width?-?1);
????????????????hWindowControl1.HalconWindow.DispObj(image);
????????????}
????????????else
????????????{
????????????????MessageBox.Show(“The?width?of?ImagePart?is?<=?0?or?The?height?of?ImagePart?is?<=?0“);
????????????}
????????}
????????private?void?btnReadImage_Click(object?sender?EventArgs?e)
????????{
????????????HTuple?width?height;
????????????OpenFileDialog?openFileDialog1?=?new?OpenFileDialog();
????????????openFileDialog1.Filter?=?“圖片文件(*.jpg*.bmp*.tif)|*.jpg;*.bmp;*.tif“;
????????????openFileDialog1.RestoreDirectory?=?true;
????????????openFileDialog1.FilterIndex?=?1;
????????????if?(openFileDialog1.ShowDialog()?==?DialogResult.OK)
????????????{
????????????????ImagePath?=?openFileDialog1.FileName;
????????????????HD.ReadImage(out?ho_Image?hWindowControl1.HalconWindow?ImagePath);
????????????????
????????????????HOperatorSet.GetImageSize(ho_Image?out?width?out?height);
????????????????autozise(ho_Image?width?height);
????????????????this.btnImagePro.Enabled?=?true;
????????????}
????????}
????????private?void?hWindowControl1_HMouseDown(object?sender?HMouseEventArgs?e)
????????{
????????????HTuple?row?column?btn;
????????????HOperatorSet.GetMposition(hWindowControl1.HalconWindow?out?row?out?column?out?btn);
????????????MessageBox.Show(“當前坐標:??Y:“?+?row.ToString()?+?“??X:?“?+?column.ToString());
????????}
????????private?void?LeaveFog_Click(object?sender?EventArgs?e)
????????{
????????????Hobject?ho_Image?ho_IxImage?ho_R?ho_G?ho_B;
????????????Hobject?ho_ImageMin?ho_ImageMin1?ho_DarkChannelImage;
????????????Hobject?ho_Region?ho_ImageScaled?ho_R1?ho_G1?ho_B1;
????????????Hobject?ho_ImageMin2?ho_ImageMin3?ho_ImageMin4?ho_txImage;
????????????Hobject?ho_Region1?ho_ImageScaled1?ho_R2?ho_G2?ho_B2;
????????????Hobject?ho_ImageResultR?ho_ImageResultG?ho_ImageResultB;
????????????Hobject?ho_JxImage;
????????????HTuple?hv_Width?=?null?hv_Height?=?null?hv_WindowHandle?=?new?HTuple();
??????????
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-02-09?11:25??halcon學習實例\
?????目錄???????????0??2017-12-28?08:17??halcon學習實例\FireDetection_bin\
?????文件?????1989632??2014-06-20?10:02??halcon學習實例\FireDetection_bin\FireDetection.exe
?????文件?????2099200??2014-04-15?16:57??halcon學習實例\FireDetection_bin\opencv_core249.dll
?????文件?????2080768??2014-04-15?16:58??halcon學習實例\FireDetection_bin\opencv_highgui249.dll
?????文件?????1914368??2014-04-15?16:58??halcon學習實例\FireDetection_bin\opencv_imgproc249.dll
?????目錄???????????0??2017-12-28?08:17??halcon學習實例\FireDetection_bin\測試圖和視頻\
?????文件???????16701??2012-03-02?16:31??halcon學習實例\FireDetection_bin\測試圖和視頻\1.jpg
?????文件???????16349??2012-03-05?18:31??halcon學習實例\FireDetection_bin\測試圖和視頻\10.jpg
?????文件??????498655??2014-05-19?22:32??halcon學習實例\FireDetection_bin\測試圖和視頻\11.jpg
?????文件???????43152??2012-03-01?21:52??halcon學習實例\FireDetection_bin\測試圖和視頻\2.jpg
?????文件??????131989??2014-05-17?21:24??halcon學習實例\FireDetection_bin\測試圖和視頻\3.jpg
?????文件???????45202??2012-03-01?21:52??halcon學習實例\FireDetection_bin\測試圖和視頻\4.jpg
?????文件???????34891??2012-03-02?16:30??halcon學習實例\FireDetection_bin\測試圖和視頻\5.jpg
?????文件???????27843??2012-02-22?14:34??halcon學習實例\FireDetection_bin\測試圖和視頻\6.jpg
?????文件???????36486??2012-03-01?21:51??halcon學習實例\FireDetection_bin\測試圖和視頻\7.jpg
?????文件???????17449??2012-03-02?16:30??halcon學習實例\FireDetection_bin\測試圖和視頻\8.jpg
?????文件??????157547??2012-03-02?16:30??halcon學習實例\FireDetection_bin\測試圖和視頻\9.jpg
?????文件??????781713??2014-06-13?22:28??halcon學習實例\FireDetection_bin\測試圖和視頻\IMG_0212.mp4
?????文件?????1313842??2014-06-14?23:03??halcon學習實例\FireDetection_bin\測試圖和視頻\IMG_0213.mp4
?????文件?????1496103??2014-06-13?22:34??halcon學習實例\FireDetection_bin\測試圖和視頻\IMG_0214.mp4
?????文件??????438961??2012-03-05?18:42??halcon學習實例\FireDetection_bin\測試圖和視頻\n0.jpg
?????文件???????10557??2014-06-13?09:38??halcon學習實例\FireDetection_bin\測試圖和視頻\n1.jpeg
?????文件???????96421??2014-06-14?23:16??halcon學習實例\FireDetection_bin\測試圖和視頻\n1.jpg
?????文件???????49789??2014-06-13?09:38??halcon學習實例\FireDetection_bin\測試圖和視頻\n2.jpg
?????文件????????6459??2014-06-13?09:39??halcon學習實例\FireDetection_bin\測試圖和視頻\n3.jpg
?????文件??????216207??2014-06-14?13:03??halcon學習實例\FireDetection_bin\測試圖和視頻\n5.jpg
?????文件??????188462??2014-06-14?13:03??halcon學習實例\FireDetection_bin\測試圖和視頻\n6.jpg
?????文件???????43329??2014-06-14?23:18??halcon學習實例\FireDetection_bin\測試圖和視頻\n7.jpg
?????目錄???????????0??2017-09-26?16:23??halcon學習實例\HalconPaint\
?????目錄???????????0??2017-09-26?16:23??halcon學習實例\HalconPaint\.vs\
............此處省略389個文件信息
- 上一篇:圖形圖像編程精粹1-5
- 下一篇:Apache-jmeter-3.1壓縮包
評論
共有 條評論