"... and no one shall work for money, and no one shall work for fame; But each for the joy of the working, and each, in his separate star, shall draw the thing as he sees it, for the god of things as they are"



The Walnut Project


Walnut is a project to write the software that will eventually control the micro robots of the FPath project. Initially, it will use visual servoing techniques to control the 2D arm of a Roland Plotter.

The FPath project is an ongoing exploration of the Feynman Path to Nanotechnology and since the FPath project is so open-ended, the Walnut software does not have a fixed endpoint. It will be modified, rewritten and forked repeatedly as each iteration is reconfigured for a different goal. A list of the iterations and their main features is provided below. If you wish to have a specific version you will need to download or clone based off of the commit number.

The name Walnut is derived from Waldo (the Heinlein story) and a kernel - the controlling core of an operating system. Thus Walnut contains the kernel behind the movements of the Waldos in the FPath project.

Walnut is written in C# and is a Windows Media Foundation application with integrated image recognition functionality from the EmguCV library (a C# OpenCV Interface).

A Summary of the Walnut Versions

Below is a brief summary of the Walnut Versions - a more extended discussion of each application can be found further on down the page.

Walnut 00.01.01 Commit ID: 9e5b761
Streams a webcam to the screen, can record the stream as an mp4 file. It also overlays each frame with timing information and can recognise Red, Green and Blue rectangles and display the center coordinates of each.

A Longer Discussion of the Walnut Versions

Walnut 00.01.01

Walnut000101 ScreenDisplays webcam images on the screen via Windows Media Foundation and, optionally, saves the stream to an mp4 file.

Walnut also contains EmguCV library image recognition code imbedded in a WMF Transform (operating in an independent thread) which can recognise rectangles of Red, Green and Blue color and mark them on the display with a black cross.

Other code accesses the data in the recognition transform and displays the color and center of each rectangle in a text box on the main form once per second.

A further WMF Transform writes timing, frame count and other information in white text on a black background on the bottom of each frame.

Please note that the primary purpose of this version is to implement the image display, save, text overlay and object center detection functionality. As such the image recognition algorythms have not been particularly well tuned. For example, although the EmguCV code will recognise colored rectangles in the image, it will also recognise circles. In reality, it seems be just finding the centroid of various colored blobs. This is sufficient for the purposes of this version.

The Source Code

All Walnut versions are open source and are released under the MIT License. You can download, clone or fork the Walnut software at the following address:


Note that all of the versions expect to read from, and write to, a directory named D:\Dump\FPathData. This can be changed in the code of course but there is no particular provision to change this at runtime by the user in most versions.


The contents of this web page are provided "as is" without any warranty of any kind and without any claim to accuracy. Please be aware that the information provided may be out-of-date, incomplete, erroneous or simply unsuitable for your purposes. Any use you make of the information is entirely at your discretion and any consequences of that use are entirely your responsibility. All source code is provided under the terms of the MIT License.


The icon used for the Walnut application is from the the lovely Windows 8 Iconset by Icons8.

The Prism6 application in the OfItselfSo Prism project http://www.OfItselfSo.com/Prism was used as the initial structure and has been much modified since then.