https://github.com/grachale/convolution_image
The implementation of a function that takes an image (RGB or gray one) and a filter (kernel) and applies a convolution between them.
https://github.com/grachale/convolution_image
convolution image-processing numpy python
Last synced: about 2 months ago
JSON representation
The implementation of a function that takes an image (RGB or gray one) and a filter (kernel) and applies a convolution between them.
- Host: GitHub
- URL: https://github.com/grachale/convolution_image
- Owner: grachale
- Created: 2023-12-26T18:24:51.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-26T18:45:08.000Z (almost 2 years ago)
- Last Synced: 2025-07-22T19:47:07.855Z (3 months ago)
- Topics: convolution, image-processing, numpy, python
- Language: Jupyter Notebook
- Homepage:
- Size: 7.39 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Convolution Image Processing Method
## Overview
This repository introduces a versatile method for implementing convolution operations between images and filters. The method supports 2D filters of any dimension and seamlessly handles both grayscale and RGB images. In the case of RGB images, the filter is applied independently to each channel. The method ensures robust handling of pixels outside the image boundary by filling them with zeros during convolution. It is assumed that the kernels used are square.
## Examples of usage
```python
from filtering.filtering import apply_filter
from filtering.helpers import *image = read_image('tests/lenna.png')
display_image(image)
```
```python
for filter_name, kernel in filters.items():
print(filter_name)
display_image(apply_filter(image, kernel))
```
Identity
Gaussian blur 3x3 (approx)

Edge detection
