Ask Your Question
-1

Remove the background of a picture?

asked Sep 18 '14

Majurian gravatar image

updated Aug 6 '17

I am trying to write a program to detect the background and the foreground of a picture. Technically I would like to reproduce what is done on this website : https://clippingmagic.com/ or this iOS app : https://itunes.apple.com/app/cutto-smart-cutter/id791249825.

Currently, I tried different methods with openCV to remove the background, but the result is not satisfying :

  • Edge detection with canny filter does not enable the user to delete an area manually.
  • The flood fill algorithm leaves some stray pixels and runs randomly even with a small RGB area.

I want to know if there is a smaller library than openCV to carry out what I want : an app like https://itunes.apple.com/app/cutto-smart-cutter/id791249825 (~500 ko). But mostly I would like to know what kind of algorithm I should be using if I have to write it myself, or at least in which direction I should be looking. As you can see on https://clippingmagic.com the detection is not done automatically and requires some information on what is the foreground and what is the background. I think that information has the potential to give great results, I just don't know how to use it properly.

Preview: (hide)

Comments

one need to buy iphone if he dont have , then install app and answer you , i think it takes time

FLY gravatar imageFLY (Sep 18 '14)edit

4 answers

Sort by » oldest newest most voted
1

answered Sep 18 '14

peterst gravatar image

updated Aug 6 '17

I think this is the method you are talking about:

Interactive Foreground Extraction using GrabCut Algorithm

Preview: (hide)

Comments

No, I have already tried to use grabcut method but it is too slow: the app can define the background and the forground instantly.

Majurian gravatar imageMajurian (Sep 19 '14)edit
0

answered Nov 10 '0

BStrum gravatar image

Take a look at GrabCut. Here is a link to a PyimageSearch blog that discusses it (with code) I tried the code and its not perfect but it does work

ttps://www.pyimagesearch.com/2020/07/...

Preview: (hide)

Question Tools

Stats

Asked: Sep 18 '14

Seen: 13,964 times

Last updated: Nov 09 '20