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:

Can we remove an object completely?

Let's select the region of interest:

Can we remove an object completely?

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

Can we remove an object completely?

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 wait for a couple of ...

Get OpenCV with Python By Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.