【机器视觉】 dev_open_tool算子
00. 目錄
文章目錄
- 00. 目錄
- 01. 概述
- 02. 簽名
- 03. 描述
- 04. 注意
- 05. 參數
- 06. 結果
- 07. 附錄
01. 概述
dev_open_tool - 打開HDevelop工具,非模態對話框或助手。
02. 簽名
dev_open_tool( : : ToolName, Row, Column, Width, Height, GenParamName, GenParamValue : ToolId)
03. 描述
dev_open_tool打開一個HDevelop工具,一個非模態對話框或者助手。 參數ToolName含有要打開的工具的名稱。 這個算子返回剛創建的工具的ToolId,這個ToolId可以使用像dev_set_tool_geometry,dev_show_tool,dev_close_tool這樣的算子用于尋址一個特定的工具。 打開的工具會自動激活。
對于ToolName為’halcon_news’,返回一個空的ToolId,因為這只是查看新聞網頁頁面。
通過GenParamNames和GenParamValues,可以指定顯示哪個頁面和更多功能,功能見下文。 GenParamNames和GenParamValues是可選的。 如果它們設置為[],則工具將以默認設置打開。
此算子可以支持以下工具:
| ‘graphics_window’ | 圖形窗口 |
| ‘operator_window’ | 算子窗口 |
| ‘program_listing’ | 程序列表 |
| ‘variable_view’ | 變量窗口 |
| ‘calibration_assistant’ | 相機標定助手 |
| ‘image_acquisition_assistant’ | 圖像采集助手 |
| ‘matching_assistant’ | 匹配助手 |
| ‘measure1d_assistant’ | 一維測量助手 |
| ‘ocr_assistant’ | OCR助手 |
| ‘call_stack’ | 調用堆棧 |
| ‘feature_histogram’ | 特征直方圖 |
| ‘feature_inspection’ | 特征檢測 |
| ‘gray_histogram’ | 灰度直方圖 |
| ‘line_profile’ | 輪廓線 |
| ‘zoom_window’ | 縮放窗口 |
| ‘ocr_training_file_browser’ | OCR訓練文件瀏覽器 |
| ‘browse_examples_dialog’ | 瀏覽示例對話框 |
| ‘create_procedure_dialog’ | 創建程序對話框 |
| ‘edit_procedure_interface_dialog’ | 編輯程序接口對話框 |
| ‘find_replace_dialog’ | 查找替換對話框 |
| ‘output_console’ | 輸出控制臺 |
| ‘program_line_view’ | 程序行視圖 |
| ‘breakpoints_dialog’ | 程序行視圖/斷點 |
| ‘bookmarks_dialog’ | 程序行視圖/書簽 |
| ‘invalid_lines_dialog’ | 程序行視圖/無效行 |
| ‘visualization_parameters_dialog’ | 可視化參數對話框 |
| ‘help’ | 幫助瀏覽器 |
| ‘preferences’ | 參數對話框 |
| ‘halcon_news’ | HALCON新聞網站 |
以下工具可用GenParamNames和GenParamValues來設置更多細節:
’calibration_assistant’ - 相機標定助手:
‘page’:
要顯示的頁面。
| ‘setup’ | 安裝 |
| ‘calibration’ | 標定 |
| ‘results’ | 結果 |
| ‘code_generation’ | 代碼生成 |
例如:dev_open_tool(‘calibration_assistant’,…,‘page’,‘results’,…)打開標定助手并顯示結果標簽卡。
’image_acquisition_assistant’ - 圖像采集助手:
‘page’:
要顯示的頁面。
| ‘source’ | 資源 |
| ‘connection’ | 連接 |
| ‘parameters’ | 參數 |
| ‘code_generation’ | 代碼生成 |
例如:dev_open_tool(‘image_acquisition’,…,‘page’,‘source’,…)打開圖像采集助手并顯示資源頁面。
’matching_assistant’ - 匹配助手:
‘page’:
要顯示的頁面。
| ‘model_creation’ | 創建 |
| ‘model_parameter’ | 參數 |
| ‘model_use’ | 應用 |
| ‘inspect’ | 檢測 |
| ‘code_generation’ | 代碼生成 |
例如:dev_open_tool(‘matching_assistant’,…,‘page’,‘inspect’,…)打開匹配助手并顯示”檢測"標簽卡。
’measure1d_assistant’ - 測量助手:
‘page’:
要顯示的頁面。
| ‘input’ | 輸入 |
| ‘edges’ | 邊緣 |
| ‘fuzzy’ | 模糊 |
| ‘results’ | 結果 |
| ‘code_generation’ | 代碼生成 |
例如:dev_open_tool(‘measure1d_assistant’,…,‘page’,‘edges’,…)打開測量助手并顯示“邊緣”標簽卡。
’program_line_view’: - 程序行視圖對話框
“page”:
要顯示的頁面。
| ‘invalid_lines’ | 無效行 |
| ‘find_all’ | 查找所有 |
| ‘breakpoints’ | 斷點 |
| ‘bookmarks’ | 書簽 |
例如:dev_open_tool(‘program_line_view’,…,‘page’,‘breakpoints’,…)打開程序行視圖對話框,并顯示“斷點”標簽卡。
’help’ - 幫助瀏覽器:
GenParamNames的可能條目是’page’,‘operator’,‘manual’。
“page”:
要顯示的頁面。
| ‘contents’ | 目錄 |
| ‘operator’ | 算子 |
| ‘search’ | 搜索 |
| ‘index’ | Index |
| ‘bookmarks’ | 書簽 |
例如:dev_open_tool(‘help’,…,‘page’,‘search’,…)打開幫助工具并選擇“搜索”標簽卡。
“operator”:
要顯示哪個算子的html界面。
例如:dev_open_tool(‘help’,…,’[‘page’,‘operator’],[‘search’,‘read_image’] …)打開幫助工具,選擇搜索標簽卡并顯示算子read_image的介紹。
“manual”:
手動顯示哪個html界面。
’preferences’ - 首選項對話框:
“page”:
其中要顯示的頁面是兩個值的組合。 一個組的選擇和該組中的選項卡。 這兩個值必須用“/”分隔。如下面的例子。
例如:dev_open_tool(‘preferences’,…,‘page’,‘user_interface / language’,…)顯示來自組“user_interface”的頁面“language”。
可能的組是:
| ‘user_interface’ | 用戶接口 |
| ‘procedures’ | 函數 |
| ‘general_options’ | 一般屬性 |
| ‘visualization_settings’ | 可視化設置 |
| ‘runtime_settings’ | 運行時設置 |
‘user_interface’:
要顯示的組。
| ‘user_interface/program_listing’ | 程序列表 |
| ‘user_interface/fonts’ | 字體 |
| ‘user_interface/language’ | 語言 |
| ‘user_interface/layout’ | 布局 |
‘procedure’:
要顯示的組
| ‘procedures/directories’ | 目錄 |
| ‘procedures/external_procedures’ | 外部函數 |
| ‘procedures/manage_procedure_libraries’ | 管理函數庫 |
| ‘procedures/manage_passwords’ | 管理密碼 |
| ‘procedures/procedure_use’ | 函數使用 |
| ‘procedures/unresolved_procedure_calls’ | 未實現的函數調用 |
‘general_options’:
要顯示的組。
| ‘general_options/general_options’ | 一般選項 |
| ‘general_options/experienced_user’ | 高級用戶 |
‘visualization_settings’:
要顯示的組。
| ‘visualization_settings/pen’ | 畫筆 |
| ‘visualization_settings/lut’ | 查找表 |
| ‘visualization_settings/paint’ | 顯示 |
‘runtime_settings’:
要顯示的組。
| ‘runtime_settings/runtime_settings’ | 運行設置 |
| ‘runtime_settings/override_operator_behavior’ | 重載算子行為 |
Row和Column參數可用于設置打開工具的位置。 為了提供標準行為,即通常打開工具的最后一個位置,可以設置為“default”。
參數Width和Height用于打開設置特定的尺寸的tool。如果提供標準行為,即通常以最后打開工具的尺寸,可以通過“default”。 如果Width和Height小于tool的最小尺寸,則使用tool的最小尺寸。
通過按窗口框的關閉按鈕或通過調用dev_close_tool來關閉該tool。
原文描述:
dev_open_tool opens a HDevelop tool, a non-modal dialog, or assistant. The parameter ToolName contains the name of the tool which should be opened. This operator returns the ToolId of the newly created tool, which can be used by operators like dev_set_tool_geometry, dev_show_tool, dev_close_tool to address a specific tool. The opened tool automatically becomes active.
For the ToolName.‘halcon_news’ an empty ToolId is returned, because this simply should view the news page.
With GenParamName and GenParamValue it can be specified which page is displayed and more. See below. The use of GenParamName and GenParamValue is optional. If they are set to [] the tool opens with default settings.
The parameters Row and Column can be used to open the tool at a specific position. In order to apply the standard behavior, that is in general opening the tool at the last position, ‘default’ can be passed.
The parameters Width and Height can be used to open the tool with a specific size. In order to apply the standard behavior, that is in general opening the tool with the last size, ‘default’ can be passed. If Width and Height are less than the minimum size of the tool the minimum size is used.
The tool is closed by pressing the Close button of the window frame, or by calling dev_close_tool.
04. 注意
此算子不支持代碼導出
05. 參數
ToolName (input_control) string → (string)
要打開的tool的名稱和tool的其他參數。
Row (input_control) rectangle.origin.y → (integer / string)
工具左上角坐標的行索引。
Default value: ‘default’
Minimum increment: 1
Recommended increment: 1
Column (input_control) rectangle.origin.x → (integer / string)
工具左上角坐標的列索引。
Default value: ‘default’
Minimum increment: 1
Recommended increment: 1
Width (input_control) rectangle.extent.x → (integer / string)
tool的寬度。
Default value: ‘default’
Minimum increment: 1
Recommended increment: 1
Restriction: Width > 0
Height (input_control) rectangle.extent.y → (integer / string)
tool的高度。
Default value: ‘default’
Minimum increment: 1
Recommended increment: 1
Restriction: Height > 0
GenParamNames (input_control) attribute.name(-array) → (string)
通用參數的名稱。
Default value: []
GenParamValues (input_control) attribute.value(-array) → (string)
通用參數的值。
Default value: []
ToolId (output_control) dev_tool → (string)
tool標識符(ID)。
HDevelop例程
tuple_substr.hdev Cut characters out of a string tuple
tuple_select_mask.hdev Select elements of a tuple specified by a mask
tuple_replace.hdev Replace elements of a tuple
tuple_insert.hdev Insert elements into a tuple
tuple_compare_elem.hdev Compare tuples elementwise
dev_open_tool.hdev Open and adjust tools in HDevelop
程序示例
dev_open_tool ('zoom_window',0, 0, Width, Height, [], [], ToolId) dev_close_tool (ToolId)06. 結果
如果指定參數的值正確,則dev_open_tool返回2(H_MSG_TRUE)。 否則會引發異常并返回錯誤代碼。
07. 附錄
7.1 機器視覺博客匯總
網址:https://dengjin.blog.csdn.net/article/details/116837497
總結
以上是生活随笔為你收集整理的【机器视觉】 dev_open_tool算子的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【机器视觉】 dev_open_file
- 下一篇: 【机器视觉】 dev_set_color