File:Shepp-logan kernel.svg

Summary

Description
English: Plot of the Shepp-Logan kernel, used for filtered backprojection image reconstruction. Details: Azriel Rosenfeld, Avinash C. Kak (1982) Digital image processing and analysis
Date
Source Own work
Author Geek3
SVG development
InfoField
Source code
InfoField

Matplotlib source code

The plot was generated with Matplotlib
#! /usr/bin/env python3
# -*- coding:utf8 -*-

import matplotlib.pyplot as plt
import numpy as np
from math import *


def shepp_logan(x):
    return 2. / (pi * pi * (1 - 4. * x * x))

N = 18
xlim = -8, 8
xd = np.arange(-8, 9)
kernel = shepp_logan(xd)

plt.figure(figsize=(5, 3.5))

xa = np.linspace(*xlim, 801)
ys = (0.5 / pi**2) * (1 - 2 * xa * np.sin(pi*xa)) / (0.25 - xa * xa)
ys[xa*xa==0.25] = 1. / (pi * pi)

plt.plot(xd, kernel, "o-", label="discrete")
ya = shepp_logan(xa)
ya[xa==0] = float(nan)
plt.plot(xa, ya, "--", color="#bbbbbb", zorder=1.8, label=r"$2/(\pi^2 (1 - 4x^2))$")

annotate_args = {"va":"center", "ha":"left", "xytext":(12, 0), "zorder":1.7,
    "textcoords":"offset points", "fontsize":14,
    "bbox":{"fc":"white", "ec":"none"} }
plt.annotate(r"$\frac{2}{\pi^2}$", (0, shepp_logan(0)), **annotate_args)
plt.annotate(r"$\frac{-2}{3\pi^2}$", (1, shepp_logan(1)), **annotate_args)

plt.grid(True)
plt.xlim(*xlim)
plt.ylim(-0.1, 0.23)
plt.legend(loc="upper left", framealpha=1, borderaxespad=1.0, borderpad=0.6)
plt.tight_layout()
plt.savefig("Shepp-logan kernel.svg")

Licensing

I, the copyright holder of this work, hereby publish it under the following license:
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 4.0 International license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
Category:CC-BY-SA-4.0#Shepp-logan%20kernel.svg
Category:Self-published work Category:Filtered backprojection
Category:CC-BY-SA-4.0 Category:Filtered backprojection Category:Self-published work Category:Valid SVG created with Matplotlib code