Halcon程式匯出執行的方法

2021-08-21 04:14:27 字數 699 閱讀 3234

1 在halcon中開啟程式,如clip.hdev;

2 檔案->匯出 設定使用匯出模板,使用utf-8編碼;

3 匯出cs檔案

4 新建winform程式

5 在工具欄中點右鍵->選擇專案->瀏覽 選擇c:\program files\mvtec\halcon-12.0\bin\dotnet35 下的halcondotnet.dll,

6 拖動hwindowcontrol到窗體上

7 引用halcondotnet.dll

8 拷貝cs檔案到專案中

9 增加乙個按鈕,單擊事件如下:

private void button1_click(object sender, eventargs e)

{hdevelopexport hd = new hdevelopexport();

hd.runhalcon(hwindowcontrol1.halconwindow);

10 執行程式即可

注意:設定專案屬性,target framework:.net framework 3.5,跟halcondotnet.dll用的框架一致;

此時,using system.threading.tasks;會報錯,因為其用的4.5版本框架,直接刪除即可

Halcon離線執行方法

我看到其它文章說要建立c program files mvtec halcon help目錄,然後把halcon的help檔案賦值到這裡,經過我自己驗證是不需要的。我的步驟 1.halcon.dll 和諧的檔案 halconc.dll halconcpp.dll halcondotnet.dll h...

python 匯出程式的執行環境

任何應用程式通常需要設定安裝所需並依賴一組類庫來滿足工作要求。要求檔案是指定和一次性安裝包的依賴項具體一整套方法。python專案依賴,生成requirements.txt 有兩種方法 1 進入需要生成檔案的目錄,執行 pip freeze requirements.txt此方法會包含環境所有的依賴...

找出執行效率低下的sql語句

select executions,disk reads,buffer gets,round buffer gets disk reads buffer gets,2 hit radio,round disk reads executions,2 reads per run,sql text fro...