【机器视觉】 dev_set_part算子
00. 目录
文章目录
- 00. 目录
- 01. 概述
- 02. 签名
- 03. 描述
- 04. 注意
- 05. 参数
- 06. 结果
- 07. 附录
01. 概述
dev_set_part - 修改要显示的图像部分。
02. 签名
dev_set_part( : : Row1, Column1, Row2, Column2 : )
03. 描述
dev_set_part用于设置图形窗口中要显示的图像部分。 参数Row1和Column1指定左上角,Row2和Column2指定要显示的图像部分的右下角。
有关更多信息,请参阅算子set_part的说明。 另外,如果Row1比Row2大或Column1比Column2大,那么特定尺寸缩放将被重置,以显示图像的完整高度(和/或)宽度。 请注意,对于在HDevelop环境以外的此算子和算子set_part,此功能无效。
另外,请注意,如果加载新程序,程序复位或显示图像尺寸大小不同的新图像,则会自动复位显示部分。
原文描述:
dev_set_part is used to set the part of the image that is displayed in the graphics window. The parameters Row1 and Column1 specify the upper left corner, Row2 and Column2 the lower right corner of the image part to display.
For more information see the description of the operator set_part. In addition, if Row1 is larger than Row2 or Column1 larger than Column2, the zooming in the particular dimension will be reset to show the complete height and/or width of the image. Please note that this is not possible with the operator set_part outside HDevelop.
In addition, note that the part is automatically reset, if a new program is loaded, a program reset is performed, or a new image with a different image size is displayed.
04. 注意
使用HDevelop的代码导出功能,为该算子生成的代码可能与相关的HALCON算子具有不同的行为。 有关将HDevelop图形算子导出为不同编程语言的代码的详细说明,请参阅“HDevelop User’s Guide”中的 Code Export -> General Aspects of Code Generation -> Graphics Windows一章。
05. 参数
Row1 (input_control) rectangle.origin.y → (integer)
Row of the upper left corner of the chosen image part.
Default value: 0
Column1 (input_control) rectangle.origin.x → (integer)
Column of the upper left corner of the chosen image part.
Default value: 0*
Row2 (input_control) rectangle.corner.y → (integer)
Row of the lower right corner of the chosen image part.
Default value: 128*
Column2 (input_control) rectangle.corner.x → (integer)
Column of the lower right corner of the chosen image part.
Default value: 128*
HDevelop例程
roads.hdev Extract roads from aerial image
rim.hdev Inspect holes and characters on a rim
pm_measure_board.hdev Locate IC on a board and measure pin distances
measure_screw.hdev Measure several features of a screw
fit_ellipse_tooth_rim_xld.hdev Approximate the contour of a tooth rim with an ellipse to find its center
fill_interlace.hdev Interpolate video half images
edges_color_sub_pix.hdev Extract edges with sub-pixel precision using color information
edges_color.hdev Extract edges using color information
display_operators.hdev Visualize results
dev_set_part.hdev Set the part of an image to be displayed (zoomed) in a graphics window in HDevelop
dev_open_window.hdev Open graphics windows in HDevelop
critical_points_sub_pix.hdev Detect critical points with subpixel accuracy
clip_contours_xld.hdev Clip an XLD contour
程序示例
read_image (Image, 'fabrik')
for i := 1 to 240 by 10dev_set_part (i, i, 511-i, 511-i)dev_display (Image)
endfor
dev_set_part (1, 1, -1, -1)
dev_display (Image)
06. 结果
如果指定参数的值正确,则dev_set_paint返回2(H_MSG_TRUE)。 否则会引发异常并返回错误代码。
07. 附录
7.1 机器视觉博客汇总
网址:https://dengjin.blog.csdn.net/article/details/116837497
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
