Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Image segmentation for iOS

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

like image 682
Ivan Alek Avatar asked Mar 27 '13 09:03

Ivan Alek


2 Answers

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.

like image 165
Dmitry Khryukin Avatar answered Nov 14 '22 05:11

Dmitry Khryukin


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

like image 34
ninjaneer Avatar answered Nov 14 '22 05:11

ninjaneer