【机器视觉】 dev_set_draw算子
00. 目錄
文章目錄
- 00. 目錄
- 01. 概述
- 02. 簽名
- 03. 描述
- 04. 注意
- 05. 參數
- 06. 結果
- 07. 附錄
01. 概述
dev_set_draw - 定義region填充模式。
02. 簽名
dev_set_draw( : : DrawMode : )
03. 描述
dev_set_draw定義region的填充模式。 如果DrawMode設置為’fill’,region顯示為填充,如果設置為’margin’,則只顯示輪廓。 在’margin’模式下,輪廓的外觀會受到dev_set_line_width,set_line_approx和set_line_style的影響。
有關更多信息,請參閱算子set_draw的說明。 但是,與算子set_draw相反,該算子填充模式也用于之后打開的所有新圖形窗口。
原文描述:
dev_set_draw defines the fill mode for regions. If DrawMode is set to ‘fill’, regions are displayed filled, if set to ‘margin’, only contours are displayed. In the ‘margin’ mode, the appearance of the contours can be affected by dev_set_line_width and set_line_style.
For more information see the description of the operator set_draw. However, in contrast to that operator the draw mode is also used for all new graphics windows that are opened afterwards.
04. 注意
使用HDevelop的代碼導出功能,為該算子生成的代碼可能與相關的HALCON算子具有不同的行為。 有關將HDevelop圖形算子導出為不同編程語言的代碼的詳細說明,請參閱“HDevelop User’s Guide”中的 Code Export -> General Aspects of Code Generation -> Graphics Windows一章。
05. 參數
DrawMode (input_control) string → (string)
Fill mode for region output.
Default value: ‘fill’
List of values: ‘fill’, ‘margin’
HDevelop例程
display_operators.hdev Visualize results
dev_display.hdev Display image objects in graphics windows in HDevelop
clip.hdev Determine the position and orientation of clips
程序示例
read_image(Image,'monkey') threshold(Image,Region,128,255) dev_clear_window () dev_set_color('red') dev_set_draw('fill') dev_display(Region) dev_set_color('white') dev_set_draw('margin') dev_display(Region)06. 結果
如果指定參數的值正確,則dev_set_draw返回2(H_MSG_TRUE)。 否則會引發異常并返回錯誤代碼。
07. 附錄
7.1 機器視覺博客匯總
網址:https://dengjin.blog.csdn.net/article/details/116837497
總結
以上是生活随笔為你收集整理的【机器视觉】 dev_set_draw算子的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【机器视觉】 dev_set_conto
- 下一篇: 【机器视觉】 dev_set_line_