How to remove an object in a photo so that there is no black spot? To take the place of this object other objects, and no one would have noticed? For a long time it was believed that this task was almost insoluble. Pseudo-solutions such as, for example, cover up the hole with some kind of texture were suggested:
akvis.com/multibrush-tutorial/examples/removing-object.phpFinally, at the SIGGRAPH conference in 2007, a solution that was unique in its functionality and capabilities was proposed. Do not deny yourself the pleasure to see this unique report (in English):
www.youtube.com/watch?v=vIFCV2spKtgThis method immediately impressed me with its revolutionary nature. It's nice to see that this solution is already used today in the latest versions of PhotoShop, as well as in user programs, like this:
www.tintguide.com/en/imageresize.htmlSo the method is very simple.
a) A density map of the gradient field is compiled.
b) Through the object to be removed, curves are drawn along which the density of the gradient field is minimal. These curves collapse, the pixels located on them are deleted. (The size of the picture decreases while N pixels wide).
c) On the new image there is again a curve along which the density of the gradient field is minimal. It is duplicated, i.e. each pixel is replaced by two. (The size of the image increases by 1 pixel in width).
d) Step c) is repeated N times.
')
As a result, the selected object is completely erased. The photo remains the same size as it was. Traces of editing in 99% of cases cannot be noticed, even with the help of special programs.
UPDATE: As it turned out, this technology has already been discussed at Habré here
www.habrahabr.ru/blogs/algorithm/48518 , which is very nice.