Is there a free tool that's good at extracting objects from photos?
It has to work on linux
For instance, extracting a person from a photograph.
Using imagemagick, you can use a mask, edge detection, or a combination of the two techniques to cut shapes out of an image. The mask example in particular is very powerful if you have a picture with a known background.
The add texture to image example shows how to create a mask of a complex photo as part of the process, but it would work on a person also.
On a photo of a pagoda, the command:
convert pagoda_sm.jpg -fuzz 10% -transparent white \ -alpha extract -negate pagoda_mask.png
Which you can then use to cut the out everything that's not background in this case from the image.
There are no perfect tools, free or no, that perform this task automatically on all images.