前一段时间我写了一个create_shape_model_xld函数(基于几何图形创建模板与各向异性模板匹配-CSDN博客),它无需图像通过两个参数就可以创建圆形模板和矩形模板,这次我添加了十字形模板,其同样有广泛的用途。由于很多人不清楚如何使用,这里再说明一下(demo程序与库函数中一样)。 1.圆形只需要输入长半轴的数据,表示半径的大小,短半轴设置为
Contrast(in):设置对比度(可以通过inspect_shape_modelinspect_shape_model算子确定对比度) MinContrast(in):设置最小对比度(对于灰度差距不大时,使用低对比度) ModelID(out):输出模板句柄 3.创建shape 可缩放模板 create_scaled_shape_model(Template : : NumLevels, AngleStart, AngleExtent, AngleStep, ScaleMin...
create_aniso_shape_model (ImageReduced1, 'auto', rad(0), rad(90), 'auto', 0.9, 1.1, 'auto', 0.9, 1.1, 'auto', 'auto', 'use_polarity', 'auto', 'auto', ModelID) *保存模板文件 * get_shape_model_contours (ModelContours, ModelID, 1) *write_shape_model (ModelID, 'C:/Users/...
The operator create_shape_model prepares a template, which is passed in the image Template, as a shape model used for matching. The ROI of the model is passed as the domain of Template. 运算符create_shape_model准备一个模板,该模板在图像模板中传递,作为用于匹配的形状模型。模型的 ROI 作为 Tem...
create_shape_model 主要应用于模板没有太大的形变的条件下,局部可以有轻微变形 没有变形的情况,正常使用即可 create_shape_model (ImageReduced, 'auto', -0.39, 0.78, 'auto', 'auto', 'use_polarity', 'auto', 'auto', ModelID) find_shape_model (Image, ModelID, -0.39, 0.78, 0.7, 1, 0.5, ...
create_shape_model 名称 create_shape_model - 准备一个用于匹配的形状模型。 签名 create_shape_model(Template : : NumLevels, AngleStart, AngleExtent, AngleStep, Optimization, Metric, Contrast, MinContrast : ModelID) 描述 运算符create_shape_model准备一个模板,该模板在图像模板中传递,作为用于匹配的形...
Halcon的create_shape_model函数用来创建形状模型,其参数如下: 1. ModelID:输出参数,形状模型的ID。 2. ObjectID:输入参数,包含待训练的模板图像的ID。 3. ScaleMin:输入参数,最小缩放因子。 4. ScaleMax:输入参数,最大缩放因子。 5. ScaleStep:输入参数,缩放因子的步长。 6. Metric:输入参数,形状匹配的度量...
halcon区域转图像用于create_shape_model创建模板 Halcon区域转图像是指将Halcon图像处理软件中的一个或多个区域转换为图像的过程。这个功能通常用于后续的形状模板创建,以便对图像中的特定形状进行检测和识别。 在Halcon中,图像是由像素组成的二维数组,每个像素都有其坐标和灰度值。区域是由一系列像素组成的对象,可以...
由于find_shape_model函数中的角度可以使用亚像素精度,一个直径小于200像素的模板可以选择AngleStep>= 1. 如果选择AngleStep='auto' (or 0 向后兼容),create_shape_model将会基于模板的大小自动定义一个合适的角度步长. 自动计算出来的AngleStep可以使用get_shape_model_params函数查看。
由于find_shape_model函数中的角度可以使用亚像素精度,一个直径小于200像素的模板可以选择AngleStep>= 1. 如果选择AngleStep='auto' (or 0 向后兼容),create_shape_model将会基于模板的大小自动定义一个合适的角度步长. 自动计算出来的AngleStep可以使用get_shape_model_params函数查看。