Image Processing with Butterworth High-Pass Filter and Sobel Operator for Edge Detection

Resource Overview

This program first applies a Butterworth high-pass filter to preprocess the image, followed by edge detection using the Sobel operator algorithm. The combined approach effectively enhances edge feature extraction through frequency-domain filtering and gradient-based detection.

Detailed Documentation

In this program, we implement a two-stage image processing pipeline. First, the image undergoes frequency-domain filtering using a Butterworth high-pass filter. This filter is implemented by designing a transfer function that attenuates low-frequency components while preserving high-frequency details. The filtering process typically involves converting the image to the frequency domain using Fast Fourier Transform (FFT), applying the filter's transfer function, and then performing inverse FFT to return to the spatial domain. Following the filtering stage, we apply the Sobel operator for edge detection. The algorithm works by convolving the image with two 3x3 kernels (for horizontal and vertical directions) to approximate the gradient magnitude. The horizontal kernel detects vertical edges, while the vertical kernel identifies horizontal edges. The final edge strength is computed by combining the gradient components using the Euclidean distance formula: sqrt(Gx² + Gy²). The synergistic combination of these techniques produces excellent results. The Butterworth filter effectively removes low-frequency noise and background variations, thereby enhancing high-frequency edge components. This pre-processing step creates optimal conditions for the subsequent Sobel operator, which precisely locates edges by detecting pixel intensity gradients. The complete workflow generates images with clearly defined edge features, providing a superior foundation for subsequent image analysis and computer vision tasks. The implementation typically involves MATLAB's image processing toolbox functions for frequency filtering and gradient computation, ensuring computational efficiency and accuracy.