halcon计算仿射变换矩阵的逆矩阵

前言

在Halcon中经常需要矩阵对图像做各种操作,本文就来介绍如何求一个仿射变换矩阵的逆矩阵。

halcon代码

csharp 复制代码
dev_open_file_dialog ('read_image', 'default', 'default', Selection)
read_image (Image, Selection)
get_image_size (Image, Width, height)
hom_mat2d_identity (HomMat2DIdentity)
hom_mat2d_rotate (HomMat2DIdentity, 45, Width/2, height/2, HomMat2DRotate)
affine_trans_image (Image, ImageAffineTrans, HomMat2DRotate, 'constant', 'false')
hom_mat2d_invert (HomMat2DRotate, HomMat2DInvert)
affine_trans_image (ImageAffineTrans, ImageAffineTrans1, HomMat2DInvert, 'constant', 'false')

运算结果

1)旋转前

2)绕着中心点逆时针旋转45度后

3)绕着中心点顺时针旋转45度后

相关推荐
MM_MS7 小时前
Halcon变量控制类型、数据类型转换、字符串格式化、元组操作
开发语言·人工智能·深度学习·算法·目标检测·计算机视觉·视觉检测
玩泥巴的7 小时前
飞书 .NET SDK 事件处理的幂等性与去重机制
c#·.net·二次开发·飞书
在路上看风景7 小时前
3.2 FileStream
c#
zwm2698888157 小时前
6号楼 部分声光24v电压达不到,显示11v
c#
旅途中的宽~8 小时前
《European Radiology》:2024血管瘤分割—基于MRI T1序列的分割算法
人工智能·计算机视觉·mri·sci一区top·血管瘤·t1
kisshuan123969 小时前
YOLO11-RepHGNetV2实现甘蔗田杂草与作物区域识别详解
人工智能·计算机视觉·目标跟踪
_codemonster10 小时前
高斯卷积的可加性定理
人工智能·计算机视觉
椒颜皮皮虾11 小时前
TensorRtSharp:在 C# 世界中释放 GPU 推理的极致性能
c#·tensorrt
行止9511 小时前
WinForms 彻底隐藏 滚动条的终极解决方案
c#
bugcome_com12 小时前
WPF样式进阶实战:外置样式+MVVM主题切换+样式优先级全解析
c#·.net·wpf