Skip to content

this is a small project to help me and my colleges in solving DIP (digital image processing) problems and practice it.

Notifications You must be signed in to change notification settings

Abdo-Eid/DIP_solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digital Image Processing Helper

Introduction

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.

Installation

  1. Clone the Repository

    git clone <repository_url>
  2. Navigate to the Project Directory

    cd DIP_solver
  3. (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
  4. 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 .

Getting Started

Note: Using this project in IDLE or an interactive Python environment is recommended.

  1. Import the Package
    Start by importing the package:

    from DIP.helper import make_random
  2. Create a Random Matrix
    You can generate a random matrix with the function make_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)
  3. Choose a Kernel
    Import a predefined kernel from the Kernels class:

    from DIP.neighborhood_operations import Kernals
    kernel1 = Kernals.smoothing_filter
  4. Display Matrices
    Display one or more matrices using display_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 ]
    

Documentation

For full documentation, see docs.

The Story

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.

What I Learned

  • 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

What's Next

  • Reimplement the project using NumPy and OOP principles
  • make a text base user interface (TUI)

About

this is a small project to help me and my colleges in solving DIP (digital image processing) problems and practice it.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages