1 / 0 geometric figures
I have got an array which holds the values 0 or 1. In which 1 means that it is occupied. Anyway, those values are everywhere over the array. Since I got these values after edge detection they kinda represent an edge.
Now, i need to find geometric figures.
If, for example.....I have an array which looks like
[1][0][0][0][0][0][0][0][0][0]
[0][1][0][0][0][0][0][0][0][0]
[0][0][1][0][0][0][0][0][0][0]
[0][0][0][0][0][0][0][0][0][0]
[0][0][0][0][1][0][0][0][0][0]
[0][0][0][0][0][1][0][0][0][0]
[0][0][0][0][0][0][1][0][0][0]
[0][0][0][0][0][0][0][0][0][0]
and all the 1's represent ONE line. What will be a good way to find out? This example is easy, but there are other examples which will cause more trouble. Like:
[1][0][0][0][0][0][0][0][0][0]
[0][0][1][0][0][0][0][0][0][0]
[0][0][0][1][0][1][0][0][0][0]
[0][0][0][0][0][0][1][0][1][0]
I can't seem to figure it out........
------------------
Dance with me......