RE: [Algorithms] 2D: Detecting enclosed regions on a raster background
Brought to you by:
vexxed72
From: Brian H. <bri...@py...> - 2002-08-23 22:12:53
|
> At which point you still have to floodfill to detect which > area was surrounded. It looks like a floodfill is nearly unavoidable, at least without going into some really gnarly contortions and book keeping. Ease of debug is a pretty important thing. I suppose it's possible to do this all with some more elaborate spatial subdivision approaches. But that does seem a bit overkill =) I'll give my direction a shot -- a 50x50 floodfill, even worst case, is like one tiny polygon, so I can't see it being THAT bad, but given I've never actually written a floodfill, I should probably give it a go before saying it's the perfect direction =) Thanks, Brian |