工业视觉halcon图形parameters函数详细介绍
HALCON的图形窗口是极为常用的一个窗口,
在上面我们可以显示图像,显示区域,显示代码每一步的执行效果等等。
Halcon中提供众多函数针对此窗口的个性化设置。
比如设置线宽,设置显示颜色类型颜色种类,区域显示形状等等。
这节课我们也一样在halcon当前运行这此函数,查看函数效果与功能。
这些函数为以下这些
set_draw get_draw set_shape get_shape query_shape set_icon
get_icon set_insert get_insert query_insert set_line_width
get_line_width query_line_width set_line_style
get_line_style set_paint
get_paint query_paint set_part get_part set_part_style get_part_style
set_window_param get_window_para set_colored query_colored
set_color query_color query_all_colors
set_rgb get_rgb get_rgba set_rgba set_hsi
get_hsi set_gray query_gray color_string_to_rgb
convert_coordinates_window_to_image
convert_coordinates_image_to_window
实例:
dev_close_window ()
dev_open_window (0, 0, 512, 512, 'black', WindowHandle)
read_image (Image,'fabrik')
dev_display (Image)
threshold (Image, Region, 180, 255)
connection (Region, ConnectedRegions)
select_shape (ConnectedRegions, SelectedRegions, 'area', 'and', 150, 99999)
get_draw (WindowHandle, Mode)
*set_draw (WindowHandle, 'fill')
dev_set_draw ('fill')
dev_display (SelectedRegions)
draw_region (Region, WindowHandle)
set_icon (Region, WindowHandle)
get_icon (Icon, WindowHandle)
dev_set_shape ('icon')
dev_display (SelectedRegions)
get_shape (WindowHandle, DisplayShape)
query_shape (DisplayShape1)
read_image (Image,'fabrik')
query_insert (WindowHandle, Mode2)
set_insert (WindowHandle, 'copy')
dev_display (SelectedRegions)
get_insert (WindowHandle, Mode1)
dev_set_shape ('original')
dev_set_line_width (1)
dev_set_draw ('margin')
get_line_width (WindowHandle, Width)
gen_rectangle1 (Rectangle, 30, 20, 100, 200)
query_line_width (Min, Max)
set_line_style (WindowHandle, [10,10])
dev_display (Rectangle)
get_line_style (WindowHandle, Style)
dev_set_paint ('default')
dev_display (Image)
get_paint (WindowHandle, Mode3)
query_paint (WindowHandle, Mode4)
get_part_style (WindowHandle, Style1)
set_part_style (WindowHandle, 0)
dev_set_part (180, 280, 300, 350)
dev_display (Image)
get_part (WindowHandle, Row1, Column1, Row2, Column2)
get_window_param (WindowHandle, 'window_title', para)
set_window_param (WindowHandle, 'background_color', 'white')
dev_clear_window ()
get_image_size (Image, Width1, Height)
dev_set_part (0, 0, Height, Width1)
dev_set_draw ('fill')
set_window_param (WindowHandle, 'background_color', 'black')
set_line_style (WindowHandle, [])
dev_set_colored (3)
threshold (Image, Region, 135, 255)
connection (Region, ConnectedRegions)
query_colored (PossibleNumberOfColors)
query_color (WindowHandle, Colors)
dev_set_color ('red')
dev_display (ConnectedRegions)
query_all_colors (WindowHandle, Colors1)
set_rgb (WindowHandle, 180, 180, 180)
dev_set_colored (3)
get_rgb (WindowHandle, Red, Green, Blue)
dev_display (ConnectedRegions)
dev_set_color ('red')
get_hsi (WindowHandle, Hue, Saturation, Intensity)
*set_hsi (
dev_clear_window ()
set_gray(WindowHandle,[50,100,200])
disp_circle(WindowHandle,[100,200,300],[200,300,100],[100,100,100])
*query_gray (WindowHandle, Grayval)
*set_rgba
get_rgba (WindowHandle, Red1, Green1, Blue1, Alpha)
color_string_to_rgb ('green', RGB)
dev_display (Image)
convert_coordinates_window_to_image (WindowHandle, 0, 0, RowImage, ColumnImage)
convert_coordinates_image_to_window (WindowHandle, 0, 0, RowWindow, ColumnWindow)
帖子为视频教程部分内容,
可以下载教程观看学习。
上位机VC MFC程序开发精典实例大全源码与视频讲解配套下载408例 经历1年的编程与录制点击进入查看
如果您认可,可联系功能定制! 如果您着急,充值会员可直接联系发您资料!
|