0

I'm looking to do something sort of like background removal, sort of like blob detection...

Basically, the idea is, I want to be able to snap a photo of a person or other object in front of a reasonably uniform background -- say, a wall, or a carpeted floor. Then, with as little user interaction and parameters as possible, I want to remove that background completely, leaving me with the subject on a pure white background.

I realize if the subject has any coloration that's similar to the background which isn't completely surrounded by other colors (e.g. a person wearing a white shirt standing in front of a white wall), I'm probably out of luck. That's fine. I just want this to work in most situations.

Since I need to be working in C, C++ and/or Obj-C, I'm expecting OpenCV is the right toolkit to use here, but if I'm actually wrong about that, please chime in... Assuming it is indeed a good plan to go with OpenCV, what might be the best way to do what I'm trying to do?

Thanks.

DanM
  • 7,037
  • 11
  • 51
  • 86
  • is the question "Is OpenCV the right toolkit to do it?". I guess :) How to do it? check grabcut in the examples – remi Oct 25 '12 at 16:01
  • Clarified -- Was looking for the best method of doing it, regardless of whether OpenCV is the way to go. Thanks! – DanM Oct 25 '12 at 16:58

1 Answers1

0

You should be using OpenCV's Grabcut segmentation for extracting the foreground, which in your case is a person

mystique
  • 507
  • 2
  • 9
  • 22
  • I just found another SO thread with a similar question http://stackoverflow.com/questions/8489091/finding-people-silhouette-in-opencv-c – mystique Oct 25 '12 at 20:57