Added support for eroding the thresholded image using Jimmy's webgl tricks.