Affine Functions

本文深入探讨了一维、二维和三维仿射函数的概念及其图形表现,解释了仿射变换如何通过线性变换和平移操作保留图形的特定属性,如点共线、线段长度比例和图形类型。

仿射函数

一维仿射功能:

仿射函数是由线性函数+常数组成的函数,其图形是直线。一维仿射函数的一般公式为:
y = Ax + c。

仿射函数演示了一个仿射变换,它等效于线性变换后再进行平移。在仿射变换中,保留了图的某些属性。这些包括:
如果三个点都属于同一条线,则在仿射变换下,这三个点仍将属于同一条线,中间点仍将在中间。
平行线保持平行。
并发行保持并发。
给定线段的长度之比保持恒定。
两个三角形的面积比保持不变。
椭圆仍然是椭圆,抛物线和双曲线也是如此。

二维仿射功能:

在2D中,仿射函数的方程式为f(x,y)= Ax + By +C。

下一部分所示的2D波形图显示了2D仿射函数图的示例。

3维仿射功能:

在3D中,仿射函数的方程式为f(x,y,z)= Ax + By + Cz +D。

使用设备: cuda monai.transforms.croppad.dictionary CropForegroundd.__init__:allow_smaller: Current default value of argument `allow_smaller=True` has been deprecated since version 1.2. It will be changed to `allow_smaller=False` in version 1.5. You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature. ✅ 模型权重加载成功(忽略不匹配的层) 处理结果: False, 处理失败: applying transform <__main__.SyncAffined object at 0x0000015D7D985640> Traceback (most recent call last): File "D:\Anaconda\envs\DL\lib\site-packages\monai\transforms\transform.py", line 141, in apply_transform return _apply_transform(transform, data, unpack_items, lazy, overrides, log_stats) File "D:\Anaconda\envs\DL\lib\site-packages\monai\transforms\transform.py", line 98, in _apply_transform return transform(data, lazy=lazy) if isinstance(transform, LazyTrait) else transform(data) File "C:\Users\53145\AppData\Local\Temp\ipykernel_20588\3306265937.py", line 31, in __call__ data["image_meta_dict"]["original_affine"] = data["original_affine"] KeyError: 'original_affine' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\53145\AppData\Local\Temp\ipykernel_20588\3306265937.py", line 258, in generate_gradcam_for_ct preprocessed_data = transforms(input_dict) File "D:\Anaconda\envs\DL\lib\site-packages\monai\transforms\compose.py", line 335, in __call__ result = execute_compose( File "D:\Anaconda\envs\DL\lib\site-packages\monai\transforms\compose.py", line 111, in execute_compose data = apply_transform( File "D:\Anaconda\envs\DL\lib\site-packages\monai\transforms\transform.py", line 171, in apply_transform raise RuntimeError(f"applying transform {transform}") from e RuntimeError: applying transform <__main__.SyncAffined object at 0x0000015D7D985640>什么原因?
最新发布
06-06
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值