code to find the connected components with a binary threshold image, and
mark the largest one