Introduction - If you have any usage issues, please Google them yourself
This example uses a data structure of the opencv: IplImage. First, scan for the first time, marking connected region then mark the merger of the equivalence, and finally a second scan, the equivalent re-mark will be finished.