Question: b) Design and implement (write a program) an algorithm to find the connected components in a binary image using Union-Find data structure in a). An
b) Design and implement (write a program) an algorithm to find the connected components in a binary image using Union-Find data structure in a). An ASCII file containing a binary image is available (see girl.img and img_readme) as the input of your program. The output of the program should be the following in this specified order: 1. the input binary image, 2. the connected component image where each component is labelled with a unique char- acter, 3. a list sorted by component size, where each line of the list contains the size and the label of a component, 4. same as 2 with the connected components whose sizes are less than four removed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
