halcon算子翻译——dev_set_part

名称

dev_set_part - 修改要显示的图像部分。

用法

dev_set_part( : : Row1, Column1, Row2, Column2 : )

描述

  dev_set_part用于设置图形窗口中要显示的图像部分。 参数Row1和Column1指定左上角,Row2和Column2指定要显示的图像部分的右下角。

  有关更多信息,请参阅算子set_part的说明。 另外,如果Row1比Row2大或Column1比Column2大,那么特定尺寸缩放将被重置,以显示图像的完整高度(和/或)宽度。 请注意,对于在HDevelop环境以外的此算子和算子set_part,此功能无效。

  另外,请注意,如果加载新程序,程序复位或显示图像尺寸大小不同的新图像,则会自动复位显示部分。

注意

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

参数

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)

read_image (Image, 'fabrik')
for i := 1 to 240 by 10
  dev_set_part (i, i, 511-i, 511-i)
  dev_display (Image)
endfor
dev_set_part (1, 1, -1, -1)
dev_display (Image)

结果

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

Possible Successors

dev_display

See also

set_part

模块

Foundation

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

转载于:https://www.cnblogs.com/xhiong/p/dev_set_part.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值