Add morphological operations, fix threshold
Rework blob counting