0

Forgive me but I'm new in OpenCV. I would like to delete the common background in 3 images, where there is a landscape and a man. I tried some subtraction codes but I can't solve the problem. I would like output each image only with the man and without landscape Are there in OpenCV Algorithms what do this do? (then without any manual operation so no markers or other)

enter image description here

enter image description here

enter image description here

I tried this python code CV - Extract differences between two images but not works because in my case i don't have an image with only background (without man).

I thinks that good solution should to Compare all the images and save those "points" that are the same at least in an image. In this way I can extrapolate a background (which we call "Result.jpg") and finally analyze each image and cut those portions that are also present in "Result.jpg".

You say it's a good idea? Do you have other simplest ideas?

Borja
  • 3,359
  • 7
  • 33
  • 66

1 Answers1

2

Without semantic segmentation, you can't do that.

Because all you can compute is where two images differ, and this does not give you the silhouette of the person, but an overlapping of two silhouettes. You'll never know the exact outline.

enter image description here

  • with the semantic segmentation would I be able to extrapolate only the siloutte? I have another idea ... if it were a video (maybe a video in which the subject moves smoothly or in "shots" assembling the various images as if they were frames) you could with opencv delete all the fixed objects or the background ? If so, can you recommend something? – Borja Jul 19 '22 at 18:38
  • i tried with bodypix tensorflow but is not good... :( can you suggest other ? – Borja Jul 21 '22 at 15:34