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 index e69de29..d75ee96 100644 --- 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 @@ -0,0 +1,46 @@ +\shortdefinition[Scale Space] Collection of img at diff scales \& smooth. + +\shortremark Finite diff. for $\frac{\partial f(x, y)}{\partial x} \approx \frac{f(x + 1, y) - f(x, y)}{1}$,\\ +filter: $[1, -1]$. Can use par der. for edge detection + +\shortdefinition[Gradient] $\nabla f = [\frac{\partial f}{\partial x}, \frac{\partial f}{\partial y}]$, dir of most rapid change. +\bi{Edge strength} (magnitude): $M(x, y) = ||\nabla f||$.\\ +Noise makes edge detection hard, smooth first, then edge is peak in $\pardiff{x}(h * f)$. +\bi{Angle} $\alpha(x, y) = \arctan \left( \frac{\partial f}{\partial y} \div \frac{\partial f}{\partial x} \right)$ + +\shorttheorem $\pardiff{x}(h * f) = \left( \pardiff{x} h \right) * f$ + +\shortdefinition[Laplacian] $\nabla^2 f = \frac{\partial^2 f}{\partial^2 x} + \frac{\partial^2 f}{\partial^2 y}$ + +\shortdefinition[LoG] $\nabla^2 G(x, y) = \frac{1}{2\pi \sigma^2} \left( \frac{x^2 + y^2 - 2\sigma^2}{\sigma^2} \right)\exp\left( -\frac{x^2 + y^2}{2 \sigma^2} \right)$\\ +Edge is at zero-crossing of $\left( \pardiffn{x}{2} h \right) * f$. $\sigma$ affects scale of edges detected (larger $\sigma$ = stronger edges) + +\shortdefinition[Canny E.D.] \bi{1} smooth w/ Gaussian, \bi{2} gradient magnitude \& angle, \bi{3} Nonmaxima suppression to gradient mag. image, +\bi{4} double thresholding to detect strong and weak edge pixels, \bi{5} reject weak edge pixels not connected with strong edge pixels + +\shortdefinition[Non-Max-Suppression] Quantize edge normal to four dir, if $M(x, y)$ smaller than either neighbour in dir, suppress, else keep + +\shortdefinition[Thresholding] Via thresholds $\theta_\text{high} \div \theta_\text{low} \in [2, 3]$ (typ) + +\subsubsection{Line Fitting} +Generally challenging, missing information + +\shortdefinition[RANSAC] Random Sample Consensus: +\begin{enumerate} + \item Rand. sel. \textit{seed group} of p. w/ base transf. est. + \item Compute transformation from seed group + \item Find \textit{inliers} to this transformation + \item If inliers sufficiently large, recompute least-squares estimate of transformation on all inliers +\end{enumerate} +Sample count: $w$ frac of inliers, $n$ points define hypothesis ($n = 2$ for lines), $k$ samples chosen. +Prob. sample of $n$ points correct: $w^n$, prob all $k$ samples fail: $(1 - w^n)^k$, i.e. \hl{choose $k$ high to keep below failure rate} + + + +\shortdefinition[Hough Transform] Voting technique, main idea: +\begin{enumerate} + \item Vote for all possible lines on which edge could lie + \item Look for line candidates that get many votes + \item Noise features votes should be inconsistent +\end{enumerate} +% TODO: Explore how it works in detail 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 index 83f3e99..af79ec2 100644 --- a/core/vc/cheat-sheet-jh/parts/00_computer-vision/main.tex +++ b/core/vc/cheat-sheet-jh/parts/00_computer-vision/main.tex @@ -2,9 +2,9 @@ \subsection{Digital Image} \input{parts/00_computer-vision/00_digital-image.tex} -\subsection{Filtering} +\subsection{Filtering \& Convolution} \input{parts/00_computer-vision/01_filtering.tex} -\subsection{Convolution} -\input{parts/00_computer-vision/02_convolution/00_basics.tex} +\subsection{Edge Detection} +\input{parts/00_computer-vision/02_edge-detection.tex} % \input{parts/00_computer-vision/} diff --git a/core/vc/cheat-sheet-jh/vc-cheat-sheet.pdf b/core/vc/cheat-sheet-jh/vc-cheat-sheet.pdf index a43e2a9..4559a18 100644 Binary files a/core/vc/cheat-sheet-jh/vc-cheat-sheet.pdf 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 ff272cd..6373bc0 100644 --- a/core/vc/cheat-sheet-jh/vc-cheat-sheet.tex +++ b/core/vc/cheat-sheet-jh/vc-cheat-sheet.tex @@ -14,13 +14,14 @@ \renewcommand{\theoremShortNamingEN}{Thm} \renewcommand{\descriptorNameDisplay}[1]{\textbf{#1}} -\setupCheatSheet{Visual Computing} +\setupCheatSheet[0.5cm]{Visual Computing} \begin{document} \startDocument \noverticalspacing +% TODO: Shorten significantly \input{parts/00_computer-vision/main.tex}