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:
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.
Downscale the image by half the resolution (use pyrDown()
), run GrabCut, use contour detection to vectorize the cut out, and upscale as necessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With