This project is a comprehensive image processing application that performs the following tasks:
- Image sharpening
- Smoothing
- Edge detection (using Sobel and Canny methods)
- Image segmentation (using K-means clustering)
This project was developed as part of a final examination for Semester 3 at Soegijapranata Catholic University. It aims to showcase advanced image processing techniques applied through a user-friendly GUI for academic and practical applications.
The application provides a user-friendly GUI to upload images, adjust parameters, and view the processed results in real-time.
-
Sharpening
- Enhances image details using a Laplacian filter.
- Adjustable sharpening intensity.
-
Smoothing
- Reduces noise in the image using Gaussian blur.
- Adjustable smoothing intensity.
-
Edge Detection
- Implements both Sobel and Canny methods.
- Compares results of both methods side by side.
-
Image Segmentation
- Clusters the image into distinct regions using K-means clustering.
- Adjustable parameters for fine-tuned segmentation.
Rather than choosing program from folder, now in this new version user can use the app for each image and in one single display, which the display won't follow the image size
-
Compact Version
- On the
app.pythe user can experience the one image per process and much more freshed display - The display will not follow the image size, so it will be more compact and user-friendly
- On the
-
Live Stream Features
- On
livestream.pyUser can now use the camera to exxperience realtime Image Processing with adjusted parameter
- On
The main different on app.py and src/main.py was the ability to process which
main.py- Focused on process a bunch image, which good for research purpose because you will have all together processed image.. Im still work on this feature so we can make it into one UI and do it by choosen step
app.py- Focused on showing the user how per image can see the image one by one and adjustingit one by one also.
- Python 3.12+
- Libraries: OpenCV, NumPy, PySimpleGUI, Pillow
- Clone the repository:
git clone https://github.com/Corneliox/Image-Processing-Final-Exam-PyGUI.git cd Image-Processing-Final-Exam-PyGUI - Install the required dependencies:
pip install -r requirements.txt
- Run and Enjoy
- Run the application using Python:
- For folder-based processing
-
python main.py
-
- For single-based processing
-
python app.py
-
- For folder-based processing
- Use the GUI to:
- Upload an image from your computer
- Select the desired processing step & Adjust parameters for sharpening, smoothing, edge detection, and image segmentation
- View Result
- Processed image will be saved if you click the
savebutton.
The project follows a NEW folder structure:
Image-Processing-Final-Exam-PyGUI/
├── Comparison/
│ ├── comparefinal.py # Tools to Compare and Merge image Vertically
│ └── imagecomparison.py # Tools to Compare and Merge image Horizontally
├── New/
│ ├── Image/ # 25 Choosen Dataset that you can play with
│ ├── app.py # Compact version of /src
│ ├── livestream.py # Real Time Camera Image Processing [Raka Idea's, Thanks!!]
│ └── src/
│ ├── __pycache__ # Somehow it just Appear??
│ ├── edgedetection.py # Module for Canny edge detection algorithms.
│ ├── imagesegmentation.py # Module for segmentation
│ ├── main.py # Main entry point for the application
│ ├── sharpening.py # Module for Laplacian sharpening filter
│ └── smoothing.py # Module for smoothing functionality
├── .gitignore
├── README.md # Project documentation
├── Sharpening.jpg # Sharpening image for README.md
├── Smoothing.jpg # Smoothing image for README.md
└── requirements.txt # List of dependencies
- Processed Images: Simply put the parameters and Click process to see the differences
- GUI Features:
- Simple, intuitive design for uploading and processing images.
- Real-time parameter adjustments.
- Sharpening:
- Unsharp masking algorithm to enhance image details.
- Smoothing
- Gaussian blur for noise reduction while preserving image features.
- Edge Detection
- Sobel : Gradient-based edge detection.
- Canny : Multi-stage edge detection for precise results.
- Image Segmentation
- K-means clustering to separate the image into distinct regions.
Thanks for :
- Raka : For the idea of using a real-time camera feed for image processing.
- Ms. Shinta (Lecturer) : For the Briefing and explanation in a whole Semester.
I did some try on Sharpening on Smoothing methode, because it has seenable and more litle parameter to adjst with, and each parameter did a big difference on each
Notes : If you want to Zoom in i put 28347 x 5500 Resolution of image on link below, the readme picture is the low resolution image (Github prohibition >100 mb file)
-
This images show us 5 row of image that categorize as- Row 1 = Sharpening with
*1Intensity - Row 2 = Sharpening with
*2Intensity - Row 3 = Sharpening with
*3Intensity - Row 4 = Sharpening with
*4Intensity - Row 5 = Sharpening with
*5Intensity
My Conclusion on this photo was 1-3 Intensity still good with litle noise, but once you step on 4-5 i think you need the smoothies methode xD
High Resolution Image :
- Row 1 = Sharpening with
-
For Smoothing I use Gaussian Blur, which was need an odd number to work with, but first we make the merged image first to compare
- Row 1 = Smoothing with
1Intensity - Row 2 = Smoothing with
5Intensity - Row 3 = Smoothing with
9Intensity - Row 4 = Smoothing with
13Intensity - Row 5 = Smoothing with
17Intensity
For this photo, i prefer to have a blur Less than 9 for only smoothing (Because its readable) and 9 - 15 for little sharpness addition, and 17+ if you got high noise on your image.. Afterall this two methods can be merged.
High Resolution Image =
- Row 1 = Smoothing with
After all you as a user can try all by yourself on merging all the method that possible on app.py and try livestream using your camera on livestream.py, Try it on and Give me Feedback later.. God bless you and Thanks!!!
This Project was created by Cornelio Abdimash Christiono | 23.K4.0005, Soegijapranata Satholic University
Purpose: Final Examination of Semester 3
