In this study, a new approach to edge detection on images, corrupted with Gaussian and impulsive noise, is presented. The concept, under the decomposition of image with its principal component being an analysis on local pixel grouping for noise suppression, called LPGPCA based denoising, is adopted in order to obtain noiseless gradient maps for edge extraction. As a result, an algorithm has been developed called LPGPCA-ED. Firstly, horizontal and vertical gradient images are computed; then the gradient images are decomposed into a noiseless phase by applying the LPGPCA algorithm. Once a single gradient map has been obtained, a smart nonmaximum suppression operation is carried out to obtain a binary edge map. To show the accuracy of the proposed edge detector objectively, F-measure and PFOM results of the proposed edge detector on images with different Gaussian and impulsive noise are compared with the results of traditional and certain recently published edge detectors. Objectively, the experimental results on RUG and receiver operating characteristic (ROC) curve databases show that our method has better performance than other corresponding edge detectors. Moreover, subjective experiments on a variety of noise contaminated images show that the LPGPCA-ED algorithm is more robust under high level noise conditions, and is able to reveal well-linked lines and also preserve the structural form of a processed image.