分享

[转载]Halcon形状匹配在图像仿射变换中的应用(转)

 学海无涯GL 2014-01-17
在机器视觉应用中,经常需要对图像进行仿变换
1、在基于参考的视觉检测中,由于待检图像与参考图像或多或少都会存在几何变化(平移、旋转、缩放等),所以在做比较之前一般都要对待检图像进行仿变换以对齐图像。
2、要进行仿变换,必须先获取变换矩阵,状匹配是获取变换矩阵的一种高效的方法。
3、Halcon的如下几个函数是专门用于计算变换矩阵的:
vector_angle_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 transformation 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

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多