All Projects
Computer Vision & Image Processing Production Algorithm

Coin Counting & Classification System

Automated Coin Detection, Marker-Controlled Watershed Segmentation & Valuation

Discipline Computer Vision & Image Processing
Role Computer Vision Engineer
Timeline / Year 2025
Organization / Context Independent Computer Vision Project

Executive Overview

NumisVision is an advanced classical computer vision pipeline developed to detect, segment, classify, and calculate the total monetary value of overlapping and adjacent coins on unconstrained surfaces. The system combines morphological filtering, distance transform algorithms, and watershed segmentation to resolve touching coin boundaries, and evaluates performance using rigorous mathematical metrics.

The Challenge & Solution

The Core Problem: Standard circle detection algorithms (such as naive Hough Circle Transform) fail catastrophically when coins overlap, touch, or exist under uneven ambient lighting with harsh specular glares on metallic edges.

The Engineering Solution: Formulated a robust multi-stage segmentation pipeline using Gaussian blurring, comparative Otsu vs adaptive thresholding, Euclidean distance transforms to identify local maxima centers, and marker-controlled watershed segmentation to partition merged contours with high geometric precision.

System Architecture & Data Flow

01
Image Preprocessing
Noise reduction via bilateral and Gaussian filtering while preserving crisp edge boundaries.
02
Thresholding Evaluation
Comparative benchmarking of Otsu global variance thresholding against local adaptive thresholding.
03
Morphological Operations
Opening and closing kernel operations to eliminate salt-and-pepper noise and fill interior specular voids.
04
Watershed Segmentation
Distance transform generates topographical relief maps for precise boundary separation of touching coins.
05
Classification & Summation
Calibrated pixel-to-millimeter ratio computes physical coin diameters to classify denominations and sum total currency.

Key Engineering Highlights

Robust Overlap Separation

Marker-controlled watershed successfully splits touching coins where Hough circles fail.

Mathematical Evaluation

Evaluated across variable lighting datasets with MAE, RMSE, and overall count accuracy metrics.

Calibrated Currency Summation

Converts detected coin radii into actual currency denominations (piastres / pounds).

Comparative Analysis Notebook

Interactive Jupyter Notebook documenting step-by-step image transformation stages.

Technical Challenges & Resolutions

Engineering Challenge
Metallic Specular Glares: Reflective coin surfaces produced dark holes inside binary threshold masks.
Architectural Solution
Applied morphological closing with elliptical structuring elements to reconstruct solid coin masks.
Engineering Challenge
Touching Coin Merging: Adjacent coins formed single merged blobs in connected component analysis.
Architectural Solution
Calculated Euclidean distance transform peaks to create sure-foreground markers before watershed flooding.

Have a Project in Mind?

Whether you're building production AI pipelines, full-stack applications, or enterprise business software, let's connect and discuss your vision.

Get in Touch with Martin