Skip to content

A reimplementation of OpenCV's filter2D done in python

License

Notifications You must be signed in to change notification settings

Lew-Morris/filter2D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License GitHub commit activity GitHub last commit (branch) GitHub repo size


Overview

This was made for a University module on computer vision. I received a grade of 78/100 (1st class) for this assignment

The filter2D function is used to apply a filter, or kernel, to an input image. This is done by applying a matrix of values (the kernel) to each pixel in the image which results in a final "convolution".

My reimplementation has an average accuracy of ~97% when compared to OpenCV's version, but this depends on the filter. For example, the uniform kernels are the best with ~99% accuracy, but the gaussian kernel is ~23% accurate. This is likely due to rounding errors as the output of both functions is identical to the human eye.

Requirements

This project makes use of:

  • Numpy
    • Various uses, array.shape as an example
  • Matplotlib
    • Output images
  • OpenCV
    • Comparing results and various other uses

Installation and Configuration

  1. Clone the repository
  2. Open in any IDE, or ensure the requirements have been downloaded to the python venv
  3. Run with python3 ~/filter2D/Task 1/main.py - there are no arguments to worry about!
  4. Enjoy 😊
  • As of writing this, there is no plan to implement a way to upload your own images without editing the code directly.

Known Issues

There are currently no known issues

About

A reimplementation of OpenCV's filter2D done in python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages