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

相关推荐
唐青枫17 小时前
别再乱用 StartNew:C#.NET TaskFactory 任务调度实战详解
c#·.net
Artech1 天前
[MAF预定义的AIContextProvider-03]ChatHistoryMemoryProvider——赋予Agent从经验中学习的能力
ai·c#·agent·memory·maf
小小杨树2 天前
读懂色彩:拍照调色不再难
算法·计算机视觉·配色
Scout-leaf3 天前
C#摸鱼实录——IoC与DI案例详解
c#
咕白m6253 天前
使用 C# 在 Excel 中应用多种字体样式
后端·c#
Artech3 天前
[MAF预定义的AIContextProvider-02]AgentSkillsProvider——将Agent Skills引入MAF
ai·c#·agent·agent skills·maf
Bobolink_4 天前
TikTok矩阵账号如何批量养号?工作室级运营方案分享
矩阵·内容运营·跨境电商·tik tok·账号运营
H__Rick4 天前
自动对焦学习-3
人工智能·学习·计算机视觉
计算机科研狗@OUC4 天前
(cvpr26) AIMDepth: Asymmetric Image-Event Mamba for Monocular Depth Estimation
人工智能·深度学习·计算机视觉