[](https://www.python.org/)
| Sr | Scene | Otsu + components | Adaptive + components | Watershed (global seed) | Watershed (local maxima) | **Hough circles** |
|---|---|---|---|---|---|---|
| 1 | green felt · spread out | 18 of 20 | 20 of 20 | 20 of 20 | 20 of 20 | **20 of 20** |
| 2 | green felt · coins touching | **1 of 20** | **1 of 20** | 7 of 20 | 16 of 20 | **20 of 20** |
| 3 | green felt · side-lit | 20 of 20 | 20 of 20 | 20 of 20 | 20 of 20 | **20 of 20** |
| 4 | white paper · coins darker than the table | **1 of 20** | **25 of 20** | **1 of 20** | **1 of 20** | **20 of 20** |
`mermaid flowchart LR A[Photo of touching objects] --> B["Flatten the illumination
white top-hat, kernel > largest coin"] B --> C[Otsu + clean + fill holes] C --> D1[Connected components] C --> D2["Watershed, GLOBAL seed
(the tutorial)"] C --> D3["Watershed, LOCAL maxima"] A --> D4["Hough circles
(a shape prior, not a region method)"] D1 & D2 & D3 & D4 --> E[Region properties
area, centroid, equivalent diameter] E --> F1["COUNT
right or wrong, no metric choice"] E --> G[Calibrate from ONE known object] G --> F2["MILLIMETRES
as good as the reference, and no better"]
style D3 fill:#dcfce7,stroke:#16a34a style D2 fill:#fee2e2,stroke:#dc2626 style F2 fill:#fef3c7,stroke:#d97706 `
Three things this separates that a segmentation demo runs together:
---






Code and full results on GitHub (code private)
Every number is read from the file the run produced. github.com/hammasbuilds · kaggle.com/muhammadhammas13