In this paper, we investigate edge extraction and segmentation of range images. We first discuss problems that arise in the conventional region-based segmentation methods and edge-based ones using principal curvatures, then we propose an edge-based algorithm. In the proposed algorithm, we extract edge contours by using the Gaussian filter and directional derivatives, and segment a range image based on extracted edge contours, Also we present the problem that arises in the conventional thresholding, then we propose a new threshold selection method. To solve the problem that local maxima of the first- and second- order derivatives gather near step edges, we first find closed roof edge contours, fill the step edge region, and finally thin edge boundaries. Computer simulations with several range images show that the proposed method yields better performance than the conventional one.