https://github.com/prajwalamte/image-filters-using-python
Applying different filters to image using OpenCV, Numpy and Matplotlib libraries of Python
https://github.com/prajwalamte/image-filters-using-python
Last synced: 10 days ago
JSON representation
Applying different filters to image using OpenCV, Numpy and Matplotlib libraries of Python
- Host: GitHub
- URL: https://github.com/prajwalamte/image-filters-using-python
- Owner: PrajwalAmte
- Created: 2023-04-09T16:11:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-10T04:04:32.000Z (over 3 years ago)
- Last Synced: 2025-10-17T06:49:48.743Z (9 months ago)
- Language: Python
- Homepage:
- Size: 190 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Image Filtering Using OpenCV
A Python application for applying various image filters to images using computer vision techniques. This project was created during 2nd year of Engineering as part of a coursework assignment.
## Project Overview
This program demonstrates fundamental image processing concepts using OpenCV, including kernel-based filtering and color space transformations. It provides an interactive CLI interface for applying different effects to images.
## Features
- **Multiple Filter Effects**: Apply various artistic and processing filters
- **Emboss**: Creates a 3D embossed effect
- **Sharpen**: Enhances edges and details
- **Blur**: Applies Gaussian blur with customizable intensity
- **Sepia**: Adds a warm, vintage tone
- **Interactive CLI**: Simple menu-driven interface
- **Side-by-side Comparison**: View original and filtered images together
- **Real-time Visualization**: Uses Matplotlib for immediate feedback
## Requirements
- Python 3.7+
- OpenCV (`opencv-python`)
- Matplotlib
- NumPy
- Seaborn
## Installation
1. Clone the repository to your local machine:
```bash
git clone https://github.com/yourusername/Image-Filters-using-Python.git
cd Image-Filters-using-Python
```
2. Install the required dependencies:
```bash
pip install -r requirements.txt
```
Or install manually:
```bash
pip install opencv-python matplotlib numpy seaborn
```
## Usage
1. Place your image file in the project directory (update filename in `main.py` if needed)
2. Run the program:
```bash
python main.py
```
3. Select a filter from the menu:
- Enter `1` for Emboss
- Enter `2` for Sharpen
- Enter `3` for Blur
- Enter `4` for Sepia
4. The filtered image will be displayed in a new window alongside the original
## Sample Outputs
### Original Image

### Filter Results
| Emboss | Sharpen |
|--------|---------|
|  |  |
| Blur | Sepia |
|------|-------|
|  |  |
## Code Structure
- `main.py`: Main application with all filter implementations
- Filter functions use NumPy kernels and OpenCV's `filter2D()` and transformation functions
- Modular design allows easy addition of new filters
## Learning Outcomes
This project helped me understand:
- Image processing fundamentals and kernel-based filtering
- Color space conversions (BGR to RGB)
- OpenCV library usage and APIs
- Python best practices (type hints, docstrings, error handling)
For more details, see [Learning.md](Learning.md)
## License
This project is open source and available under the MIT License.