【二】2D测量 Metrology——align_metrology_model()算子


欢迎来到本博客

Halcon算子太多,学习查找都没有系统的学习查找路径,本专栏主要分享Halcon各类算子含义及用法,有时间会更新具体案例。

具体食用方式:可以点击本专栏【Halcon算子快速查找】–>搜索你要查询的算子名称;或者点击Halcon算子汇总博客,即可食用。

支持:如果觉得博主的文章还不错或者您用得到的话,可以悄悄关注一下博主哈,如果三连收藏支持就更好啦!这就是给予我最大的支持!


文章目录

  • 学习目标
  • 学习内容
    • 1、align_metrology_model()
      • 案例
      • Halcon例程
  • 【2D测量 Metrology部分】 待更新算子
  • 汇总

学习目标

  • align_metrology_model()

学习内容

算子简介

函数名 解释
align_metrology_model() 校准测量模型。

1、align_metrology_model()

  align_metrology_model( : : MetrologyHandle, Row, Column, Angle : )

  函数说明: 测量模型的对齐/校准。

  函数参数:
    MeasureHandle:输入测量模型的句柄;
    Row:对齐测量模型的列坐标;
    Column:对齐测量模型的列坐标:
    Angle:对齐测量模型的旋转角度。

案例

read_image (Image, 'metal-parts/circle_plate_01')
create_metrology_model (MetrologyHandle)
get_image_size (Image, Width, Height)
set_metrology_model_image_size (MetrologyHandle, Width, Height)  
CircleParam := [354,274,53]
CircleParam := [CircleParam,350,519,53]
add_metrology_object_generic (MetrologyHandle, 'circle', CircleParam, 20,5, 1, 30, [], [], CircleIndices)
create_shape_model (Image, 6, 0, rad(360), 'auto', 'auto', 'use_polarity', 'auto', 20, ShapeModelID)
* Determine location of shape model origin
area_center (Image, Area, RowOrigin, ColOrigin)
set_metrology_model_param (MetrologyHandle, 'reference_system', [RowOrigin,ColOrigin,0])
read_image (CurrentImage, 'metal-parts/circle_plate_02')
find_shape_model (CurrentImage, ShapeModelID, 0, rad(360), 0.5, 1, 0,'least_squares', 5, 0.9, RowAlign, ColAlign, AngleAlign, Score)
align_metrology_model (MetrologyHandle, RowAlign,ColAlign,AngleAlign)
apply_metrology_model (CurrentImage, MetrologyHandle)
get_metrology_object_result (MetrologyHandle, CircleIndices, 'all', 'result_type', 'all_param', Rectangle)
get_metrology_object_result_contour (Contour, MetrologyHandle, CircleIndices, 'all', 1.5)
clear_metrology_model (MetrologyHandle)
clear_shape_model (ShapeModelID)

Halcon例程

measure_stamping_part.hdev		使用对齐的测量模型(校准)测量冲压零件的圆、矩形和直线
apply_metrology_model_diamond.hdev		使用测量模型测量钻石切割的角度

【2D测量 Metrology部分】 待更新算子

  • create_metrology_model()
  • set_metrology_model_image_size()
  • add_metrology_object_circle_measure()
  • add_metrology_object_ellipse_measure()
  • add_metrology_object_generic()
  • add_metrology_object_line_measure()
  • add_metrology_object_rectangle2_measure()
  • set_metrology_model_param()
  • set_metrology_object_fuzzy_param()
  • set_metrology_object_param()
  • align_metrology_model()
  • apply_metrology_model()
  • get_metrology_model_param()
  • get_metrology_object_fuzzy_param()
  • get_metrology_object_indices()
  • get_metrology_object_measures()
  • get_metrology_object_model_contour()
  • get_metrology_object_num_instances()
  • get_metrology_object_param()
  • get_metrology_object_result()
  • get_metrology_object_result_contour()
  • clear_metrology_model()
  • clear_metrology_object()
  • copy_metrology_model()
  • deserialize_metrology_model()
  • read_metrology_model()
  • reset_metrology_object_fuzzy_param()
  • reset_metrology_object_param()
  • serialize_metrology_model()
  • write_metrology_model()

汇总

  本专栏博客汇总:Halcon算子汇总


今天的文章就到这里啦~
喜欢的话,点赞、收藏⭐️、关注哦 ~

你可能感兴趣的:(Halcon算子,算法,计算机视觉,图像处理,Halcon)