Image cleaning - removing all regular shapes ( circles, squares, text, icons etc. ) I'd like an automatic method to clean images. I've been looking at the GIMP, and its command line (cli) interface, in scheme / lisp. It looks very promising, but I'm a complete novice, so I'd be grateful for advice.

I'm, essentially, wanting to remove all man-made artefacts from a large number of photos - which is why I need to automate it, it's easy enough with just the one.

I'd like to remove anything with a hard-edge (square, rectangle, or part of one), or with a smooth curve (circle, ellipse, or part of one), but not remove naturally curved things, like leaves, or fronds. Actually, since there may be bits of vaguely straight edge, or approximate arcs in the 'natural' figures, I can go further, and say that no straight edge, or arc, will be longer than .5 cm in the original - I hope that helps!

What's special about the areas removed is one of: There is a straight edged border (at least one). There is a border that is the arc of a circle - an interior or exterior border. The items left have irregular borders, with no straight edges and no arcs.

I've attached a before and after photo. In a perfect world, I'd like a script that takes the image on the left, and leaves the image on the right.

Any suggestions of the best way to go?

It'd be nice if the method could be one that can use a GPU.
I think the best way to get rid of those artifact shapes, is to implement an Shape Detection. Then, when you had coordinates of the unwanted shape, you can cut it out of your image. Then must fill its place with interpolating (through using background intensity values at the edges of the removed patch). 

Now, there are various methods for shape detection and even OpenCV OpenCV Implementation  and Aforge  Aforge Implementation  support some of them. First you must get image edges, then using Hough transforms for lines and circles, detect shapes. 

http://www.emgu.com/wiki/index.php/Shape_(Triangle,_Rectangle,_Circle,_Line)_Detection_in_CSharp

Finally as I said, cut out the image and fill out the removed patch through interpolation.