【机器视觉】 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
總結
以上是生活随笔為你收集整理的【机器视觉】 dev_set_part算子的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【机器视觉】 dev_set_paint
- 下一篇: 【机器视觉】 dev_set_prefe