【机器视觉】 dev_set_window_extents算子
00. 目錄
文章目錄
- 00. 目錄
- 01. 概述
- 02. 簽名
- 03. 描述
- 04. 注意
- 05. 參數(shù)
- 06. 結(jié)果
- 07. 附錄
01. 概述
dev_set_window_extents - 更改活動圖形窗口的位置和大小。
02. 簽名
dev_set_window_extents( : : Row, Column, Width, Height : )
03. 描述
dev_set_window_extents更改當(dāng)前活動圖形窗口的位置和/或大小。
參數(shù)Row和Column指定窗口的新位置(左上角)。 根據(jù)HDevelop的窗口模式,坐標(biāo)(0,0)分別指的是在MDI模式的主HDevelop窗口中的窗口區(qū)域的左上角,以及在SDI模式下的屏幕的左上角。 該位置的負(fù)坐標(biāo)被忽略,即在相應(yīng)的方向上窗口不會被移動。
參數(shù)Width和Height指定窗口的新大小。 這是實際顯示圖形對象的內(nèi)部部分的大小。 如果其中一個值是負(fù)數(shù),那么相應(yīng)的尺寸將保持不變。
原文描述:
dev_set_window_extents changes the position and/or the size of the currently active graphics window.
The parameters Row and Column specify the new position (upper left corner) of the window. Depending on the window mode of HDevelop, the coordinates (0,0) refer to the upper left corner of the window area in the main HDevelop window in MDI mode, and the upper left corner of the screen in SDI mode, respectively. Negative coordinates of the position are ignored, i.e., in this direction the window will not be moved.
The parameters Width and Height specify the new size of the window. This is the size of the inner part that actually displays the iconic objects. If one of the two values is negative, this dimension will remain unchanged.
04. 注意
切勿使用set_window_extents更改HDevelop圖形窗口的大小和位置。 必須使用算子dev_set_window_extents。
使用HDevelop的代碼導(dǎo)出功能,為該算子生成的代碼可能與相關(guān)的HALCON算子具有不同的行為。 有關(guān)將HDevelop圖形算子導(dǎo)出為不同編程語言的代碼的詳細(xì)說明,請參閱“HDevelop User’s Guide”中的 Code Export -> General Aspects of Code Generation -> Graphics Windows一章。
05. 參數(shù)
Row (input_control) rectangle.origin.y → (integer)
Row index of upper left corner.
Default value: 0
Typical range of values: 0 ≤ Row
Minimum increment: 1
Recommended increment: 1
Restriction: (Row >= 0) || (Row == -1)
Column (input_control) rectangle.origin.x → (integer)
Column index of upper left corner.
Default value: 0
Typical range of values: 0 ≤ Column
Minimum increment: 1
Recommended increment: 1
Restriction: (Column >= 0) || (Column == -1)
Width (input_control) rectangle.extent.x → (integer)
Width of the window.
Default value: 256
Typical range of values: 0 ≤ Width
Minimum increment: 1
Recommended increment: 1
Restriction: (Width > 0) || (Width == -1)
Height (input_control) rectangle.extent.y → (integer)
Height of the window.
Default value: 256
Typical range of values: 0 ≤ Height
Minimum increment: 1
Recommended increment: 1
Restriction: (Height > 0) || (Height == -1)
HDevelop例程
vector_to_proj_hom_mat2d.hdev Rectify image of stadium to simulate overhead view
gen_projective_mosaic.hdev Combine several images of a PCB into a large mosaic image
dev_set_window_extents.hdev Set size and position of a graphics window in HDevelop
dev_set_part.hdev Set the part of an image to be displayed (zoomed) in a graphics window in HDevelop
circular_barcode.hdev Read a circular bar code printed on a CD
cbm_caliper.hdev Measure the setting of a caliper using component-based matching in a perspectively distorted image
barcode_orientation.hdev Use the bar code parameter ‘orientation’
程序示例
dev_close_window () read_image (For5, 'for5') get_image_size (For5, Width, Height) dev_open_window (0, 0, Width, Height, 'black', WindowHandle) dev_display (For5) stop () dev_set_window_extents (-1,-1,Width/2,Height/2) dev_display (For5) stop () dev_set_window_extents (200,200,-1,-1)06. 結(jié)果
如果指定參數(shù)的值正確,則dev_set_window_extents返回2(H_MSG_TRUE)。 否則會引發(fā)異常并返回錯誤代碼。
07. 附錄
7.1 機器視覺博客匯總
網(wǎng)址:https://dengjin.blog.csdn.net/article/details/116837497
總結(jié)
以上是生活随笔為你收集整理的【机器视觉】 dev_set_window_extents算子的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【机器视觉】 dev_set_tool_
- 下一篇: 【机器视觉】 dev_update_wi