NVIDIA Interview Question

how you get connected componnent in binary image