Ask Your Question
-1

Remove the background of a picture?

asked 2014-09-18 06:32:09 -0600

Majurian gravatar image

updated 2017-08-06 11:01:29 -0600

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.

edit retag flag offensive close merge delete

Comments

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

FLY gravatar imageFLY ( 2014-09-18 12:22:30 -0600 )edit

4 answers

Sort by ยป oldest newest most voted
1

answered 2014-09-18 14:11:33 -0600

peterst gravatar image

updated 2017-08-06 11:07:30 -0600

I think this is the method you are talking about:

Interactive Foreground Extraction using GrabCut Algorithm

edit flag offensive delete link more

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 ( 2014-09-19 09:34:13 -0600 )edit
0

answered 2020-11-09 23:58:57 -0600

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/...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-09-18 06:32:09 -0600

Seen: 10,923 times

Last updated: Nov 09 '20