I'm testing to see if I can count/draw circles around dots I drew on a piece of paper, this research is for my thesis as I want to count the amount of pinholes in a composite laminate. I tried several methods that were already given in several forums.
The code I use is:
img = Import["https://i.imgur.com/Wu7pSBY.jpg"];
i = GaussianFilter[FillingTransform[img], 15];
b = Binarize[i];
d = DistanceTransform[b, Padding -> 0];
m = MaxDetect[ImageAdjust[d, 0.2]];
w = WatershedComponents[GradientFilter[b, 3], m, Method -> "Rainfall"];
s = SelectComponents[w, "Count", 20 < # < 10000 &];
ms = ComponentMeasurements[
s, {"Centroid", "EquivalentDiskRadius", "Label"}];
Show[seimg,
Graphics[{Blue, Circle @@ # & /@ (ms[[All, 2, 1 ;; 2]]),
MapThread[Text, {ms[[All, 2, 3]], ms[[All, 2, 1]]}]}]]
I have zero to none idea what this all does, but the results are this (click for full size):
The only thing I want it to do is draw circles around the dots and count them. Can anyone help out?

