This paper introduces a modified algorithm for edge detection specifically aimed at identifying corroded surfaces in industrial applications. The proposed method enhances the detection process by minimizing false edges and improving accuracy compared to traditional algorithms like Sobel and Canny. Results demonstrate that the new algorithm offers superior performance in edge detection, particularly in noisy images associated with industrial inspection.