This project provides tools for solving Digital Image Processing (DIP) problems, aimed at helping me and my colleagues practice and understand core concepts in DIP.
-
Clone the Repository
git clone <repository_url>
-
Navigate to the Project Directory
cd DIP_solver -
(Optionally) if you will contribute make virtual environment
python -m venv .venv
Activate the virtual environment
.\.venv\Scripts\activate
Install requirements
pip install -r requirements.txt
-
Install the Package if you will contribute install the package in your environment in editable mode:
pip install -e .install the package and dependencies in your environment:
pip install .
Note: Using this project in IDLE or an interactive Python environment is recommended.
-
Import the Package
Start by importing the package:from DIP.helper import make_random
-
Create a Random Matrix
You can generate a random matrix with the functionmake_random(width: int = 3, height: int = 3, bit_depth: int = 8) -> Matrix.width = 3 height = 3 bit_depth = 8 img1 = make_random(width, height, bit_depth)
-
Choose a Kernel
Import a predefined kernel from theKernelsclass:from DIP.neighborhood_operations import Kernals kernel1 = Kernals.smoothing_filter
-
Display Matrices
Display one or more matrices usingdisplay_matrices(list_of_matrices: List[Matrix], text: Optional[List[str]] = None, coordinates: bool = False):display_matrices([img1, kernel1])
Sample output:
Matrix 1: [ 125 208 136 ] [ 130 1 240 ] [ 93 207 170 ] Matrix 2: [ 0.111 0.111 0.111 ] [ 0.111 0.111 0.111 ] [ 0.111 0.111 0.111 ]
For full documentation, see docs.
The project started because I wanted to understand the implementation of some algorithms and operations for a college course on Digital Image Processing. At first, I built it in NumPy—faster, and I just wanted to learn the concepts. But then I thought, why not make it pure Python? This way, there are no external libraries needed, and I could share the code with my classmates so they could use it to solve any problem they wanted.
Then the idea grew: why not make a TUI (Text-based User Interface) and quiz app that sticks to this DIY principle? I decided to build it entirely myself to deepen my understanding and give my classmates a useful, accessible tool.
- Writing clear and helpful documentation
- Using Pydoc and focusing on self-explanatory code
- Creating guides on using code effectively
- Gaining deeper knowledge of Python
- Using mkdocs to auto-generate documentaion with docstring
- using github actions to auto build the documentaion on new releases
- Reimplement the project using NumPy and OOP principles
- make a text base user interface (TUI)