Development has started on a component framework for hybrid and complex vision problems. Text book image processing algorithms will only solve simple problems. While real world problem will demand using several tool from the image processing tool box. The main goal is that is should be simple to connect different image processing operations together, and be able to use the internal data from other operations.
Duplicate the image 2 times
Run 2 threshold operations with different thresholds. Then for each image run
In order to vectorize a given part of the image look at the 2 skeletonized images chose the best and run vectorizer on that. To run the whole image split it up into parts and vectorize them.
After that take all the chosen polygons and use them to draw lines on the original image.
For stringing together whole image operations ImageJ has a wonderfully simple system with the macro language. This does not get any simpler. You can create an ImageJ macro and use it as a component. This will require ImageJ 1.41f or later.
Component programming is based on using bigger groups of objects, it is used in many fields of computer programming e.g. GUI and OSGi.
This should be integrated with the current lazy calculations and lazy data streams. A lot of the work consist in making conventions and convenience methods and classes.
Now there is a root map where all the lazy calculations and lazy data streams are stored. If polygons are found in several derived images then you cannot store them in the same map. Instead you need to have a local context for each image.