This project is a Python-based GUI application for grayscale image processing using custom filter kernels. Built using the Tkinter
library for GUI components and PIL
(Pillow) for image processing, the app allows users to upload an image, apply various filters (Box Blur, Edge Detection, Sharpen, High Pass, Low Pass), and save the processed results. The filters are implemented using 2D convolution operations.
-
Fullscreen graphical user interface (GUI)
-
Upload and display a grayscale version of any image
-
Apply the following filters:
- Box Blur
- Edge Detection (Sobel operator)
- Sharpen
- High Pass Filter
- Low Pass Filter
-
Save all processed outputs to a selected directory
-
Displays images in a 2x3 grid with centered titles and button panel
-
Customized styling with background image support
Ensure the following libraries are installed:
pip install numpy pillow
- Clone the repository:
git clone https://github.com/RaohaMejba/Image-Processing-GUI-APP.git
cd grayscale-image-processing-gui
- Run the Python script:
python app.py
├── app.py
├── Image/
│ └── Background.png
├── Project Screenshots/
│ └── GUI_Screenshot_1.png
│ .............
│ └── GUI_Screenshot_5.png
├── requirements.txt
└── README.md
All filters in this application operate using 2D convolution. This involves sliding a matrix (kernel) over each pixel of the input image and computing a weighted sum of the surrounding pixels.
output[i, j] = sum(kernel[x, y] * image[i+x, j+y])
Each filter uses a distinct kernel matrix to emphasize different features:
- Purpose: Smoothens the image by averaging surrounding pixels.
- Kernel:
1/9 * [[1, 1, 1],
[1, 1, 1],
[1, 1, 1]]
- Purpose: Highlights horizontal and vertical edges in the image.
- Kernels:
Gx = [[ 1, 0, -1],
[ 2, 0, -2],
[ 1, 0, -1]]
Gy = [[ 1, 2, 1],
[ 0, 0, 0],
[-1, -2, -1]]
- Result: sqrt(Gx^2 + Gy^2)
- Purpose: Enhances edges and fine details.
- Kernel:
[[ 0, -1, 0],
[-1, 5, -1],
[ 0, -1, 0]]
- Purpose: Detects rapid intensity changes (fine details, noise).
- Kernel:
[[-7/9, -7/9, 0],
[ 0, 5, 0],
[ 0, -7/9, -7/9]]
- Purpose: Removes high-frequency content, smoothens noise.
- Kernel:
[[0, 0, 0],
[0, 5/9, 0],
[0, 0, 0]]
This project is open-source and free to use under the MIT License.
Raoha Bin Mejba
Email: raoha77@outlook.com