Photobot implements full Photoshop functionality in NodeBox.
The code is online at: http://nodebox.net/code
Using Python-code, you could use any Photoshop functionality (layers, alpha, blending, wands, transforms) in Nodebox, automated.
This example script takes the photograph of a car engine as input.
Photobot has added some random scribblings so it looks like he knows what he's doing.