outer counter on a set of points (not opencv)

I’m looking for a little advice.

Imagine a set of points in a ofPolyline, or a collection of ofPolylines, I basically want to do the openCV contour finder on a list of points (not an image), but not using openCV.

Here is an example of the results I’m hoping to get to (roughly drawn in paint, but you get the idea. red contour shown on right)…

If anyone has any thoughts that would be fab.

Many thanks

I know you said no OpenCV but could you fill the shapes to generate an image to send to ofxContourFinder?

I’m sure there must be a way to do this mathematically that someone has done before.

Trouble is including openCV just for that feature is a bit overkill, particularly if making for iPhone.

Hi Chris,
Would something like the marching squares algorithm work? Not sure about the performance though.
http://en.wikipedia.org/wiki/Marching-squares

A good post outlining Mario with the algorithm.
http://devblog.phillipspiess.com/2010/02/23/better-know-an-algorithm-1-marching-squares/