Can we remove an object completely?

This is perhaps the most interesting application of seam carving. We can make an object completely disappear from an image. Let's consider the following image:

Enclose the region to remove using your mouse:

After you remove the chair on the right, it will look something like this:

It's as if the chair never existed! Before we look at the code, it's important to know that this takes a while to run. So, just ...

Get OpenCV 3.x with Python By Example - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.