draw_rectangle1,这是halcon一个交互函数,当运行到这句话时,我们可以通过鼠标左键在图片上画一个矩形,然后通过鼠标右键结束交互过程。然后,我们就可以得到我们绘制矩形的左上角的点坐标,以及右下角的点坐标。但是这个这个函数,并不会在界面绘制这个矩形。 有了这四个点之后,我们就可以通过gen_rectangle1在去界面上...
halcon-gen_rectangle1创建一个矩形 在HDevelop中 dev_open_window(10,10,500,500,'black',WindowHandle) draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2)*在指定窗口手动绘制一个与坐标轴平行的矩形*参数1:窗口句柄*参数2:左上角的行索引*参数3:左上角的列索引*参数4:右下角的行索引*参...
draw_rectangle1returns the parameter for a rectangle parallel to the coordinate axes, which has been created interactively by the user in the window. To create a rectangle you have to press the left mouse button determining a corner of the rectangle. While keeping the button pressed you may “...
draw_rectangle1 (WindowHandle, Row1, Column1, Row2, Column2) *在指定窗口手动绘制一个与坐标轴平行的矩形 *参数1:窗口句柄 *参数2:左上角的行索引 *参数3:左上角的列索引 *参数4:右下角的行索引 *参数5:右下角的列索引 *鼠标左键画,右键结束 *注意:右键结束后,窗口中不会画出--目的得到参数 g...
draw_rectangle1 returns the parameter for a rectangle parallel to the coordinate axes, which has been created interactively by the user in the window. To create a rectangle you have to press the left mouse button determining a corner of the rectangle. While keeping the button pressed you may ...
rgb1_to_gray (Image, GrayImage) *选择感兴趣区域 draw_rectangle1 (3600, Row1, Column1, Row2, Column2) gen_rectangle1 (Rectangle, Row1, Column1, Row2, Column2) *选中目标模板 reduce_domain (GrayImage, Rectangle, ImageReduced) threshold (ImageReduced, Regions, 0, 0) ...
*draw_point_mod (WindowHandle, Row4, Column4, Row, Column)*draw_rectangle1 (WindowHandle, Row...
如图25所示,程序运行后,当鼠标中键按下,开始创建模板。采用draw_rectangle1函数按住鼠标左键设置一个方框,如图25左上图像所示;按鼠标右键确认。用reduce_domain函数将方框中的图像拷贝为模板图像,如图26所示,并用write_image函数保存在硬盘的指定位置。 图25 创建形状匹配模板 ...
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...
read_image (Image, 'C:/Users/Administrator/Desktop/1.tiff') dev_close_window () get_image_size (Image, Width, Height) dev_open_window (0, 0, Width/3, Height/3, 'black', WindowHandle) dev_display (Image) dev_set_draw ('margin') stop() **获取感兴趣的区域 **draw_rectangle1 (...