


"Visual routines", as defined by Shimon Ullman (1984), are a set of elementary operations thought to underlie early stages of processing in the mammalian visual system. Many other writers have adopted the term, often using it to refer to lowlevel primitives in machine vision. It is in this sense that we use it in Tekkotsu.
Tekkotsu visual routines provide operations such as connected components labeling, region intersection or merge, neighborsum, floodfill, and bounded distance computation. Their design has been influenced by the work of James Mahoney on visual routines when he was at Xerox PARC (see Forbus et al. paper below.)
The set of primitives is easily extensible, The basic data structure is the "sketch", which holds a 2D array of pixels of a specified type. Sketch objects are actually smart pointers. Internal functions handle all storage allocation and reference counting chores, and the usual arithmetic and logical operators are overloaded to operate on sketches in an intuitive way.
Tekkotsu actually takes a "dual coding" approach to representation. The term comes from the work of the psychologist Alan Paivio on mental representations. "Sketches" provide an iconic code, while "shapes" provide a symbolic one. Paivio argued that people use both kinds of representations, and when necessary, convert between one and the other. In Tekkotsu, sketches exist in a "sketch space" and shapes in an associated "shape space". Extractionoperators can extract shapes (such as lines or ellipses) from sketches, while rendering operators produce a sketch from a shape.
DualCoding Haiku:There are several sketch space/shape space pairs built in to Tekkotsu. The most basic is camera space, which corresponds directly to camera coordinates. Local space is based on egocentric (bodybased) coordinates, and world space is based on allocentric (world) coordinates. A tool called the SketchGUI, which can be launched from the ControllerGUI, allows you to remotely examine any of these spaces and see the sketches and shapes that populate them.
Sketch space and shape space:
One has pixels, one has lines.
Back and forth we go.
 Thomas Tuttle


