[ ] npoints is not really the number of poits, just the number of trys. The actual number of points will depend on the actual image gray areas. I'll change this to actually mean the number of points
[ ] The 0.5 and 0.01 thesholds can be configurable too
[ ] Testing, once with a generated image (e.g. just white/black blocks or lines)
a few TODOs:
.c.b
thing needs to be configurable