设置首页收藏本站
开启左侧

发现一个halcon仿射变换图像的问题

[复制链接]
1、在C#中,我的代码是这样写的:hImage1是仿射后的结果图


   HOperatorSet.AffineTransImage(hImage, out HObject hImage1, homMat2DRotate, "constant", "true");
   HOperatorSet.WriteImage(hImage1, "jpg", 0, "1-hImage1");
   HOperatorSet.GetDomain(hImage1, out HObject domain);   // 记录:对于仿射变换的图像,在halcon和C#中该算子的结果是不相同的
   HOperatorSet.WriteObject(domain, "2-domain.hobj");

2、我把 hImage1、domain保存下来,在halcon里面显示:
1.png
3、但是我在halcon里面针对 hImage1图像使用get_domain()算子得出的结果区域 却是下面这种:
2.png
4、看起来一样的图像hImage1,使用get_domain()算子,在C#和halcon中却有不同的结果。
5、个人觉得应该是仿射后的图像hImage1导致的这种异常情况,但是不明白这其中的原理以及解决办法,恳请各位大佬能指点一二
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
大凡光学,专注标定板提供
moonwell0106 发表于 4 天前 | 显示全部楼层
正常现象。
读新图,domain区域默认图像大小矩形A。仿射变换后,domain A也进行仿射变换得到B,A和B的交集就是仿射变换后图像的domain。
参考affine_trans_image 说明,The domain of the input image is ignored, i.e., assumed to be the full rectangle of the image. The domain of the output image is the intersection of the transformed rectangle and the rectangle of the output image.
奖励计划已经开启,本站鼓励作者发布最擅长的技术内容和资源,流量变现就在现在,[点我]加入吧~~~Go
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表