1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

ono ← 0

i ← 0

while (i

if (oid[i] == -1)

// i-th block has not assigned to an object yet

oid[i] ← ono

o[ono].bid[0] ← i

o[ono].nb ← o[ono].nb+1

ono ← 1

endif

else if

m ← oid[i] // it has assigned to an object, save the object id

endif

k ← 0

while(k

neighbor ← b[i].c[k]

if (oid[neighbor] == -1) // neighbor not assigned to any object

AddNeighborToObject(i,neighbor)

endif

else if

n ← oid[neighbor]

ObjectEquivalenceResolve (m,n)

endif

k ← k+1

endwhile

i ← i+1

endwhile