2

我正在寻找 R 中氡变换的实现。我知道的唯一一个在 package 中PET。但是,它并没有给我预期的结果。我正在使用维基百科页面中的示例

在此处输入图像描述

require(png)
require(EBImage)
require(RCurl)
require(PET)

im <- readPNG( getBinaryURL( "http://upload.wikimedia.org/wikipedia/en/thumb/e/e5/Shepp_logan.png/170px-Shepp_logan.png" ) )[,,1]
rad = radon(im)$rData
# Normalize intensity values from 0-1
rad = normalize(rad)

display(t(im))
display(t(rad))

我得到这张图片:

在此处输入图像描述

当我期望:

在此处输入图像描述

我是否错误地使用了函数的参数?我对氡变换的细节不太熟悉

4

1 回答 1

0

Look at the figures closer: both figures are the same, just shifted 90 degrees.
Recall the Radon transform just does line integrals across different degrees, it shouldn't matter whether it's transposed or not.
Also, the package PET is gone, and there does not seem to be another radon function in cran.
To install the latest PET you can do:

devtools::install_github('cran/PET')
于 2020-08-21T03:43:22.907 回答