Now bounding box can be calculated for any blob's size
Fixed bugs with groups concatenation; improvement of grouping

* The blobs are sorted before grouping.