Posts

Showing posts from September, 2018

Analyzing Images in Fourier Space

Image
Last activity, we played around with images in Fourier space. Given a periodic function \(f(t)\) with fundamental period \(T\) such that \(f(t+T)=f(t)\) that has a finite number of finite discontinuities and finite number of extreme values within the interval \([a,a+T]\) for all \(a\in\mathbb{R}\), then \(f(t)\) can be rewritten as: \begin{equation}\label{fseries}f(t)=\dfrac{a_0}{2}+\sum_{n=1}^\infty a_n\cos(nt)+\sum_{n=1}^\infty b_n\sin(nt)\end{equation} [1]. This means that any periodic function, or signal, can be decomposed as a sum of sines and cosines of different frequencies with different contributions. To get the contribution of each frequency of sines and cosines to get \(f(t)\), what we can do is to obtain its Fourier transform, \(\mathscr{F}\{f(t)\}=F(\omega)\) given by: \begin{equation}\label{1d_ft}F(\omega)=\int_{-\infty}^\infty f(t)\mathrm{e}^{-\mathrm{i}2\pi\omega t}\,\mathrm{d}t\end{equation} [2]. This can even be extended to work for functions dependent on two func...

Estimating Areas in Images

Image
Last lab session, we were told that we can estimate areas of shapes found in images - nice! To do so however, we had to make use of the consequence of a very mathematical thing - Green's Theorem. It's been very long since I last seen this kind of math so please let me do so here. Green's Theorem states that if you have two functions \(M(x,y)\) and \(N(x,y)\) which have continuous first partial derivatives on a region \(R\) in a plane, then if the curve \(C\) bounding \(R\) is a sectionally smooth simple closed curve in that plane, then: \begin{equation}\label{green}\iint_R\left(\dfrac{\partial N}{\partial x}-\dfrac{\partial M}{\partial y}\right)\,\mathrm{d}x\,\mathrm{d}y=\oint_C\left[M(x,y)\,\mathrm{d}x+N(x,y)\,\mathrm{d}y\right]\end{equation} [1] This meant that one way to evaluate the integral on the right hand side of \eqref{green} is to evaluate the integral on its left hand side, and vice versa - assuming the conditions on \(M(x,y)\) and \(N(x,y)\) are met. Looki...