First I am not sure which keywords to use for this and I think I am probably using the wrong ones to google about it, so if someone could give me any hint it would be much appreciated.
My problem is the following: I need to find the "rooms" inside a house plan. For example take this geometry:

The desired algorithm would tell me which vertexes bound each of the rooms. So for this example it would be:
I have the vertexes and the edges as input data. Edit: The edge data is as follows (edge 8, 1 ,2):
x y
47 196
47 85
258 85
it is in pixel coord.
Graph Theory did not really help me because I have disconnected loops that share information. For example [1 2 9 10 3 4 5 8 1] AND [11 12 14 13 11]. So in the end I ended up doing a image fill, when expanding the boarders of the fill 1 pixel and doing a boolen operation to figure out which vertex are inside the filled image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With