Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Erik Strand
pit
Commits
2406b4b8
Commit
2406b4b8
authored
6 years ago
by
Erik Strand
Browse files
Options
Downloads
Patches
Plain Diff
Talk about filtered back projection
parent
e6b3a0d4
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
project.md
+86
-5
86 additions, 5 deletions
project.md
with
86 additions
and
5 deletions
project.md
+
86
−
5
View file @
2406b4b8
...
...
@@ -65,11 +65,19 @@ $$
$$
So the Fourier transform of the 1d projection is a 1d slice through the 2d Fourier transform of the
image. Since the x axis is arbitrary (we can rotate the image however we want), this works for other
angles as well. That is, if you project $$f$$ onto the line that makes an angle $$
\t
heta$$ with the
x axis, its Fourier transform is equal to the slice along the corresponding line in frequency space.
This result is known as the Fourier Slice Theorem, and is the foundation of most reconstruction
techniques.
image. This result is known as the Fourier Slice Theorem, and is the foundation of most
reconstruction techniques.
Since the x axis is arbitrary (we can rotate the image however we want), this works for other
angles as well:
$$
\h
at{p}_
\t
heta (
\o
mega) =
\h
at{f} (
\o
mega
\c
os
\t
heta,
\o
mega
\s
in
\t
heta)
$$
where $$p_
\t
heta (r)$$ is the projection of $$f$$ onto the line that forms an angle $$
\t
heta$$ with
the x axis. In other words, the Fourier transform of the 1D x-ray projection at angle $$
\t
heta$$ is
the slice through the 2D Fourier transform of the image at angle $$
\t
heta$$.
Conceptually this tells us everything we need to know about the reconstruction. First we take the 1D
Fourier transform of each projection. Then we combine them by arranging them radially. Finally we
...
...
@@ -102,3 +110,76 @@ interpolate. This step is tricky and tends to introduce a lot of error. I'll rat
algorithms out there that come closer to the theoretically ideal
[
sinc interpolation
](
https://en.wikipedia.org/wiki/Whittaker%E2%80%93Shannon_interpolation_formula
)
.
The popular
[
gridrec
](
https://www.ncbi.nlm.nih.gov/pubmed/23093766
)
method is one.
## Filtered Back Projection
It would be nice if we could avoid the interpolation required for Fourier reconstruction. The
simplest way of doing so, and still the most popular method of performing image reconstruction, is
called filtered back projection.
### Theory
Let's hop back to the continuous theory for a moment. The Fourier reconstruction technique is based
on the fact that $$f$$ can be represented in terms of its projections $$p_
\t
heta$$ in polar
coordinates.
$$
\b
egin{align
*
}
f(x, y)
&=
\i
nt_
\m
athbb{R}
\i
nt_
\m
athbb{R}
\h
at{f}(u, v) e^{2
\p
i i (ux + vy)}
\m
athrm{d}u
\m
athrm{d}v
\\
&=
\i
nt_0^
\p
i
\i
nt_
\m
athbb{R}
\h
at{f}(
\o
mega
\c
os
\t
heta,
\o
mega
\s
in
\t
heta)
e^{2
\p
i i
\o
mega (x
\c
os
\t
heta + y
\s
in
\t
heta)}
\v
ert
\o
mega
\v
ert
\m
athrm{d}
\o
mega
\m
athrm{d}
\t
heta
\\
&=
\i
nt_0^
\p
i
\i
nt_
\m
athbb{R}
\h
at{p}_
\t
heta(
\o
mega)
e^{2
\p
i i
\o
mega (x
\c
os
\t
heta + y
\s
in
\t
heta)}
\v
ert
\o
mega
\v
ert
\m
athrm{d}
\o
mega
\m
athrm{d}
\t
heta
\\
\e
nd{align
*
}
$$
Instead of using interpolation to transform the problem back to cartesian coordinates where we can
apply the usual (inverse) DFT, we can directly evaluate the above integral.
To simplify things a bit, note that the integral over $$
\o
mega$$ is itself a one dimensional inverse
Fourier transform. In particular if we define
$$
q_
\t
heta(
\o
mega) =
\h
at{p}_
\t
heta(
\o
mega)
\v
ert
\o
mega
\v
ert
$$
then the inner integral is just
$$
\m
athcal{F}^{-1}
[
q_\theta
](
x
\c
os
\t
heta + y
\s
in
\t
heta)
$$
So overall
$$
f(x, y) =
\i
nt_0^
\p
i
\m
athcal{F}^{-1}
[
q_\theta
](
x
\c
os
\t
heta + y
\s
in
\t
heta)
\m
athrm{d}
\t
heta
$$
### Discretization
We'll replace the continuous Fourier transforms with DFTs as before.
The only remaining integral (i.e. that's not stuffed inside a Fourier transform) is over $$
\t
heta$$,
so most quadrature techniques will want samples of the integrand that are evenly spaced in
$$
\t
heta$$. We want the pixels in our resulting image to lie on a cartesian grid, so our integrand
samples should be evenly spaced in $$x$$ and $$y$$ as well.
How do we compute $$
\m
athcal{F}^{-1}[q_
\t
heta]$$? We are given samples of $$p_
\t
heta(r)$$ on a polar
grid. Using the DFT, we can get samples of $$
\h
at{p}_
\t
heta(
\o
mega)$$. They will be for the same
$$
\t
heta$$ values, and evenly spaced frequency values $$
\o
mega$$. So if we just multiply by $$
\v
ert
\o
mega
\v
ert$$, we get the corresponding samples of $$q_
\t
heta(
\o
mega)$$. Finally we just take the
inverse DFT and we have samples of $$
\m
athcal{F}^{-1}[q_
\t
heta]$$ on a polar grid -- namely at the
same $$(r,
\t
heta)$$ points we started out with.
This works out perfectly for $$
\t
heta$$: we can take the samples we naturally end up with and use
them directly for quadrature. For $$r$$, on the other hand, the regular samples we end up with won't
line up with the values $$x
\c
os
\t
heta + y
\s
in
\t
heta$$ that we want. So we'll still have to do
some interpolation. But now it's a simple 1D interpolation problem that's much easier to do without
introducing as much error. In particular, we only have to do interpolation in the spatial domain, so
errors will only accumulate locally.
[
Lanczos
resampling
](
https://en.wikipedia.org/wiki/Lanczos_resampling
)
would probably be the best, but I'll
just use Catmull-Rom again since I already have it implemented.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment