Recognizing waterways in an aerial photo -- polygons from edge detection images
This is hard to do with color information alone. Color variations between (or even within) aerial and satellite imagery can be huge. Ideally you will want hyperspectral or at least infrared imagery (see this paper). 

Assuming your edge detection can snap to pixel boundaries, you can take each pixel's borders as a closed polygon and union them together to form a polygon (depending on your union implementation you may end up with a polygon with inner rings or holes) or a collection of polygons. The Java Topology Suite and other computational geometry implementations can make this much easier for you. If you want to use sub-pixel boundaries you will need to be very careful that you have a good epsilon value set so you can snap edges that are very close but not exactly touching.

If you want to take the edges and combine them yourself you will want to build a graph of intersecting edges and implement code that traverses the graph (e.g. counter-clockwise) to find where it closes in on itself to form a polygon. This is how some of the union implementations of polygons works.