2

I am using this image. I would like to have only the human part from this image. I don't want the background of this image.

Picture of a person in a poster

How to do this? Any logic, links or the best and simple way?

here is the thing i want Link but i want this in objective c

Rajneesh071
  • 30,846
  • 15
  • 61
  • 74
  • Do you need manual or automatic body extraction? – Vitaly S. Feb 28 '13 at 10:10
  • 1
    There is an automatic, simple, good way — pick any 2. – Don Reba Feb 28 '13 at 10:44
  • @VitalyS. automatic, using code – Rajneesh071 Feb 28 '13 at 10:50
  • A simple good manual way is to use Corel KnockOut, Photoshop or any other specialized tool. A simple poor automatic way is to find the face, extract edges, and use some heuristic to find the body contour. A complicated good automatic way is to model the body shape and use something like graph cuts to extract the contour. – Don Reba Feb 28 '13 at 11:08
  • how to extract edges, ever you tried this>? – Rajneesh071 Feb 28 '13 at 12:30
  • Vitaly S's answer is accurate. There should be tutorials [online](http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en) but it's worth noting how that works: if detected will return a bounding box. What you probably mean is nicely detecting the glowing edges around the person and removing content. Do you need to do this programmatically ? If not I recommend migrating this to [GraphicDesign](http://graphicdesign.stackexchange.com), there should be some Photoshop experts there able to help. – George Profenza Feb 28 '13 at 18:08
  • I need this programmatically... – Rajneesh071 Mar 01 '13 at 08:44
  • As a warning, please don't use comments to ask people to answer your question. This is not an appropriate use of comments, and many of the ones you left have been flagged and deleted. People will find their way to your question if they're interested in answering it, but they shouldn't be bothered to do so. – Brad Larson Mar 01 '13 at 18:35
  • @BradLarson then what to do , no one is giving appropriate answer ? – Rajneesh071 Mar 02 '13 at 08:49

3 Answers3

3

There is no easy and fast way to satisfy your requirements. For the beginning you can learn how to detect objects in OpenCV.

After this you can check haarcascade_fullbody.xml from OpenCV sources. This cascade is for detecting bodies, open it in text editor, there is additional information in header. Anyway, I'm not sure that existing cascade is too accurate for your needs.

Vitaly S.
  • 2,389
  • 26
  • 40
2

From iOS5 and above you can user face detection API. By using FaceDetection APi you can easily find the face of the person. For reference and sample code here is the link.

All the best !!!

Yashesh
  • 1,799
  • 1
  • 11
  • 29
1

For ios5.1+, using a CIDetector and CIFaceFeature class can be easily face recognition.

Body recognition, is you will need to use opencv library. Not yet supported by apple.

Have a look at this: http://niw.at/articles/2009/03/14/using-opencv-on-iphone/en

Cropping an image in iOS using OpenCV face detection

Community
  • 1
  • 1
lakshmen
  • 28,346
  • 66
  • 178
  • 276