What applications do you have in mind for your shown algorithm?
I am going to extraxt pixels from a map that belong to harbour areas and auto-generate meshes for it. After getting to know these pixels, the next logical step to take is to get to know how many regions the binary image has and what contours each region has. Then, I'll filter the contours and place walls at the water-sides of the harbour areas and generate meshes for the floor parts.
Finally exported a first version of my new level to Gamestudio.
This looks really cool, is this a portfolio project or work for a client?