8

I need a way to transform image containing human into a image containing only body sihlouette in one color. First i took a look at Canny edge detector (OpenCV implementation), but this may lead to problems with background of the image.

I`ve tried with GrabCut OpenCV implementation. This works fine in most of cases, bit it have extremely bad time performance, example for 480x320 image it takes up to 1 minute to process. Also the problem with grabcut is that user need to make interaction and to set the background area and user area, which in my case is not allowed.

So, maybe you can give me ideas about some another approach using something different than GrabCut, or suggest me how to enhance GrabBut time performance(Maybe gpu implementation). Also i need a suggestion about algorithm that will locate human body, and help grabcut algorithm with positioning of body/background area.

Example:

Example

Ivan Alek
  • 1,899
  • 3
  • 19
  • 38
  • 1
    This question is vague and lacks detail and would probably be closed if it wasn't for the open bounty. What did you really try? A third party? Your own implementation? etc. etc. Help us help you. – David Rönnqvist Apr 08 '13 at 13:12
  • I think a brief overview of grabcut would help; e.g. it'd help those of us that are unfamiliar with it comment on whether it's a good match for GCD parallelisation or the GPU or any of the Core Image framework, whether there are any good third-party libraries that could do any of that work for you... – Tommy Apr 08 '13 at 22:34
  • At least give us one or more input images what you are trying to do, what sort of image you are targeting – shernshiou Apr 10 '13 at 10:56
  • I`ve edited the question, so i hope that it is more precise now. – Ivan Alek Apr 10 '13 at 10:56

4 Answers4

5

can suggest two things to investigate which may help:

1) CIDetector class

2) OpenCV library for iOS. This project doesn't look active, but you can find some forks or related projects here.

Dmitry Khryukin
  • 6,408
  • 7
  • 36
  • 58
1

Downscale the image by half the resolution (use pyrDown()), run GrabCut, use contour detection to vectorize the cut out, and upscale as necessary.

ninjaneer
  • 6,951
  • 8
  • 60
  • 104
0

OpenCV would be a good option for something like that. You can get a pre-built library for ios on the official site:

http://opencv.org/

And there is also a Tutorial-App using OpenCV, that may have a similar ability to what you're looking for:

http://computer-vision-talks.com/

thomketler
  • 418
  • 4
  • 9
0

You can use Canny's edge detection for this.

http://iosgpuar.blogspot.com/2011/12/canny-edge-detection-using-fragment.html

EXC_BAD_ACCESS
  • 346
  • 1
  • 4
  • 19
  • I`ve already written in the question, that canny edge detection will lead to problems with image background, floor line, and anything that is not silhouette at image. – Ivan Alek Apr 15 '13 at 08:40