Comparison of Sobel, Prewitt, and Canny Edge Detection Methods in Digital Images - Diana Diana; Delima Agustina; Dian Yunita Situmorang; Dasril Kholid; Ahmad Rizki Pratama (Journal of Applied Informatics and Computing, 2026)
Edge detection is a fundamental operation in digital image processing, enabling identification of object boundaries in an image. This study presents a systematic comparative evaluation of three widely used edge detection algorithms Sobel, Prewitt, and Canny applied to a dataset of 20 grayscale images (512×512 pixels) from the USC-SIPI Image Database, spanning four object categories: simple geometric objects, complex textures, low-noise conditions, and medium-noise conditions. Each method was evaluated using four metrics: Mean Square Error (MSE), Peak Signal-to-Noise Ratio (PSNR), precision/recall/F-measure (with Canny output as the reference ground truth for Sobel and Prewitt), and average computational time. All experiments were conducted in Python 3.10 with OpenCV 4.7 on a dedicated Intel Core i7 (11th Gen) workstation running Ubuntu 22.04 LTS with 16 GB RAM to ensure fair benchmarking. Results show that the Canny method consistently outperforms the others in detection quality, achieving the lowest average MSE (7.26), the highest average PSNR (40.06 dB), and the best F-measure (0.91), albeit at a 3–4× higher computational cost (8.76 ms vs. ~2.4 ms for Sobel/Prewitt). Sobel and Prewitt provide comparable speed with lower precision, making them suitable for real-time applications. Notably, under medium-noise conditions, Canny's MSE advantage widens markedly, highlighting its superior noise robustness. A brief comparison with modern deep learning-based approaches (HED, BDCN) contextualises classical methods within the current state of the art. The study concludes that Canny is the superior choice for high-accuracy tasks, while Sobel and Prewitt remain practical for latency-constrained environments..