Skip to content

Image-Processing-Tool is a Python-based GUI application for performing image processing operations like color conversion, thresholding, histogram processing, edge detection, and filtering. It features custom implementations and dynamic visualization, making it ideal for educational purposes.

Notifications You must be signed in to change notification settings

justFadel19/image-processing-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Processing Tool

Overview

This project is a Python-based Image Processing Tool featuring a Graphical User Interface (GUI). It implements fundamental and advanced image processing operations from scratch, without relying on library functions for complete solutions.

The tool is designed for educational purposes, providing insights into the underlying processes of image manipulation and analysis.


Features

Core Functionalities

  • Image Uploading: Load images from your device into the tool.
  • Dynamic Visualization: Display processed images alongside the original image.
  • Image Processing Operations:
    • Color Conversion:
      • Convert image to grayscale.
    • Thresholding:
      • Calculate image threshold using pixel averages.
      • Apply simple and advanced halftoning (error diffusion).
    • Histogram Processing:
      • Generate histograms of images.
      • Perform histogram equalization.
    • Edge Detection:
      • Simple methods: Sobel, Prewitt, Kirsch compass masks.
      • Advanced methods: Homogeneity, difference operator, difference of Gaussians, contrast-based, variance, and range detection.
    • Filtering:
      • High-pass and low-pass filters.
      • Median filtering.
    • Image Operations:
      • Add and subtract image copies.
      • Invert images.
    • Segmentation:
      • Manual and histogram-based techniques (peak, valley, adaptive).

Installation

Prerequisites

  • Python: Version 3.8+
  • Required libraries:
    • tkinter (for GUI)
    • numpy
    • Pillow
    • matplotlib

Steps

  1. Clone the repository:
    git clone https://github.com/<your-username>/Image-Processing-Tool.git
    cd Image-Processing-Tool
  2. Install dependencies:
     pip install -r requirements.txt
  3. Run the application:
     python app.py

Running the Project with Docker

Prerequisites

  • Docker: Ensure Docker is installed on your machine.

Steps

  1. Build the Docker image:
    docker build -t image-processing-tool .
  2. Run the Docker container:
    docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/app/data image-processing-tool

Usage

  1. Launch the tool.
  2. Upload an image using the Upload Image button.
  3. Select any processing operation by clicking the corresponding button.
  4. View the processed image and corresponding results in real time.

Project Structure

image-processing-tool/
│
├── app.py                 
├── processing/
│   ├── color.py            
│   ├── threshold.py
│   ├── halftone.py       
│   ├── histogram.py        
│   ├── simple_edge_detection.py
│   ├── advanced_edge_detection.py
│   ├── filtering.py
│   ├── image_operations.py       
│   └── segmentation.py
│
├── assets/                 
├── README.md               
└── requirements.txt       

Implementation Details

Custom Implementation

Each operation is written from scratch using basic operations like sum, min, max, and median. For example:

  • Grayscale Conversion:
    def to_grayscale(image):
        return image.convert('L')

Graphical User Interface

  • Developed using Tkinter.
  • Organized into intuitive sections:
    • Upload and display.
    • Operations grouped by categories (color, histogram, edge detection, etc.).

Contribution

We welcome contributions! Follow these steps:

  1. Fork the repository.
  2. Create a new branch:
    git checkout -b feature/your-feature
  3. Commit your changes:
     git commit -m "Add your feature"
  4. Push your branch:
     git push origin feature/your-feature
  5. Submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Image-Processing-Tool is a Python-based GUI application for performing image processing operations like color conversion, thresholding, histogram processing, edge detection, and filtering. It features custom implementations and dynamic visualization, making it ideal for educational purposes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •