Machine Vision

Substack (20-70)-1

I wrote an image processing algorithm capable of locating, tracking, and identifying the structure of a colloidal crystal in real-time as it is grown on a substrate. Specifically, the algorithm identifies the outer “edge” of the growing crystal, and then determines the average distance between neighboring particles on the edge of the crystal. The above video is an example of the visual output of my algorithm. Bonds between particles that are on the “edge” of the crystal are labelled in red, and successive interior layers are also drawn in different colors.

The algorithm was written in Python. It grabs video from a source camera, and locates the colloidal particles in each frame. It then identifies all particles that are organized into a crystal structure and identifies the outer perimeter of the crystal. It does this quickly by using a clever trick I devised; first, I find the Voronoi tessellation of the particles, then compute the area of each particles’ Voronoi cell. Any particle with a Voronoi cell area that is less a threshold value is considered bounded within a crystal, and any neighbor of such a bound particle that is not itself a bound particle must therefore be on the edge of the crystal. (See image below.)

capture

The teal lines outline the Voronoi cells, and the cells colored green belong to bound particles. From here, the algorithm iteratively determines the particles belonging to each set ‘layer’ of the crystal.

Using this data, we can compute lots of useful quantities about the forming crystal. I was able to determine that, interestingly, the bonds between particles at the edge of the growing crystal are measurably longer than the bonds between particles inside the crystal.