Specifically, the input image is first smoothed with a Gaussian having half width at half max of 1.5 pixels. We basically want to keep as much detail as possible, and this is the minimal smoothing needed to reduce the aliasing effects of the digital grid to a point where the gradient direction can be reliably estimated to one out of 64 directions. The gradient direction and magnitude are then computed from the application of the two 3x3 Prewitt masks. The direction is discretized to 64 values, which is tuned to the minimal directional change reliably estimable by the convolutions that are used later to grow the stick.
The gradient magnitude image is then enhanced using an order statistic in order to de-emphasize pixels in shaded regions where a strong gradient is not evidence for a boundary. The actual operation used is to multiply the gradient magnitude at every point by the factor 1 - (min / mag) ^ 2 where mag is the gradient magnitude at a point, and min is the minimum magnitude over all pixels in a neighborhood whose direction is near that of the central pixel (here within 45 degrees). The intent is to reduce gradient values when all nearby points are close in value, since in this case, a strong gradient is probably due to steep shading rather than a grey level discontinuity The current neighborhood is set to 9x9 pixels, since that reaches beyond any local spreading of gradient values due to smoothing and non-zero mask size. This enhanced gradient image, in conjunction with the gradient direction, is used to compute the energies involved in the boundary finding process.
Finally, we make a thinned version of the enhanced gradient image using non-maximum suppression in the direction of the gradient. The result is scaled so that the gradient values lie in a known range (0-255). This thinned, and scaled seed image is used for generating hypotheses about where to start growing a boundary curve. As potential start points are subsumed by completed boundary fragments, they are marked as used. The thinned image is not used for growing the sticks because thinned curves alias badly against the extended masks used in the gradient descent process, producing a bumpy energy landscape.