Optimized Block-Based Algorithms to Label Connected Components on GPUs