We present a computational model of a contour mechanism first identified by neurophysiological methods in monkey visual cortex. The scope is the definition of occluding contours in static monocular images. The model employs convolutions and non-linear operations, but does not require feedback loops. Contours are defined by the local response maxima of a contour operator applied in six orientations. The operator sums the activities of a "C-operator", sensitive to contrast borders and a "grouping operator" that integrates collinear aggregations of termination features, such as line-ends and corners. The grouping process is selective for termination features which are consistent with the interpretation of occlusion. Contrast edges are represented by C-operators simulating the function of cortical complex cells, termination features by ES-operators simulating the function of cortical end-stopped cells. The concepts of ortho and para curvilinear grouping are introduced. Ortho grouping applies to terminations of the background, which tend to be orthogonal to the occluding contour. Para grouping applies to discontinuities of the foreground and is used to interpolate the contour in the direction of termination. Both grouping modes also identify the direction of figure and ground at such contours. The simulation reproduces well-known illusory figures, including curved Kanizsa triangles and the circular disk of the four-armed Ehrenstein figure. Further, it improves the definition of occluding contours in natural, gray value images.