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.
- 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).
- Color Conversion:
- Python: Version 3.8+
- Required libraries:
tkinter(for GUI)numpyPillowmatplotlib
- Clone the repository:
git clone https://github.com/<your-username>/Image-Processing-Tool.git cd Image-Processing-Tool
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python app.py
- Docker: Ensure Docker is installed on your machine.
- Build the Docker image:
docker build -t image-processing-tool . - Run the Docker container:
docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix -v $(pwd):/app/data image-processing-tool
- Launch the tool.
- Upload an image using the Upload Image button.
- Select any processing operation by clicking the corresponding button.
- View the processed image and corresponding results in real time.
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 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')
- Developed using Tkinter.
- Organized into intuitive sections:
- Upload and display.
- Operations grouped by categories (color, histogram, edge detection, etc.).
We welcome contributions! Follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature/your-feature
- Commit your changes:
git commit -m "Add your feature" - Push your branch:
git push origin feature/your-feature
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.