Omar Wagih
Omar Wagih

Reputation: 8742

Radon transform in R

I'm looking for an implementation of the radon transform in R. The only one I know of is in the package PET. However, it's not giving me the results I expect. I am using the example from the wikipedia page

enter image description here

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))

I get this image:

enter image description here

when I expect:

enter image description here

Am I using the parameters of the function incorrectly? I'm not too familiar with the details of radon transform

Upvotes: 3

Views: 968

Answers (1)

Car Loz
Car Loz

Reputation: 123

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')

Upvotes: 1

Related Questions