Optimized Block-Based Connected Components