Remove background of the image using opencv Python

后端 未结 3 1580
无人及你
无人及你 2020-12-13 07:09

I have two images, one with only background and the other with background + detectable object (in my case its a car). Below are the images

I am trying to re

3条回答
  •  既然无缘
    2020-12-13 07:40

    I recommend using OpenCV's grabcut algorithm. You first draw a few lines on the foreground and background, and keep doing this until your foreground is sufficiently separated from the background. It is covered here: https://docs.opencv.org/trunk/d8/d83/tutorial_py_grabcut.html as well as in this video: https://www.youtube.com/watch?v=kAwxLTDDAwU

提交回复
热议问题