janpaul123 / paperprograms

Run Javascript on pieces of paper!
https://paperprograms.org
MIT License
484 stars 55 forks source link

2-3x speed up to blob detection #68

Closed acarabott closed 5 years ago

acarabott commented 6 years ago

added scaleFactor simpleBlobDetection. Downscales the image before converting to grayscale and looking for blobs.

Speed up amount depends on your webcam resolution and chosen parameters.

I have things pretty good with a 4x scale, and changing threshold step to 20.

It could be made more user friendly by always scaling to a particular size (e.g. width of 300) regardless of resolution, but this also takes away the control that the parameter offers.