few cents worth
There is no such one method or program that would work in all chases.
But like said before you can lasso the object in gimp or photoshop.
Anyways. In movies blue or green is taken away and made invisible
so other footage is shown from "behind"
This same thing can be used for stills, you can remove a color and
what is left is the object. but IF the object is shot in front of single color background that is evenly lit.
hmm. I will mention a silly theory of mine. There is such a thing as difference
matte. If one did have 2 perfect, I emphasize the word PERFECTphotos/images
of the same "scene" one with object and one without then it would be a few click allmost instant thing in many graphics and Visual Effects softwares.😀
but its only in theory