【机器视觉】 dev_set_color算子
00. 目錄
文章目錄
- 00. 目錄
- 01. 概述
- 02. 簽名
- 03. 描述
- 04. 注意
- 05. 參數
- 06. 結果
- 07. 附錄
01. 概述
dev_set_color - 設置一個或多個(窗口)輸出顏色。
02. 簽名
dev_set_color( : : ColorName : )
03. 描述
dev_set_color定義用于在圖形窗口中顯示region,XLD和其他geometrical對象的顏色。 可用的顏色可以通過算子query_color查詢。 另外,ColorName可以被指定為’#rrggbb’形式的RGB三元組,其中’rr’,'gg’和’bb’分別是’00’和’ff’之間的十六進制數字。
有關更多信息,請參閱算子set_color的說明。 但是,與算子set_color相反,此算子顏色設置也用于之后打開的所有新圖形窗口。
這些顏色設置一直保持有效,直到調用dev_set_color或dev_set_colored,或直到交互式修改顏色設置。
原文描述:
dev_set_color defines the color(s) that are used to display regions, XLDs, and other geometrical objects in the graphics windows. The available colors can be queried with the operator query_color. In addition, the ColorName may be specified as hexadecimal RGB triplet or RGBA quadruplet in the form ‘#rrggbb’ and ‘#rrggbbaa’. ‘rr’, ‘gg’, ‘bb’, and ‘aa’ are hexadecimal numbers between ‘00’ and ‘ff’, respectively. ‘aa’ denotes the alpha value of a color and can be used to display transparent regions.
For more information see the description of the operator set_color. However, in contrast to that operator the color setting is also used for all new graphics windows that are opened afterwards.
These color settings remain valid until dev_set_color or dev_set_colored is called or until the color settings are modified interactively.
04. 注意
使用HDevelop的代碼導出功能,為該算子生成的代碼可能與相關的HALCON算子具有不同的行為。 有關將HDevelop圖形算子導出為不同編程語言的代碼的詳細說明,請參閱“HDevelop User’s Guide”中的 Code Export -> General Aspects of Code Generation -> Graphics Windows一章。
05. 參數
ColorName (input_control) string(-array) → (string)
Output color names.
Default value: ‘white’
Suggested values: ‘white’, ‘black’, ‘gray’, ‘red’, ‘green’, ‘blue’, ‘#003075’, ‘#e53019’, ‘#ffb529’
HDevelop例程
label_word_process_mlp.hdev Read a best-before label using a MLP-based OCR classifier and a lexicon to improve results
display_operators.hdev Visualize results
close_contour_gaps.hdev Close gaps in extracted straight contours
clip.hdev Determine the position and orientation of clips
advanced_visualization_settings.hdev Improve the visualization with transparency, anti-aliasing, and more
程序示例
read_image(Image,'mreut') dev_set_draw('fill') dev_set_color('red') threshold(Image,Region,180,255) dev_set_color('green') threshold(Image,Region,0,179)06. 結果
如果指定參數的值正確,則dev_set_color返回2(H_MSG_TRUE)。 否則會引發異常并返回錯誤代碼。
07. 附錄
7.1 機器視覺博客匯總
網址:https://dengjin.blog.csdn.net/article/details/116837497
總結
以上是生活随笔為你收集整理的【机器视觉】 dev_set_color算子的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【机器视觉】 dev_open_wind
- 下一篇: 【机器视觉】 dev_set_color