Skip to content

antonblaise/3x3-median-filter

Repository files navigation

University of Technology Malaysia (UTM)
SKEL 4673 - DSP Architectures
Group 4
Ha How Ung, Kenneth Lo, Yeap Eng Jau
Assignment 1

3x3-median-filter

Image processing - noise reduction with 3x3 median filter
Note that this tool is only useable on Windows, and it can only produce grayscale outputs.

Requirements

C++ compiler (mingw32-gcc-g++)
Python 3
NumPy
Pillow
Matplotlib

Usage guide

  • Run the following command in command prompt cmd.exe under your desired folder.
    git clone https://github.com/antonblaise/3x3-median-filter.git
  • Double click on the new 3x3-median-filter folder.
  • For first time usage after fresh install, python requirements.py before using the program.
  • Place your input image inside the data folder, and rename it as input.png.
  • Double click launcher.bat to run the program.
  • The result is generated and saved in both the main directory and the data folder as output.png.

Example

PhotoGrid_Plus_1650919314164
Input, grayscaled, and output.

Code explanation

  • Each program file is run in the correct order, with the help of automation using the launcher.bat file. So we don't have to run the files one by one every time. The PDF below shows brief explanations of each of the scripts involved.
    3x3 Median Filter.pdf

  • The clear_dat.py is run at the very beginning to remove all the old .dat files to avoid erroneous overlapping.

  • Running requirements.py helps to install the packages listed.

Major amendments

27 April 2022

  • Switched from static to dynamic memory allocation for the huge matrices and vectors to overcome segmentation fault besides improving processing speed.
  • Eliminated the usage of fstream library, as it causes problems during integration with Vivado HLS.

About

Image processing - 3x3 Median Filter (Grayscale)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published