The following Matlab functions/scripts can be used to generate pseudo-random edges for bipartite and multipartite stimuli in figure-ground experiments. The core function is fgEdgeGenerator.m . This generates the actual edge shape according to a set of parameters/arguments. The parameters can be used to determine the length of the edge, the number of "bumps" along the edge, the min/max bump height, smoothing, and other aspects of the edge shape. The function also outputs a Matlab structure containing statistics describing the generated edge. The fgBipartiteStimulusGenerator script serves as a way to generate bipartite stimulus images. This script calls the fgEdgeGenerator function.
OCTAVE COMPATIBILITY: These functions have been tested in Octave and do work but you may need to move all of the subfunctions within the fgEdgeGenerator function into separate m files in the Octave path. Octave is free software similar to Matlab in functionality.
IF USING, PLEASE CITE : Brooks, J.L. & Driver, J. (2010). Grouping puts figure-ground assignment in context by constraining propagation of edge assignment. Attention, Perception, & Psychophysics, 72 (4), 1053-1069