Edge detection is a fundamental tool in a wide range including image processing, machine vision and computer vision, mostly in the areas of feature detection and feature extraction. The accuracy and continuity of edges are essential indicators of edge detection and the key to affecting the final quality of them, which plays a core role in subsequent image processing. In this paper, by computing gray value differences between each point and its each neighbor, the adaptive edge detection is proposed to measure the local gray value variation around a point, which can obtain edges with high precision and continuity. Different from operators based on first-order or second-order derivatives, proposed method use the gray value difference between two adjacent points as the metric function for edge detection. Proposed method calculates the gray value difference between the current point and its neighbor, and then reserving both of them where the difference reaches most as the primary edge point. In order to reduce the number of missing edges and ensure proper continuity of the edges, the proposed method first detect the 3 × 3 neighbors centered on each point and get the threshold by an adaptive strategy; then expand the range of neighbors to 5 × 5, filtering redundant points out using threshold obtained in the previous step. Finally, an endpoint selection strategy is proposed to get the more accurate edge detection results. The experimental results show that proposed method can obtain accurate and continuous edges of good quality.