Skip to content
Snippets Groups Projects
Commit 91d8f616 authored by Erik Strand's avatar Erik Strand
Browse files

Add outtakes section

parent 68e5a601
Branches
No related tags found
No related merge requests found
assets/img/project_cool_1.png

297 KiB

assets/img/project_cool_2.png

181 KiB

assets/img/project_cool_3.png

158 KiB

assets/img/project_cool_4.png

354 KiB

assets/img/project_transform_im.png

128 KiB

assets/img/project_transform_re.png

49.2 KiB

assets/img/project_transform_swapped_im.png

129 KiB

assets/img/project_transform_swapped_re.png

49.6 KiB

......@@ -143,6 +143,46 @@ specifically for polar resampling for CT reconstruction, but there are better al
anyway so I'll move on.
### Outtakes
I got a number of interesting failures before getting my code to work correctly.
![outtake](../assets/img/project_cool_1.png)
![outtake](../assets/img/project_cool_2.png)
![outtake](../assets/img/project_cool_3.png)
![outtake](../assets/img/project_cool_4.png)
These all started as attempts to project and reconstruct a disk, though I did experiment once
interesting mistakes started happening. They mostly result from indexing errors and an issue with my
integration with FFTW. The latter problem relates to the periodicity of discrete Fourier transforms
and the resulting ambiguity in frequency interpretation. In a nutshell, the DFT doesn't give you
samples of the continuous Fourier transform; it gives you samples of the periodic summation of the
continuous Fourier transform. So each sample isn't representative of one frequency, it's
representative of a whole equivalence class of frequencies.
For this application it's very important that the center of the polar coordinate system used for
resampling is right at the DC sample. So though the raw Fourier transform of the image looks like
this (real and imaginary parts shown separately),
![transform](../assets/img/project_transform_swapped_re.png)
![transform](../assets/img/project_transform_swapped_im.png)
we want to permute the quadrants so that it looks like this:
![transform](../assets/img/project_transform_re.png)
![transform](../assets/img/project_transform_im.png)
Then the center of the image can be the center of the polar coordinate system. (Note: to make these
I linearly mapped the full range of each image to [1, e], then applied the natural logarithm. So
though they aren't the same color, both tend toward zero away from the center.) This is akin to
viewing the sample frequencies not as $$0$$, $$1/N$$, $$\ldots$$, $$(N - 1)/N$$, but as $$0$$,
$$1/N$$, $$\ldots$$, $$(N/2 - 1)/N$$, $$-1/2$$, $$\ldots$$, $$-1/N$$.
Interestingly, you can do this by literally swapping quadrants of the image, or by multiplying the
results element-wise by a checker board of 1s and -1s. This seems like magic until you just write
out the math.
## Filtered Back Projection
It would be nice if we could avoid the interpolation required for Fourier reconstruction. The
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment