draw_rectangle1,这是halcon一个交互函数,当运行到这句话时,我们可以通过鼠标左键在图片上画一个矩形,然后通过鼠标右键结束交互过程。然后,我们就可以得到我们绘制矩形的左上角的点坐标,以及右下角的点坐标。但是这个这个函数,并不会在界面绘制这个矩形。 有了这四个点之后,我们就可以通过gen_rectangle1在去界面上...
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)*在指定窗口手动绘制一个与坐标轴平行的矩形*参数1:窗口句柄*参数2:左上角的行索引*参数3:左上角的列索引*参数4:右下角的行索引*参数5:右下角的列索引*鼠标左键画,右键结束*注意:右键结束后,窗口中不会画出--目的得到参数 gen_rectangle1...
On macOS draw_rectangle1_mod can also be terminated by pressing the escape key. After terminating the procedure the rectangle is not visible in the window any longer.AttentionIf used in a buffer window, mouse events have to be supplied by the application, while the draw operator must be run...
draw_rectangle1 (3600, Row1, Column1, Row2, Column2) gen_rectangle1 (Rectangle, Row1, Column1, Row2, Column2) *选中目标模板 reduce_domain (GrayImage, Rectangle, ImageReduced) threshold (ImageReduced, Regions, 0, 0) connection (Regions, ConnectedRegions) reduce_domain (Image, ConnectedRegi...
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2) *在指定窗口手动绘制一个与坐标轴平行的矩形 *参数1:窗口句柄 *参数2:左上角的行索引 *参数3:左上角的列索引 *参数4:右下角的行索引 *参数5:右下角的列索引 *鼠标左键画,右键结束 ...
draw_rectangle1_mod— Draw a rectangle parallel to the coordinate axis.Signaturedraw_rectangle1_mod( : : WindowHandle, Row1In, Column1In, Row2In, Column2In : Row1, Column1, Row2, Column2)Descriptiondraw_rectangle1_mod returns the parameter for a rectangle parallel to the coordinate axes,...
如图25所示,程序运行后,当鼠标中键按下,开始创建模板。采用draw_rectangle1函数按住鼠标左键设置一个方框,如图25左上图像所示;按鼠标右键确认。用reduce_domain函数将方框中的图像拷贝为模板图像,如图26所示,并用write_image函数保存在硬盘的指定位置。 图25 创建形状匹配模板 ...
dev_close_window () dev_open_window (0, 0, 512, 512, 'black', WindowHandle) read_image (Image1, 'C:/Users/胡晓飞/Desktop/halcon/7-5/1.bmp') rgb1_to_gray (Image1, GrayImage) draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2) gen_rectangle1 (Rectangle, Row1, ...
*draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)*draw_rectangle1_mod (Window...
gen_rectangle1( : Rectangle : Row1, Column1, Row2, Column2 : ) 生成一个平行矩形,左上角,右下角坐标为 Row1, Column1, Row2, Column2 。 例如: dev_open_window (0, 0, 512, 512, 'black', WindowHandle) read_image(Image,'mreut') dev_display (Image) draw_rectangle1(WindowHandle,Row...