diff --git a/core/cd/summary/cd-summary.pdf b/core/cd/summary/cd-summary.pdf index f572f71..f420ff0 100644 Binary files a/core/cd/summary/cd-summary.pdf and b/core/cd/summary/cd-summary.pdf differ diff --git a/core/vc/cheat-sheet-jh/parts/00_computer-vision/00_digital-image.tex b/core/vc/cheat-sheet-jh/parts/00_computer-vision/00_digital-image.tex new file mode 100644 index 0000000..2068a34 --- /dev/null +++ b/core/vc/cheat-sheet-jh/parts/00_computer-vision/00_digital-image.tex @@ -0,0 +1,32 @@ +\shortdefinition[Image] $f : \R^n \rightarrow S$, +for greyscale $n = 2$, $S = \R^+$, +in digital form: $I : \{ 1, \ldots, X \} \times \{ 1, \ldots, Y \} \rightarrow S$ + +\shortremark Pinhole size affects blur, \bi{Lens Camera} as sol. + +\shortremark Charge Coupled Device (CCD) sensor reads line-by-line (rolling shutter), then each line pixel-by-pixel + +\shortdefinition[Sensor array] is an array of \textit{photosites} (bucket of el. charge $\propto$ light intensity), then read via ADC. + +\shortremark[Blooming] Caused by photosite saturation + +\shortdefinition[Dark Current] CCDs give non-zero output in darkness, fluctuates randomly + +\shortdefinition[CMOS Sensor] Each photo sensor has own amplifier, {\color{red} more noise, lower sensitivity}, {\color{ForestGreen} ``smart'' pixels bc. CMOS} + +\shortdefinition[Sampling] Repeated measurement on certain interval, \bi{Reconstruction} is inverse. +Issues: \bi{undersampling} (lose information), \bi{oversampling} (too large files). + +\shortdefinition[Nyquist Frequency] highest signal freq that can be accurately captured, half of sampling rate + +\shortdefinition[Quantization] Lossy discretization of analogue value, simple versions have $k = 2^b$ values for $b$ bits + +\shortremark Quantization ``on'' $y$-axis, Sampling ``along'' $x$-axis + +\shortdefinition[Res.] Geometric: PPI; Radiometric: Bits/Pixel + +\shortdefinition[Signal-Noise-R.] (SNR) Image quality index: $s = F \div \sigma$, with $F = \frac{1}{XY}\sum_{x = 1}^{X} \sum_{y = 1}^{Y} f(x, y)$. + +\shortdefinition[Add. Gaussian Noise] $I(x, y) = f(x, y) + c$, with $c \sim \cN(0, \sigma^2)$, s.t. $p(c) = \frac{1}{\sqrt{2\pi \sigma^2}}e^{-\frac{c^2}{2 \sigma^2}}$ + +\shortdefinition[Poisson Noise] $p(k) = \frac{\lambda^k e^{-\lambda}}{k!}$ diff --git a/core/vc/cheat-sheet-jh/parts/00_computer-vision/01_filtering.tex b/core/vc/cheat-sheet-jh/parts/00_computer-vision/01_filtering.tex new file mode 100644 index 0000000..aea7d93 --- /dev/null +++ b/core/vc/cheat-sheet-jh/parts/00_computer-vision/01_filtering.tex @@ -0,0 +1,31 @@ +\shortdefinition[Moving Average] New image $G$ where $G[x, y]$ is average of surrounding pixels and $F[x, y]$ + +\shortdefinition[Linear Shift-Invariant Filter.] New pixels lin. comb. of neighbours, \textit{shift-invariant} = doing same for all pixels. +Good for: smoothing, noise reduction, sharpening + +\shortdefinition[Linear Operation] $L$ lin. if $L[\alpha I_1 + \beta I_2] = \alpha L[I_1] + \beta L[I_2]$, $I'_j = \sum_{i = 1}^{N} \alpha_{ij} I_i$ for $j \in \{ 1, \ldots, N \}$ + +\shortdefinition[Linear Filtering] $I'(x, y) = \sum_{(i, j) \in N(x, y)} K(i, j) I(x + i, y + j)$ with $I$ the input image and $K$ the \bi{kernel} of operation, +$N(x, y)$ neighbourhood function for pixel $(x, y)$. Shift-Invariant if $K$ doesn't depend on $(x, y)$ (i.e. same weights everywhere) + +\shortdefinition[Kernel] Typically matrix, center of matrix is $(0, 0)$ + +\shortdefinition[Correlation] $\displaystyle I'(x, y) = \sum_{j = -k}^{k} \sum_{i = -k}^{k} K(i, j) I(x + i, y + j)$ + +\shortdefinition[Conv.] $\displaystyle I'(x, y) = \sum_{j = -k}^{k} \sum_{i = -k}^{k} K(-i, -j) I(x + i, y + j)$ +Gen.: $g(x) = (f * h)(x) = \int_{-\8}^{\8} f(\tau)h(x - \tau) \dx \tau$, $h(\tau)$ kernel + +\shortremark If $K(i, j) = K(-i, -j)$, then Convolution = Corr. + +\shortremark Convolution is linear: $[(af + bg) * h](x) = a(f * h)(x) + b(g * h)(x)$, commutative: $(f * h)(x) = (h * f)(x)$, +associative: $(f * g) * h = f * (g * h)$; Diff: $\diff{x} (f * h)(x) = f * h'$ + +% TODO: Consider what examples to put here for linear filters + +\shortremark At edge of image, extrapolate, options: clip filter (black), wrap around, copy edge, reflect across edge + +\shortdefinition[Gaussian Kernel] $G_\sigma = \frac{1}{2 \pi \sigma^2}e^{\frac{x^2 + y^2}{2\sigma^2}}$. +The smooting amount depends on $\sigma$ and window size. + +\shortremark $g(x, y) = g(x) g(y)$, with $g(x) = \frac{1}{\sqrt{2\pi \sigma^2}}\exp\left( -\frac{x^2}{2\sigma^2} \right)$. +Efficient implementation: First rows 1D, then cols 1D diff --git a/core/vc/cheat-sheet-jh/parts/00_computer-vision/02_edge-detection.tex b/core/vc/cheat-sheet-jh/parts/00_computer-vision/02_edge-detection.tex new file mode 100644 index 0000000..e69de29 diff --git a/core/vc/cheat-sheet-jh/parts/00_computer-vision/main.tex b/core/vc/cheat-sheet-jh/parts/00_computer-vision/main.tex new file mode 100644 index 0000000..83f3e99 --- /dev/null +++ b/core/vc/cheat-sheet-jh/parts/00_computer-vision/main.tex @@ -0,0 +1,10 @@ +\section{Computer Vision} +\subsection{Digital Image} +\input{parts/00_computer-vision/00_digital-image.tex} + +\subsection{Filtering} +\input{parts/00_computer-vision/01_filtering.tex} + +\subsection{Convolution} +\input{parts/00_computer-vision/02_convolution/00_basics.tex} +% \input{parts/00_computer-vision/} diff --git a/core/vc/cheat-sheet-jh/parts/01_computer-graphics/00_basics.tex b/core/vc/cheat-sheet-jh/parts/01_computer-graphics/00_basics.tex new file mode 100644 index 0000000..e69de29 diff --git a/core/vc/cheat-sheet-jh/parts/01_computer-graphics/main.tex b/core/vc/cheat-sheet-jh/parts/01_computer-graphics/main.tex new file mode 100644 index 0000000..e69de29 diff --git a/core/vc/cheat-sheet-jh/vc-cheat-sheet.pdf b/core/vc/cheat-sheet-jh/vc-cheat-sheet.pdf new file mode 100644 index 0000000..a43e2a9 Binary files /dev/null and b/core/vc/cheat-sheet-jh/vc-cheat-sheet.pdf differ diff --git a/core/vc/cheat-sheet-jh/vc-cheat-sheet.tex b/core/vc/cheat-sheet-jh/vc-cheat-sheet.tex index fd20fc1..ff272cd 100644 --- a/core/vc/cheat-sheet-jh/vc-cheat-sheet.tex +++ b/core/vc/cheat-sheet-jh/vc-cheat-sheet.tex @@ -1,17 +1,31 @@ \documentclass{article} +\PassOptionsToPackage{skip=0pt}{parskip} + \input{../../../helpers.tex} \usepackage{lmodern} \setFontType{sans} +\renewcommand{\numberingpreset}{off} +\renewcommand{\definitionShortNamingEN}{Def} +\renewcommand{\remarkShortNamingEN}{Rem} +\renewcommand{\lemmaShortNamingEN}{Lem} +\renewcommand{\theoremShortNamingEN}{Thm} +\renewcommand{\descriptorNameDisplay}[1]{\textbf{#1}} + \setupCheatSheet{Visual Computing} \begin{document} \startDocument +\noverticalspacing +\input{parts/00_computer-vision/main.tex} + +\input{parts/01_computer-graphics/main.tex} + \end{document}