当前位置: 首页 > news >正文

CT重建笔记(五)—2D平行束投影公式

写的又回去了,因为我发现我理解不够透彻,反正想到啥写啥,尽量保证内容质量好简洁易懂

2D平行束投影公式

p ( s , θ ) = ∫ ∫ f ( x , y ) δ ( x c o s θ + y s i n θ − s ) d x d y p(s,\theta)=\int \int f(x,y)\delta(x cos\theta + ysin\theta - s) dxdy p(s,θ)=∫∫f(x,y)δ(xcosθ+ysinθs)dxdy式1
p ( s , θ ) = ∫ f ( s c o s θ − t s i n θ , s s i n θ + t c o s θ ) d t p(s,\theta)=\int f(scos\theta - tsin\theta,s sin\theta + t cos\theta)dt p(s,θ)=f(scosθtsinθ,ssinθ+tcosθ)dt式2
p ( s , θ ) = ∫ f ( s θ ⃗ + t θ ⃗ ) d t p(s,\theta) = \int f(s\vec \theta + t \vec \theta)dt p(s,θ)=f(sθ +tθ )dt式3
p ( s , θ ) = ∫ f θ ( s , t ) d t p(s,\theta)=\int f_\theta(s,t)dt p(s,θ)=fθ(s,t)dt式4
这些公式来自医学图像重建1.5节,这些都是2D平行束投影公式(我偷懒没写积分的上下限)。
s s s表示探测器像素单元的坐标, θ \theta θ表示投影角度。
f ( x , y ) f(x,y) f(x,y)为物体截面的线衰减系数。
x c o s θ + y s i n θ = s x cos\theta + ysin\theta = s xcosθ+ysinθ=s是平面直线方程的一种写法(Hesse Normal Form,见https://leslielee.blog.csdn.net/article/details/145670396),表示投影角度为 θ \theta θ投影至探测器坐标 s s s处的射线。

式1

δ ( z ) \delta(z) δ(z)是一个广义函数,具有筛选的性质(见https://leslielee.blog.csdn.net/article/details/144859730,但由于我的数学水平不够,这篇写的比较差劲)
给定 s , θ s,\theta s,θ后,若固定 y y y,则式1中位于里面的积分可写作:
∫ f ( x , y ˉ ) δ ( x c o s θ ˉ + y ˉ s i n θ ˉ − s ˉ ) d x = f ( x ~ , y ˉ ) \int f(x,\bar y)\delta(x cos \bar \theta + \bar ysin \bar \theta - \bar s) dx = f(\tilde x,\bar y) f(x,yˉ)δ(xcosθˉ+yˉsinθˉsˉ)dx=f(x~,yˉ)
其中, x ~ c o s θ ˉ + y ˉ s i n θ ˉ = s ˉ \tilde x cos \bar \theta + \bar ysin \bar \theta = \bar s x~cosθˉ+yˉsinθˉ=sˉ,即 ( x ~ , y ˉ ) (\tilde x, \bar y) (x~,yˉ)在直线 x c o s θ ˉ + y s i n θ ˉ = s ˉ x cos \bar \theta + ysin \bar \theta = \bar s xcosθˉ+ysinθˉ=sˉ上。
给定 s , θ s,\theta s,θ后,遍历所有的 y y y式1中位于外面积分的作用),便可实现将位于直线 x c o s θ ˉ + y s i n θ ˉ = s ˉ x cos \bar \theta + ysin \bar \theta = \bar s xcosθˉ+ysinθˉ=sˉ上的 f ( x , y ) f(x,y) f(x,y)进行求和。
因此,式1得到的是位于直线 x c o s θ + y s i n θ = s x cos \theta + ysin \theta = s xcosθ+ysinθ=s上的 f ( x , y ) f(x,y) f(x,y)的和。

若令 θ ⃗ = ( c o s θ , s i n θ ) \vec \theta = (cos \theta, sin \theta) θ =(cosθ,sinθ) x ⃗ = ( x , y ) \vec x = (x,y) x =(x,y),则式1可得到向量写法:
p ( s , θ ) = ∫ ∫ f ( x , y ) δ ( x ⃗ ⋅ θ ⃗ − s ) d x d y p(s,\theta)=\int \int f(x,y)\delta(\vec x \cdot \vec \theta - s) dxdy p(s,θ)=∫∫f(x,y)δ(x θ s)dxdy

式2

( x , y ) (x,y) (x,y)要位于直线 x c o s θ + y s i n θ = s x cos\theta + ysin\theta = s xcosθ+ysinθ=s上才可计算线积分。因此, x = s c o s θ − t s i n θ , y = s s i n θ + t c o s θ x = s cos\theta - t sin\theta, y=s sin\theta + t cos \theta x=scosθtsinθ,y=ssinθ+tcosθ必然已经将 ( x , y ) (x,y) (x,y)约束至直线 x c o s θ + y s i n θ = s x cos\theta + ysin\theta = s xcosθ+ysinθ=s上。

定义 t t t,令 x = s c o s θ − t s i n θ , y = s s i n θ + t c o s θ x = s cos\theta - t sin\theta, y=s sin\theta + t cos \theta x=scosθtsinθ,y=ssinθ+tcosθ,将 x , y x,y x,y带入直线方程中得到:
( s c o s θ − t s i n θ ) c o s θ + ( s s i n θ + t c o s θ ) s i n θ = s (s cos\theta - t sin\theta) cos\theta + (s sin\theta + t cos \theta) sin\theta = s (scosθtsinθ)cosθ+(ssinθ+tcosθ)sinθ=s
进一步化简可得:
s = s s=s s=s
因此, x = s c o s θ − t s i n θ , y = s s i n θ + t c o s θ x = s cos\theta - t sin\theta, y=s sin\theta + t cos \theta x=scosθtsinθ,y=ssinθ+tcosθ 等效于 x c o s θ + y s i n θ = s x cos\theta + ysin\theta = s xcosθ+ysinθ=s,即将 ( x , y ) (x,y) (x,y)约束至直线 x c o s θ + y s i n θ = s x cos\theta + ysin\theta = s xcosθ+ysinθ=s上。
(那是如何才能想到这么表示 x , y x,y x,y呢,对此我咨询了元宝元宝告我跟旋转矩阵相关。)

x = s c o s θ − t s i n θ , y = s s i n θ + t c o s θ x = s cos\theta - t sin\theta, y=s sin\theta + t cos \theta x=scosθtsinθ,y=ssinθ+tcosθ 可写成向量矩阵形式:
(见https://leslielee.blog.csdn.net/article/details/135566902
[ c o s θ − s i n θ s i n θ c o s θ ] [ s t ] = [ x y ] \begin{bmatrix} cos\theta & -sin\theta \\ sin\theta & cos\theta \end{bmatrix} \begin{bmatrix} s \\ t \end{bmatrix}=\begin{bmatrix} x \\ y \end{bmatrix} [cosθsinθsinθcosθ][st]=[xy]
x , y x,y x,y s , t s,t s,t逆时针旋转得到的。

那么, s , t s,t s,t x , y x,y x,y顺时针旋转得到的,可得到表达式:
[ c o s θ s i n θ − s i n θ c o s θ ] [ x y ] = [ s t ] \begin{bmatrix} cos\theta & sin\theta \\ -sin\theta & cos\theta \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}=\begin{bmatrix} s \\ t \end{bmatrix} [cosθsinθsinθcosθ][xy]=[st]
这样我们便可明白, t = − x s i n θ + y c o s θ t = -xsin\theta + ycos\theta t=xsinθ+ycosθ式2给的 t t t并不是没有限制的。
直线 − x s i n θ + y c o s θ = t -xsin\theta + ycos\theta = t xsinθ+ycosθ=t x c o s θ + y s i n θ = s x cos\theta + ysin\theta = s xcosθ+ysinθ=s垂直,因为 ( − s i n θ , c o s θ ) ⋅ ( c o s θ , s i n θ ) = 0 (-sin\theta,cos\theta)\cdot (cos\theta,sin\theta) = 0 (sinθ,cosθ)(cosθ,sinθ)=0

给定 s , θ s,\theta s,θ后,遍历所有 t t t便可取到直线 x c o s θ + y s i n θ = s x cos\theta + ysin\theta = s xcosθ+ysinθ=s上的所有 ( x , y ) (x,y) (x,y)点。

式3

θ ⃗ ⊥ = ( − s i n θ , c o s θ ) \vec \theta^{\perp} = (-sin\theta,cos\theta) θ =(sinθ,cosθ)
s θ ⃗ + t θ ⃗ ⊥ s\vec \theta + t \vec \theta^{\perp} sθ +tθ 展开便得到: ( s c o s θ − t s i n θ , s s i n θ + t c o s θ ) (s cos\theta - t sin\theta, s sin\theta + t cos\theta) (scosθtsinθ,ssinθ+tcosθ)
而函数 f f f是一个二元函数,自变量是 x , y x,y x,y,因此有:
s c o s θ − t s i n θ = x s cos\theta - t sin\theta = x scosθtsinθ=x
s s i n θ + t c o s θ = y s sin\theta + t cos\theta = y ssinθ+tcosθ=y
这不就是表示 ( x , y ) (x,y) (x,y)是由 ( s , t ) (s,t) (s,t)逆时针旋转 θ \theta θ得到的。
因此,式3式2的向量写法。

式4

f θ ( s , t ) = f ( s c o s θ − t s i n θ , s s i n θ + t c o s θ ) f_\theta (s,t) = f(scos\theta - tsin\theta,s sin\theta + t cos\theta) fθ(s,t)=f(scosθtsinθ,ssinθ+tcosθ),便得到式4

式1表示射线源与探测器同时逆时针旋转(射线旋转),物体不动。式2表示物体顺时针旋转,射线不动。

相关文章:

  • [已解决] LaTeX “Unicode character“ 报错 (中文字符处理)
  • 硬件工程师笔记——二极管Multisim电路仿真实验汇总
  • 给图表组件上点“颜色” —— 我与 CodeBuddy 的合作记录
  • 赋能企业级移动应用 CFCA FIDO+提升安全与体验
  • 实物工厂零件画图案例(中)
  • 56.合并区间(java)
  • 【言语理解】逻辑填空之词义辨析(10)
  • 力扣HOT100之二叉树:108. 将有序数组转换为二叉搜索树
  • 45 python csv(存储表格数据)
  • No More Adam: 新型优化器SGD_SaI
  • 前端二进制数据指南:从 ArrayBuffer 到高级流处理
  • 【鸿蒙开发避坑】使用全局状态变量控制动画时,动画异常甚至动画方向与预期相反的原因分析以及解决方案
  • C语言_动态内存管理
  • vue引用cesium,解决“Not allowed to load local resource”报错
  • ProfibusDP主站转modbusTCP网关与ABB电机保护器数据交互
  • 典籍知识问答模块AI问答bug修改
  • 信息与信息化
  • LeetCode 第 45 题“跳跃游戏 II”
  • BBR 的 buffer 动力学观感
  • 【ant design】ant-design-vue 4.0实现主题色切换
  • wordpress微博图床怎么用/seo软件
  • 建设网上商城网站的目的和意义/游戏代理平台一天结一次
  • 网站建设汇报会/广东seo网络培训
  • 常州网站设计公司/app推广公司
  • 在网站后台可以修改网页的内容/制作app软件平台
  • 网站建设需要资质么/推广网站的方法有哪些