From Radon2D to Image
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with the pylops.signalprocessing.Radon2D entry point and the coordinate values used in the issue's example. Determine how the reported theta and px values correspond to the spatial image, then explain how to draw the associated line. Done means the coordinate interpretation and line overlay are clear; the issue does not name a test or documentation file.
由索引模型根据 Issue 内容生成。
描述
I have a 2D binary image.
I get the sinogram of this with RADON2D.
Next I want to draw the line corresponding to the maximum value cell in the sinogram over my binary image in the spatial domain.
I get the theta and px values of the max valued cell in the sinogram, but I don't know how to draw the line on the image using these values.
Thank you
import matplotlib.pyplot as plt
import numpy as np
import pylops
plt.close("all")
nt, nh = 80, 200
npx, pxmax = 200, 199
dt, dh = 1, 1
t = np.arange(nt) * dt
h = np.arange(nh) * dh
px = np.linspace(0, pxmax, npx)
x = np.zeros((npx, nt)) # npx: satır: 200, nt:sütun:80
kk=np.arange(50);
x[kk+10,kk+15] = 1
kk=np.arange(80);
x[kk+25,8] = 1
RLop = pylops.signalprocessing.Radon2D(t, h, px, centeredh=True, kind="linear", interp=False, engine="numpy")
yL = RLop * x.ravel()
yL = yL.reshape(nh, nt) # nh: satır: 200, nt:sütun:80
Max = yL.max(); #print(Max)
xx,yy = np.where(yL==yL.max()); #print("xx:",xx," yy:",yy," yL[max]:",yL[100][8])
ph, pt = h[xx[0]], t[yy[0]]; #print("ph:",ph," pt:",pt)
fig, axs = plt.subplots(1, 2, figsize=(10, 6))
axs[0].imshow(x.T, vmin=-1, vmax=1, cmap="seismic_r", extent=(px[0], px[-1], t[-1], t[0]))
axs[0].set_title("Input model")
axs[0].axis("tight")
axs[1].imshow(yL.T, vmin=-1, vmax=1, cmap="seismic_r", extent=(h[0], h[-1], t[-1], t[0]))
axs[1].set_title("Linear Result")
axs[1].axis("tight")
- 主要语言
- Python
- 星标
- 539
- 派生
- 126
- 平均合并
- 2 天 17 小时
- 30 天内合并 PR
- 21
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
PyLops/pylops 的其他 Issue
-
Lipschitz method可能已有人在做 @Megumi1773 于 26 天前认领。 未关闭enhancement good first issue
难度 4/5 3-5 天 新手友好度 25/100
维护者通常 2 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 45/100
维护者通常 2 天内回复
-
CI
难度 3/5 1-2 天 新手友好度 52/100
维护者通常 2 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 25/100
维护者通常 2 天内回复
-
难度 3/5 1-2 天 新手友好度 38/100
PyLops/pylops#731 · 4 条评论 · 1 个 reaction ·
维护者通常 2 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
unionai-oss/pandera#2640 ·
维护者通常 2 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
JdeRobot/RoboticsInfrastructure#843 ·
维护者通常 1 天内回复
-
automated endpoint-dead needs-curation
难度 2/5 1-3 小时 新手友好度 62/100
almanac-data/climate-almanac#122 ·
维护者通常 1 天内回复
-
area:harness enhancement
难度 2/5 1-3 小时 新手友好度 75/100
evarness-ai/iris-harness#420 ·
-
难度 2/5 1-3 小时 新手友好度 85/100
suitenumerique/find#206 ·
维护者通常 2 天内回复