This repository contains an implementation of 2D image filtering using the Butterworth filter in Python. The Butterworth filter, known for its flat frequency response in the passband, is applied here to demonstrate low-pass and high-pass filtering on images.
- Implementation of the Butterworth Low-Pass Filter (LPF) using Numpy.
- Support for filtering images with configurable filter size, cutoff frequency, and order.
- Compatibility with both single-channel (grayscale) and multi-channel (RGB) images.
- Visualization of the original, low-pass filtered, and high-pass filtered images.
- Example code in both Numpy and PyTorch for flexibility and performance.
Ensure you have the following installed:
- Python 3.x
- Numpy
- Matplotlib (for visualization)
- PyTorch (optional, for the PyTorch implementation)
- PIL (for image loading in the PyTorch implementation)