DEV Community

Cover image for How to remove an object from an image with Python

How to remove an object from an image with Python

Stokry on October 09, 2020

Today I want to show you a sweet algorithm with which you can remove objects from the picture. For example, if we have thousands of images where we...
Collapse
 
bala profile image
Balamurugan

Can you please explain...How can we remove duplicate objects in a single image?

Collapse
 
stokry profile image
Stokry
Collapse
 
bala profile image
Balamurugan

Also, In this example, our goal is to remove the circles/ellipses from the image. But my requirement is to Remove the duplicate objects from the image using template matching techniques.

Thread Thread
 
stokry profile image
Stokry

This is a nice tutorial: towardsdatascience.com/object-dete...

Collapse
 
bala profile image
Balamurugan

Thanks for your reply, But I need the different requirements. This link finds the duplicate by contours. but I need to find the multiple objects using the template matching techniques

Thread Thread
 
bala profile image
Balamurugan

Already, I derived the code, the problem is..I have one template to find the matching object in that image..I have totally 5 duplicates but my system shows 6 duplicates one is wrong identifying..Am trying to fix it. I have your support it will better

Collapse
 
bala profile image
Balamurugan

Hi,Nice Explanation

Collapse
 
stokry profile image
Stokry

Thanks!

Collapse
 
jingxue profile image
Jing Xue

Now I know how they got rid of Daenerys' Starbucks cup!

Collapse
 
bala profile image
Balamurugan

Can you please give some idea to remove all the matching objects from the original image using python and OpenCV method or Template matching techniques?

Collapse
 
stokry profile image
Stokry

I'm just finishing up a similar article, and I'm about to publish it on the dev.to.