欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中
欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中

【youcans 的 OpenCV 例程 200 篇】111. 雷登变换反投影重建图像

7. 投影重建图像

图像重建的基本思想,就是通过探测物体的投影数据,重建物体的实际内部构造。

7.2 雷登变换反投影重建图像(Radon transform back projection)

空间点 X 通过摄像机 P 被作用到图像平面的图像点 m = PX , 获得采集到的图像数据,这种投影关系称为摄像机的正向投影 (forward projection) ,简称投影。

反向投影是针对图像平面的基本几何元素而言的,图像平面点 m 的反投影是指在摄像机 P 的作用下具有像点 m 的所有空间点的集合。

反投影一个点形成部分图像的过程,是将直线 L(ρj,θk)L(\rho_j,\theta_k)L(ρj​,θk​) 复制到图像上,直线上每点的灰度值是 g(ρj,θk)g(\rho_j,\theta_k)g(ρj​,θk​)。遍历投影信号中的每个点,得到:
fθ(x,y)=g(ρ,θ)=g(xcosθ+ysinθ)f_{\theta}(x,y) = g(\rho,\theta) = g(x cos \theta + ysin \theta) fθ​(x,y)=g(ρ,θ)=g(xcosθ+ysinθ)
对所有反投影图像积分,得到最终的图像:
f(x,y)=∫0πfθ(x,y)dθf(x,y) = \int_0^{\pi}f_{\theta}(x,y)d\theta f(x,y)=∫0π​fθ​(x,y)dθ
其离散形式为:

f(x,y)=∑θ=0πfθ(x,y)f(x,y) = \sum_{\theta=0}^{\pi}f_{\theta}(x,y) f(x,y)=θ=0∑π​fθ​(x,y)

反投影的图像有时称为层图,可以理解为投影图像的一个近似。

例程 9.24:雷登变换反投影重建图像

    # 9.24: 雷登变换反投影重建图像from scipy import ndimagedef discreteRadonTransform(image, steps):  # 离散雷登变换channels = image.shape[0]resRadon = np.zeros((channels, channels), dtype=np.float32)for s in range(steps):rotation = ndimage.rotate(image, -s * 180/steps, reshape=False).astype(np.float32)resRadon[:, s] = sum(rotation)return resRadondef inverseRadonTransform(image, steps):  # 雷登变换反投影channels = image.shape[0]res = np.zeros((steps, channels, channels))for s in range(steps):expandDims = np.expand_dims(image[:, s], axis=0)repeat = expandDims.repeat(channels, axis=0)res[s] = ndimage.rotate(repeat, s * 180/steps, reshape=False).astype(np.float32)invRadon = np.sum(res, axis=0)return invRadon# 读取原始图像img1 = cv2.imread("../images/Fig0534a.tif", 0)  # flags=0 读取为灰度图像img2 = cv2.imread("../images/Fig0534c.tif", 0)# 雷登变换imgRadon1 = discreteRadonTransform(img1, img1.shape[0])  # Radon 变换imgRadon2 = discreteRadonTransform(img2, img2.shape[0])# 雷登变换反投影imgInvRadon1 = inverseRadonTransform(imgRadon1, imgRadon1.shape[0])imgInvRadon2 = inverseRadonTransform(imgRadon2, imgRadon2.shape[0])plt.figure(figsize=(9, 7))plt.subplot(231), plt.axis('off'), plt.title("origin image"), plt.imshow(img1, 'gray')  # 绘制原始图像plt.subplot(232), plt.axis('off'), plt.title("Radon transform"), plt.imshow(imgRadon1, 'gray')  # 绘制 sinogram 图plt.subplot(233), plt.axis('off'), plt.title("Inv-Radon transform"), plt.imshow(imgInvRadon1, 'gray')plt.subplot(234), plt.axis('off'), plt.title("origin image"), plt.imshow(img2, 'gray')plt.subplot(235), plt.axis('off'), plt.title("Radon transform"), plt.imshow(imgRadon2, 'gray')plt.subplot(236), plt.axis('off'), plt.title("Inv-Radon transform"), plt.imshow(imgInvRadon2, 'gray')plt.tight_layout()plt.show()

(本节完)


版权声明:

youcans@xupt 原创作品,转载必须标注原文链接:(https://blog.csdn.net/youcans/article/details/123088322)

Copyright 2022 youcans, XUPT
Crated:2022-2-22

欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中
欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中

【youcans 的 OpenCV 例程200篇】01. 图像的读取(cv2.imread)
【youcans 的 OpenCV 例程200篇】02. 图像的保存(cv2.imwrite)
【youcans 的 OpenCV 例程200篇】03. 图像的显示(cv2.imshow)
【youcans 的 OpenCV 例程200篇】04. 用 matplotlib 显示图像(plt.imshow)
【youcans 的 OpenCV 例程200篇】05. 图像的属性(np.shape)
【youcans 的 OpenCV 例程200篇】06. 像素的编辑(img.itemset)
【youcans 的 OpenCV 例程200篇】07. 图像的创建(np.zeros)
【youcans 的 OpenCV 例程200篇】08. 图像的复制(np.copy)
【youcans 的 OpenCV 例程200篇】09. 图像的裁剪(cv2.selectROI)
【youcans 的 OpenCV 例程200篇】10. 图像的拼接(np.hstack)
【youcans 的 OpenCV 例程200篇】11. 图像通道的拆分(cv2.split)
【youcans 的 OpenCV 例程200篇】12. 图像通道的合并(cv2.merge)
【youcans 的 OpenCV 例程200篇】13. 图像的加法运算(cv2.add)
【youcans 的 OpenCV 例程200篇】14. 图像与标量相加(cv2.add)
【youcans 的 OpenCV 例程200篇】15. 图像的加权加法(cv2.addWeight)
【youcans 的 OpenCV 例程200篇】16. 不同尺寸的图像加法
【youcans 的 OpenCV 例程200篇】17. 两张图像的渐变切换
【youcans 的 OpenCV 例程200篇】18. 图像的掩模加法
【youcans 的 OpenCV 例程200篇】19. 图像的圆形遮罩
【youcans 的 OpenCV 例程200篇】20. 图像的按位运算
【youcans 的 OpenCV 例程200篇】21. 图像的叠加
【youcans 的 OpenCV 例程200篇】22. 图像添加非中文文字
【youcans 的 OpenCV 例程200篇】23. 图像添加中文文字
【youcans 的 OpenCV 例程200篇】24. 图像的仿射变换
【youcans 的 OpenCV 例程200篇】25. 图像的平移
【youcans 的 OpenCV 例程200篇】26. 图像的旋转(以原点为中心)
【youcans 的 OpenCV 例程200篇】27. 图像的旋转(以任意点为中心)
【youcans 的 OpenCV 例程200篇】28. 图像的旋转(直角旋转)
【youcans 的 OpenCV 例程200篇】29. 图像的翻转(cv2.flip)
【youcans 的 OpenCV 例程200篇】30. 图像的缩放(cv2.resize)
【youcans 的 OpenCV 例程200篇】31. 图像金字塔(cv2.pyrDown)
【youcans 的 OpenCV 例程200篇】32. 图像的扭变(错切)
【youcans 的 OpenCV 例程200篇】33. 图像的复合变换
【youcans 的 OpenCV 例程200篇】34. 图像的投影变换
【youcans 的 OpenCV 例程200篇】35. 图像的投影变换(边界填充)
【youcans 的 OpenCV 例程200篇】36. 直角坐标与极坐标的转换
【youcans 的 OpenCV 例程200篇】37. 图像的灰度化处理和二值化处理
【youcans 的 OpenCV 例程200篇】38. 图像的反色变换(图像反转)
【youcans 的 OpenCV 例程200篇】39. 图像灰度的线性变换
【youcans 的 OpenCV 例程200篇】40. 图像分段线性灰度变换
【youcans 的 OpenCV 例程200篇】41. 图像的灰度变换(灰度级分层)
【youcans 的 OpenCV 例程200篇】42. 图像的灰度变换(比特平面分层)
【youcans 的 OpenCV 例程200篇】43. 图像的灰度变换(对数变换)
【youcans 的 OpenCV 例程200篇】44. 图像的灰度变换(伽马变换)
【youcans 的 OpenCV 例程200篇】45. 图像的灰度直方图
【youcans 的 OpenCV 例程200篇】46. 直方图均衡化
【youcans 的 OpenCV 例程200篇】47. 图像增强—直方图匹配
【youcans 的 OpenCV 例程200篇】48. 图像增强—彩色直方图匹配
【youcans 的 OpenCV 例程200篇】49. 图像增强—局部直方图处理
【youcans 的 OpenCV 例程200篇】50. 图像增强—直方图统计量图像增强
【youcans 的 OpenCV 例程200篇】51. 图像增强—直方图反向追踪
【youcans 的 OpenCV 例程200篇】52. 图像的相关与卷积运算
【youcans 的 OpenCV 例程200篇】53. Scipy 实现图像二维卷积
【youcans 的 OpenCV 例程200篇】54. OpenCV 实现图像二维卷积
【youcans 的 OpenCV 例程200篇】55. 可分离卷积核
【youcans 的 OpenCV 例程200篇】56. 低通盒式滤波器
【youcans 的 OpenCV 例程200篇】57. 低通高斯滤波器
【youcans 的 OpenCV 例程200篇】58. 非线性滤波—中值滤波
【youcans 的 OpenCV 例程200篇】59. 非线性滤波—双边滤波
【youcans 的 OpenCV 例程200篇】60. 非线性滤波—联合双边滤波
【youcans 的 OpenCV 例程200篇】61. 导向滤波(Guided filter)
【youcans 的 OpenCV 例程200篇】62. 图像锐化——钝化掩蔽
【youcans 的 OpenCV 例程200篇】63. 图像锐化——Laplacian 算子
【youcans 的 OpenCV 例程200篇】64. 图像锐化——Sobel 算子
【youcans 的 OpenCV 例程200篇】65. 图像锐化——Scharr 算子
【youcans 的 OpenCV 例程200篇】66. 图像滤波之低通/高通/带阻/带通
【youcans 的 OpenCV 例程200篇】67. 空间域图像增强的综合应用
【youcans 的 OpenCV 例程200篇】68. 空间域图像增强的综合应用
【youcans 的 OpenCV 例程200篇】69. 连续非周期信号的傅立叶系数
【youcans 的 OpenCV 例程200篇】70. 一维连续函数的傅里叶变换
【youcans 的 OpenCV 例程200篇】71. 连续函数的取样
【youcans 的 OpenCV 例程200篇】72. 一维离散傅里叶变换
【youcans 的 OpenCV 例程200篇】73. 二维连续傅里叶变换
【youcans 的 OpenCV 例程200篇】74. 图像的抗混叠
【youcans 的 OpenCV 例程200篇】75. Numpy 实现图像傅里叶变换
【youcans 的 OpenCV 例程200篇】76. OpenCV 实现图像傅里叶变换
【youcans 的 OpenCV 例程200篇】77. OpenCV 实现快速傅里叶变换
【youcans 的 OpenCV 例程200篇】78. 频率域图像滤波基础
【youcans 的 OpenCV 例程200篇】79. 频率域图像滤波的基本步骤
【youcans 的 OpenCV 例程200篇】80. 频率域图像滤波详细步骤
【youcans 的 OpenCV 例程200篇】81. 频率域高斯低通滤波器
【youcans 的 OpenCV 例程200篇】82. 频率域巴特沃斯低通滤波器
【youcans 的 OpenCV 例程200篇】83. 频率域低通滤波:印刷文本字符修复
【youcans 的 OpenCV 例程200篇】84. 由低通滤波器得到高通滤波器
【youcans 的 OpenCV 例程200篇】85. 频率域高通滤波器的应用
【youcans 的 OpenCV 例程200篇】86. 频率域滤波应用:指纹图像处理
【youcans 的 OpenCV 例程200篇】87. 频率域钝化掩蔽
【youcans 的 OpenCV 例程200篇】88. 频率域拉普拉斯高通滤波
【youcans 的 OpenCV 例程200篇】89. 带阻滤波器的传递函数
【youcans 的 OpenCV 例程200篇】90. 频率域陷波滤波器
【youcans 的 OpenCV 例程200篇】91. 高斯噪声、瑞利噪声、爱尔兰噪声
【youcans 的 OpenCV 例程200篇】92. 指数噪声、均匀噪声、椒盐噪声
【youcans 的 OpenCV 例程200篇】93. 噪声模型的直方图
【youcans 的 OpenCV 例程200篇】94. 算术平均滤波器
【youcans 的 OpenCV 例程200篇】95. 几何均值滤波器
【youcans 的 OpenCV 例程200篇】96. 谐波平均滤波器
【youcans 的 OpenCV 例程200篇】97. 反谐波平均滤波器
【youcans 的 OpenCV 例程200篇】98. 统计排序滤波器
【youcans 的 OpenCV 例程200篇】99. 修正阿尔法均值滤波器
【youcans 的 OpenCV 例程200篇】100. 自适应局部降噪滤波器
【youcans 的 OpenCV 例程200篇】101. 自适应中值滤波器
【youcans 的 OpenCV 例程200篇】102. 陷波带阻滤波器的传递函数
【youcans 的 OpenCV 例程200篇】103. 陷波带阻滤波器消除周期噪声干扰
【youcans 的 OpenCV 例程200篇】104. 运动模糊退化模型
【youcans 的 OpenCV 例程200篇】105. 湍流模糊退化模型
【youcans 的 OpenCV 例程200篇】106. 退化图像的逆滤波
【youcans 的 OpenCV 例程200篇】107. 退化图像的维纳滤波
【youcans 的 OpenCV 例程200篇】108. 约束最小二乘方滤波
【youcans 的 OpenCV 例程200篇】109. 几何均值滤波
【youcans 的 OpenCV 例程200篇】110. 投影和雷登变换
【youcans 的 OpenCV 例程200篇】111. 雷登变换反投影重建图像

【youcans 的 OpenCV 例程 200 篇】111. 雷登变换反投影重建图像相关推荐

  1. 【youcans 的 OpenCV 例程 200 篇】112. 滤波反投影重建图像

    欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中 欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中 [youcans 的 OpenCV 例程 2 ...

  2. 【OpenCV 例程 300 篇】112. 滤波反投影重建图像

    专栏地址:『youcans 的 OpenCV 例程 300篇 - 总目录』 [第 7 章:图像复原与重建] 110. 投影和雷登变换 111. 雷登变换反投影重建图像 112. 滤波反投影重建图像 [ ...

  3. 【youcans 的 OpenCV 例程200篇】158. 阈值处理之固定阈值法

    欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中 欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中 [youcans 的 OpenCV 例程20 ...

  4. 【youcans 的 OpenCV 例程200篇】157. 霍夫变换直线检测

    欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中 欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中 [youcans 的 OpenCV 例程20 ...

  5. 【youcans 的 OpenCV 例程200篇】152. 边缘检测之 LoG 算子

    欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中 欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中 [youcans 的 OpenCV 例程20 ...

  6. 【youcans 的 OpenCV 例程200篇】150. 边缘检测梯度算子

    欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中 欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中 [youcans 的 OpenCV 例程20 ...

  7. 【youcans 的 OpenCV 例程200篇】149. 图像分割之边缘模型

    欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中 欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中 [youcans 的 OpenCV 例程20 ...

  8. 【youcans 的 OpenCV 例程200篇】147. 图像分割之孤立点检测

    欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中 欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中 [youcans 的 OpenCV 例程20 ...

  9. 【youcans 的 OpenCV 例程200篇】144. 基于灰度形态学的纹理分割

    欢迎关注 『youcans 的 OpenCV 例程 200 篇』 系列,持续更新中 欢迎关注 『youcans 的 OpenCV学习课』 系列,持续更新中 [youcans 的 OpenCV 例程20 ...

最新文章

  1. 程序员面试题精选100题(27)-二元树的深度[数据结构]
  2. 成功解决ImportError: Something is wrong with the numpy installation. While importing we detected an olde
  3. Android系统中的进程管理:内存的回收
  4. GitHub 2W 星:一键生成前后端代码
  5. 我犯的错误--struts标签s:radio
  6. Chrome 或将于2018年正式弃用 HPKP 公钥固定标准
  7. Silverlight Code Samples
  8. Linux Watchdog Test Program
  9. 计算机中的管理应用,计算机在企业管理中应用_29067.doc
  10. 安利个数据库工具dbeaver
  11. 【java】信号量机制
  12. 通俗讲解光线追踪原理,一文理清各类光线追踪
  13. 黑群晖Apache Http Server 启动失败错误
  14. 区块链去中心化有什么优势?
  15. 出现“未报告的异常错误,必须对其进行捕获或声明以便抛出”的解决
  16. 计算机集中控制系统结构上和DCS基本一致,dcs集中控制系统
  17. 计算机设备维修预算申,维修费用申请报告
  18. 使得法国文化公司的根深蒂固
  19. 基于BOC的信号捕获
  20. 深度学习PyTorch,TensorFlow中GPU利用率较低,CPU利用率很低,且模型训练速度很慢的问题总结与分析

热门文章

  1. Springboot中几个层的功能总结
  2. 【java8新特性】——方法引用(四)
  3. JAVA WEB篇4——Filter、Listener
  4. 11 - java构造方法
  5. 是人是谁_谁是白鹤滩最可爱的人
  6. c语言中字符占用的存储单元,C语言知识点第1章.doc
  7. centos安装mysql卡住_CentOS 6.4安装MySQL的过程中出现的bug
  8. 苹果平板怎么卸载软件_怎么很好的卸载流氓软件!
  9. php cgi漏洞,Nginx + PHP CGI的一个可能的安全漏洞
  10. 高并发负载均衡——网络协议原理