Aiming at the problem that classical morphological method for edge detection can remove the image noise but is difficult to retain the details of the edge,a method that can effectively remove the noise and can accurately detect the details of edges is introduced.The image filtering open and close operation is performed with the large-scale contour structural elements,the gradient operation is conducted by the aid of the small-scale structural elements after the expansion and corrosion operation in the classical morphotogy,and then the edge of the image containing noise information is obtained.Experiments show that the method can effectively remove the image noise while detecting the image edges accurately,and the guantity of computation is relatively small.