NVIDIA interview question

how you get connected componnent in binary image