Skip to content

The implementation of a function that takes an image (RGB or gray one) and a filter (kernel) and applies a convolution between them.

Notifications You must be signed in to change notification settings

grachale/convolution_image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

from filtering.filtering import apply_filter
from filtering.helpers import *

image = read_image('tests/lenna.png')
display_image(image)

for filter_name, kernel in filters.items():
    print(filter_name)
    display_image(apply_filter(image, kernel))

Identity

Gaussian blur 3x3 (approx)

Edge detection

About

The implementation of a function that takes an image (RGB or gray one) and a filter (kernel) and applies a convolution between them.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published