We consider the problem of detecting object contours in natural images. In many cases, local luminance changes turn out to be stronger in textured areas than on object contours. Therefore, local edge features, which only look at a small neighborhood of each pixel, cannot be reliable indicators of the presence of a contour, and some global analysis is needed. We introduce a new morphological operator, called adaptive pseudo-dilation (APD), which uses context dependent structuring elements in order to identify long curvilinear structure in the edge map. We show that grouping edge pixels as the connected components of the output of APD results in a good agreement with the gestalt law of good continuation. The novelty of this operator is that dilation is limited to the Voronoi cell of each edge pixel. An efficient implementation of APD is presented. The grouping algorithm is then embedded in a multithreshold contour detector. At each threshold level, small groups of edges are removed, and ...