MATLAB 如何将 pol2cart 复数插值到笛卡尔网格上?
我的任务是从正弦图创建二维图像。我有以下内容:
function recon = fourier(sinogram, interpolation)
tic;
[rows cols] = size(sinogram);
% calculate 1D FFT of the sinogram
% fftSino = ...;
fftSino = fft(sinogram);
% prepare the coordinate system change
cartesianX = 0:1/(cols-1):1;
cartesianY = -1:2/(rows-1):1;
[x y] = meshgrid(-1:2/(rows-1):1);
ySign = y < 0;
polarAngle = ~ySign - atan2(y, x) / pi;
polarRadius = sqrt(x.^2 + y.^2) .* (ySign - ~ySign);
%%
% perform coordinate system change
fftSinoInterp = pol2cart(polarAngle, polarRadius);
但现在我不知道如何将复数插值到我的笛卡尔网格上。 谁能告诉我使用什么函数和什么参数? 我查看了 interp2,但我不知道 XY Z 使用什么。我也不知道 interp1 或 TriScatteredInterp 在这里如何工作。
I have an assignment to create a 2D image from a Sinogram. I have the following:
function recon = fourier(sinogram, interpolation)
tic;
[rows cols] = size(sinogram);
% calculate 1D FFT of the sinogram
% fftSino = ...;
fftSino = fft(sinogram);
% prepare the coordinate system change
cartesianX = 0:1/(cols-1):1;
cartesianY = -1:2/(rows-1):1;
[x y] = meshgrid(-1:2/(rows-1):1);
ySign = y < 0;
polarAngle = ~ySign - atan2(y, x) / pi;
polarRadius = sqrt(x.^2 + y.^2) .* (ySign - ~ySign);
%%
% perform coordinate system change
fftSinoInterp = pol2cart(polarAngle, polarRadius);
But now I do not know how to interpolate the complex numbers onto my Cartesian grid.
Can anyone give me a hint on what function to use with what parameters?
I looked at interp2, but I could not figure out what to use for X Y Z. Also I do not know how interp1 or TriScatteredInterp could work here.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为你真的在尝试进行滤波反投影。您没有指定使用什么角度来生成正弦图,因此您的函数声明不完整;如果您不知道使用了什么角度,重建甚至可能不可能。 pol2cart() 和其余代码在重建图像的上下文中没有做任何有用的事情。
相反,您可能应该使用 iradon()。 请在此页面查看我关于使用 iradon() 的其他答案。
我还建议您阅读“计算机断层成像原理”第 3 章,可在此处获取 免费。滤波反投影算法从第 62 页开始。如果这太困难,您可以阅读 这个学生项目。
I think you're really trying to do filtered backprojection. You do not specify what angles were used to generate your sinogram, so your function declaration is incomplete; reconstruction may not even be possible if you do not know what angles were used. pol2cart() and the rest of your code does not do anything useful in the context of reconstructing an image.
Instead, you should probably be using iradon(). Please see my other answer about using iradon() at this page.
I also advise you to read "Principles of Computerized Tomographic Imaging" chapter 3, available here for free. The filtered backprojection algorithm starts on page 62. If that's too difficult, you can read this student project.