- Introduction
- System Steps
- Image Preprocessing Details
- Coin Segmentation
- Filtering Techniques
- Result Visualization
- Interface Visualization
- Conclusion
- References
The goal of this project is to develop an automated system for detecting and recognizing coins using advanced image processing techniques. By leveraging computer vision, this system aims to:
- Detect coins in an image
- Segment them from the background
- Classify coins based on size or nominal value
To enhance usability, an interactive GUI is developed using Tkinter. The system is implemented in Python to ensure both flexibility and robustness.
The system loads images using the Pillow library and converts them to NumPy arrays for efficient pixel-level processing.
Initial preprocessing steps include contrast enhancement, noise reduction, and dynamic range adjustments to prepare the image for further analysis.
The segmentation phase isolates coins from the background using techniques such as:
- Classical thresholding
- Otsu's method
Different filters are applied to refine the image:
- Median filter for noise removal
- Gaussian filter for blurring
- Sobel filter for edge detection
Key functions include:
binarize_image: Converts grayscale images into binary representations.detect_large_circles: Identifies circular objects based on size and circularity.display_results: Visualizes detected coins with overlays.calculate_accuracy: Compares detected and actual coin counts.
The GUI allows users to:
- Upload images
- View original and processed images side by side
- See detailed analysis, including:
- Number of coins detected
- Accuracy percentage
- Breakdown of coin categories (small, medium, large)
Improves the visibility of features by adjusting brightness and contrast ratios.
Removes unwanted artifacts using techniques such as Gaussian noise reduction.
Expands the grayscale range to improve data representation.
Controls color intensity by modifying saturation levels in HSV or HSL color spaces.
Restricts pixel values to a defined range to normalize image data.
Segments the image into foreground and background using intensity-based thresholds.
Determines optimal threshold values by maximizing inter-class variance.
Replaces each pixel with the median value of its neighbors, reducing salt-and-pepper noise.
Calculates the average pixel intensity in a neighborhood, smoothing the image.
Applies a weighted blur to the image, preserving edge details while reducing noise.
Enhances edges by calculating the second derivative of pixel intensity.
Detects edges using gradient-based methods, highlighting changes in intensity.
Results include:
- Coin detection accuracy
- Coin count comparison between detected and actual values
The GUI presents:
- Original and processed images side by side
- Clear visual indicators of detected coins
- Summary of results with accuracy percentages
The system successfully detects and classifies coins with high accuracy. Advanced computer vision techniques enable robust segmentation and classification. The GUI ensures user-friendly interaction, making the system accessible for practical applications.
- Digital Image Processing
- Image Processing Techniques
- Feature Extraction in Computer Vision and Image Processing
- Additional resources listed in the document bibliography