Halcon形状匹配在图像【仿射变换】中的应用

在机器视觉应用中,经常需要对图像进行 仿 变换
1、在基于参考的视觉检测中,由于待检图像与参考图像或多或少都会存在几何变化(平移、旋转、缩放等),所以在做比较之前一般都要对待检图像进行 仿 变换 以对齐图像。
2、要进行 仿 变换 ,必须先获取 变换 矩阵, 状匹配是获取 变换 矩阵的一种高效的方法。
3、 Halcon 的如下几个函数是专门用于计算 变换 矩阵的:
vector_angl e_to_rigid  :Compute  rigid  affine  transformation  from  points  and  angles.   
vector_to_rigid  :Approximate  rigid  affine  transformation  from  point  correspondences. 
vector_to_similarity  :Approximate  an  similarity  transformation  from  point  correspondences. 
vector_to_hom_mat2d  :Approximate  an  affine  transform ation  from  point  correspondences. 
4、 Halcon 中用于 状匹配的函数有:
find_shape_model  :Find  the  best  matches  of  shape  model  in  an  image. 
find_shape_models  :Find  the  best  matches  of  multiple  shape  models. 
find_scaled_shape_model  :Find  the  best  matches  of  scale  invariant  shape  model  in  an  image. 
find_scaled_shape_models  :Find  the  best  matches  of  multiple  scale  invariant  shape  models. 
5、单匹配计算刚性 变换 矩阵:vector_angle_to_rigid只需要一个点对及一个角度对即可计算刚性 变换 矩阵,所以可直接利用find_shape_model的结果,但精度可能稍低。
6、双匹配计算刚性 变换 矩阵:vector_to_rigid需要至少两个点对的支持,所以需要用两次find_shape_model或用一次find_shape_models,精度会比单匹配高,但仍局限于刚性 变换
7、双匹配计算相似 变换 矩阵:vector_to_similarity 用于计算相似 变换 矩阵 ,需要至少两个点对的支持,所以需要用两次find_scaled_shape_model或用一次find_scaled_shape_models。
8、三匹配计算一般 变换 矩阵:vector_to_hom_mat2d用于计算一般的其次 变换 矩阵,需要至少三个点对的支持,所以需要用三次find_scaled_shape_model或用一次find_scaled_shape_models。
9、综上,在不同情况下,选用相应的 变换 矩阵类型、 状匹配方法,可以达到事半功倍的效果!
  • 0
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Halcon是一个广泛应用于机器视觉领域的软件平台。在Halcon,模板匹配仿射变换是常用的技术组合,用于图像处理和目标检测。模板匹配是一种通过比较图像的模板和待匹配图像来定位目标的方法,而仿射变换是一种可以对图像进行旋转、缩放、平移和倾斜的变换方法。 在Halcon,可以通过使用函数inspect_shape_model来观察模板的样子,并以此来辅助后续的模板匹配过程。该函数可以帮助我们确认模板匹配的相关参数,如模板图像、模板区域等信息。同时,基于形状的模板匹配方法也可以结合仿射变换技术,对目标进行更加灵活的匹配。通过对模板进行仿射变换,可以适应目标的旋转、缩放和平移等变化,提高匹配的准确性和鲁棒性。 如果你对这个话题感兴趣,可以参考引用的文章,了解更多关于Halcon模板匹配仿射变换的内容。此外,引用的博客也提供了基于形状的模板匹配仿射变换和模板跟随的相关讨论。希望这些资料对你有所帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [【halcon】模板匹配仿射变换总结](https://blog.csdn.net/songhuangong123/article/details/129146123)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [学习路线模板匹配仿射变换20211030.rar](https://download.csdn.net/download/weixin_38566632/35337982)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值