So we have a photo like this
(source: vkontakte.ru)
How to detect that a red wall has a white figure painted on it and that that white figure is a texture and than how to cut that wall from the picture? I need an algorithm for performing such operation programaticly (not by hand)
Given that this is a difficult task for a human to perform, I expect it currently impossible to do so algorithmically. It is hard to compete with a visual processing system that has been over 200 million years in the specification refinement stage with coding errors punishable by death.