O'Reilly logo

Learning Image Processing with OpenCV by Gloria Bueno García, Oscar Deniz Suarez, José Luis Espinosa Aranda, Jesus Salido Tercero, Ismael Serrano Gracia, Noelia Vállez Enano

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Seamless cloning

In photomontages, we typically want to cut an object/person in a source image and insert it into a target image. Of course, this can be done in a straightforward way by simply pasting the object. However, this would not produce a realistic effect. See, for example, the following figure, in which we wanted to insert the boat in the top half of the image into the sea at the bottom half of the image:

Seamless cloning

Cloning

As of OpenCV 3, there are seamless cloning functions available in which the result is more realistic. This function is called seamlessClone and it uses a method proposed by Perez and Gangnet in 2003. The following seamlessCloning ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required