Detecting edges holds significant importance in image processing, serving as a fundamental step in numerous computer vision applications. This paper presents an innovative method for performing edge detection by combining Binary Particle Swarm Optimization (BPSO) with L0 Guided Filtering. The proposed method aims to address the challenge of accurately detecting edges in noisy and complex images by leveraging the benefits of both BPSO and L0 guided filtering. The process begins with the initialization of the BPSO algorithm, where binary particles traverse the solution space to optimize parameters critical for edge detection. These optimized parameters are subsequently employed in the L0 guided filtering framework, a sophisticated edge preserving filter known for its ability to maintain fine details while effectively reducing noise. The synergy of BPSO and L0 guided filtering demonstrates improved adaptability to diverse image characteristics, enhancing the overall robustness of edge detection. The binary nature of BPSO allows for efficient exploration of the solution space, facilitating faster convergence to optimal parameters. Concurrently, the L0 guided filtering ensures edge preserving smoothing, contributing to the suppression of unwanted artifacts. Experimental evaluations on benchmark datasets showcase the effectiveness of the proposed method compared to traditional edge detection techniques. The results indicate superior edge localization and reduced sensitivity to noise, highlighting the potential of the BPSO Based Edge Detection under L0 Guided Filtering in real world applications. The presented approach offers a valuable contribution to the advancement of edge detection methodologies, demonstrating its potential for enhancing the performance of computer vision systems in various domains.