A basic Arduino serial server
When using an arduino as an acquisition and control board for a computer, the very first thing to do is to establish a communication between the Arduino (the server) and the computer (the client). Serial communication via USB is the simplest choice, and in this post we will see how to transform an Arduino into a basic serial server with just a simple - yet powerful - sketch.
Tracking object orientation with image moments
Object tracking is often reduced to recording the trajectory of the center of mass, and there is a simple reason for this: one only needs to compute the mean values of the horizontal and vertical indexes of the pixels, which is easy and fast. But what if one wants to track the object's orientation ? To do this, my favorite method is a simple and elegant approach involving image moments.
Fast clusterization of adjacency matrices
In this post I review three different methods to extract clusters from an adjacency matrix. A simple benchmark compares their performance and show that the reverse Cuthill-McKee algorithm improves execution time by a factor 30 as compared to brute force.