TAG: c++

A little place for me to spew hot crazy on you.

# C++11 Convolution

Convolution Image convolution is one the easiest techniques to learn in computer vision and it's a technique that illustrates the power of local feature detection better than weeks of lecture. In principle, convolution involves nothing more than repeatedly applying an NxN matrix to a pixel and its neighbors. Depending on the matrix scalars several different effects can be achieved: Blur Edge Detection <--- Let's focus on this Sharpen Edge detection is one of the fundamental…

# Free-Form Deformation Part 2

Awhile back I wrote a short post on free form deformation using the Sederberg/Parry paper Free-From Deformation of Solid Geometric Models.  That version of my code was based on a school project and contained a lot of unnecessary functionality.  So I present you with Free-From Deformation version 2.0.  The unnecessary bits and 3rd party dependencies are gone, replaced by a dependency on Unity3D.  My code is incredibly simple, adapting it to another framework won't…

C++11 (C++0x) introduced native support for multihreading.  Prior to this it was necessary to use 3rd party libraries (like pthreads) to write threaded code, but these libraries were OS specific.  Several other libraries, like Boost, did a nice job of wrapping OS specific threading up in to well defined frameworks.  The problem with Boost is it's like replacing a lightbulb with a power company, a glass company, and a company that makes filaments.  What…

Here is an old script to apply a gaussian blur to an image using a 5x5 convolution matrix (see Kernel as well) based on the following formula: $G(x,y)=\frac{1}{2\pi\sigma^{2}}\epsilon^{-(x^{2}+y^{2})/2\sigma^{2}}$ Original script used CImg version 1-13 (something like 30 revisions ago :) ) I think my snippet is easy enough to follow that the image library I used shouldn't really matter.…