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度后

相关推荐
ZJU_统一阿萨姆2 小时前
【算子开发】矩阵乘法(GEMM)入门与共享内存优化
人工智能·线性代数·矩阵·系统架构
不正经的码狗3 小时前
省级专项项目书撰写全流程实操指南
计算机视觉
longxiaozhang68 小时前
C# Array类:数组其实没那么难
开发语言·c#
招财小梗8 小时前
AI矩阵获客,品牌连锁落地方案揭秘
大数据·人工智能·矩阵
longxiaozhang612 小时前
C#运算符重载:让对象也能使用“加减乘除”
开发语言·c#
花落人散处13 小时前
C# 核心编程知识点总结:网络编程、委托与事件、异步编程与LINQ
c#
fl17683115 小时前
基于C#WPF实现的内存加速球清理类似360加速球内存清理
开发语言·c#·wpf
CoderIsArt17 小时前
OPC UA 完整介绍、官网、C# 简单使用
开发语言·c#
云登指纹浏览器17 小时前
做TikTok矩阵号用什么指纹浏览器?2026年实战横评
线性代数·矩阵
界面开发小八哥17 小时前
界面控件DevExpress XAF v26.1新版亮点——AI Agent Skills
ai·c#·跨平台·devexpress·ui开发·xaf