Fourier descriptors in 2D

This simple java application provides an educational tool for understanding of two dimensional Fourier descriptors using several examples.

Quick start

After execution of the application, the user can load its own images or use the preloaded templates by selecting Templates->Objects or Templates->Shapes in the horizontal menu bar.

Fig. 1

The loaded image should be a binary (black & white) image with just one compact component. If not, the image is first thresholded and the user is asked to select one of the components to be further processed.

The processed compact component is uniquely described by its contour points. The (x,y) coordinates of each points can be understood as one complex number z=x+iy. After collecting all the contour points, their (x,y) coordinates are converted into the complex numbers, which gives a simple 1D complex signal. This can be straightforwardly transformed into frequency domain by getting so called Fourier descriptor of a given object.

Keeping in mind that not all the high frequency Fourier coefficients are necessary for visual representation, we can neglect some of them by changing the number of used descriptors. The user can change this number either manually by using the numerical keyboard or alternatively by moving the slide bar from Min to Max value. For more detailed information, the user can select Tools->View Raw Data in the horizontal menu.

Fig. 2

Using fewer descriptors we loose the details and the contour becomes smoother and smoother. One can see than only small amount of descriptors is sufficient for the recongnition of the original shape.

Good to know: Just one descriptor defines a point in 2D plane. Two descriptors define a circle. Three of them define an ellipse, etc.

Fig. 3

Download

You can download the java binary file here. There are no dependencies on the installed software.

Authorship

This application was created as a student project by Sebastián Kupka.