Halcon算子翻译——dev_set_line_width

名称

dev_set_line_width - 定义region,contour输出的线宽。

用法

dev_set_line_width( : : LineWidth : )

描述

  dev_set_line_width定义用于显示region轮廓('margin'模式),XLD和其他几何输出(例如,disp_region,disp_line等)的线宽(以像素为单位)。

  有关更多信息,请参阅算子set_line_width的说明。 但是,与算子set_line_width相反,此算子设置的新的线宽也用于之后打开的所有新图形窗口。

注意

  使用HDevelop的代码导出功能,为该算子生成的代码可能与相关的HALCON算子具有不同的行为。 有关将HDevelop图形算子导出为不同编程语言的代码的详细说明,请参阅“HDevelop User's Guide”中的 Code Export -> General Aspects of Code Generation -> Graphics Windows一章。

参数

LineWidth (input_control) integer → (integer)
  Line width for region output in contour mode.
  Default value: 1
  Restriction: LineWidth >= 1

示例(HDevelop)

read_image(Image,'monkey')
threshold(Image,Region,128,255)
dev_set_draw('margin')
dev_set_line_width(5)
dev_clear_window ()
dev_display(Region)

 

结果

如果指定参数的值正确,则dev_set_line_width返回2(H_MSG_TRUE)。 否则会引发异常并返回错误代码。

Possible Successors

dev_display

See also

set_line_width, query_line_width

模块

Foundation

HDevelop例程

roads.hdev        Extract roads from aerial image
pm_illu.hdev           Apply online pattern matching using a gray-value template that adapts to illumination changes
display_operators.hdev    Visualize results
clip.hdev         Determine the position and orientation of clips

posted @ 2017-11-16 10:41  水行  阅读(1626)  评论(0编辑  收藏  举报