Notes for Computing in Medicine (UCL)


Sampling

\(x(t)\rightarrow\text{Analog to digital converter (ADC)}\rightarrow x[\underbrace{n}_{\text{index}}]=x(n\underbrace{T_s}_{\text{period}})=x(\underbrace{t_n}_{\text{time}})\)

Sampling converts an analog signal into a set of values specifying the signal amplitude over pre-set intervals.

Quantization converts the signal amplitude into one of a discrete set of values. (Quantization Error to estimate info loss)

Aliasing

A distortion or artifact that results when the signal reconstructed from samples different from the original continuous signal.

Nyquist Sampling Theorem: \(f_s\geq 2f_{max}\) to achieve anti-aliasing.

Signal spectrum - Fourier Transform

Properties: Linearity, Scaling and Convolution Theorem [conv in f then mult in t, conv in t then mult in f].

Frequency domain

$$\hat{f}(\omega)=\int^\infty_{-\infty}f(t)e^{-i\omega t}dt$$

Time domain

$$f(t)=\int^\infty_{-\infty}\hat{f}(\omega)e^{i\omega t}d\omega$$

Interpolation

The estimation of values between known data points.

Convolution operator

Properties: commutativity, associativity, Distributive, Scaling, Identity and Derivatives.

$$h(t)=f\otimes g=f*g=\int^\infty_{-\infty}f(\tau)g(t-\tau)d\tau$$

Dirac Delta Function (I miss it)

Sifting for multiplication, Shifting for Shifting.

$$\int^\infty_{-\infty}\delta(t)dt = 1$$

where \(\delta(t)=\frac{1}{a\sqrt{\pi}}e^{-t^2/a^2} \text{,}a\rightarrow 0 \)


Discrete Convolution

1D Convolution

$$y[n]=x[n]\otimes y[n]=\sum^\infty_{k=-\infty}x[k]h[n-k]$$

2D Convolution

$$X\otimes G=\sum^\infty_{k=-\infty}\sum^\infty_{l=-\infty}X[i-k,j-l]G[k,l]$$

Equivalence of linear filtering and convolution: \(Y=f[X;G]=X\otimes G_{flip}\).

Example: Identity filter \(\begin{pmatrix}0&0&0\\0&1&0\\0&0&0\end{pmatrix}\), Blurring filter \(\frac{1}{9}\begin{pmatrix}1&1&1\\1&1&1\\1&1&1\end{pmatrix}\), sharpening filter \(\frac{1}{9}\begin{pmatrix}1&1&1\\1&17&1\\1&1&1\end{pmatrix}\), sobel filter (for edge detection) \(\begin{pmatrix}1&2&1\\0&0&0\\-1&-2&-1\end{pmatrix}\).

Filtering at image boundaries

Choose how pixel values are defined outside the image during convultion. -- constant: zero padding/ replication, varying: mirror/periodic.

TODO

Parts 3-5: black screen comp, Desktop/3rd year/Computing in Medicine/General/DSIP

References