Method
Grayscale thresholding produces a binary mask; 4-connected components are labelled; each component's area gives an equivalent-circle diameter (D = √(4A/π)). Border-touching, undersized, and low-circularity components are excluded. Kept diameters feed the shared distribution engine (number-weighted).