is there a way we can detect a person's body in the image and cut the only body part of the image.
Yes, sometimes, but it is very hard. If the body is in front of a blue or green or other uniform color, it's easy. If the body is in focus and the background isn't then it's quite possible. Otherwise it is hard-to-impossible.
Start here (and use Google yourself):
- http://ieeexplore.ieee.org/xpl/freeabs%5Fall.jsp?arnumber=833514
- http://www.patentstorm.us/patents/5987154/claims.html
- http://www.diffusion.ens.fr/index.php?res=conf&idconf=949
- http://www.sciencedirect.com/science?%5Fob=ArticleURL&%5Fudi=B6V09-4KST3G7-1&%5Fuser=10&%5Frdoc=1&%5Ffmt=&%5Forig=search&%5Fsort=d&%5Fdocanchor=&view=c&%5FsearchStrId=1034815145&%5FrerunOrigin=google&%5Facct=C000050221&%5Fversion=1&%5FurlVersion=0&%5Fuserid=10&md5=08a38011d31bc84e7e9432d70ebb6ab5
- http://web.mit.edu/shivani/www/Papers/2004/pami04.pdf
- http://www.cs.cmu.edu/~jch1/research/old/sword%5Fallocation.pdf
- http://www2.computer.org/portal/web/csdl/doi/10.1109/TPAMI.2004.108
- http://portal.acm.org/citation.cfm?id=1136661
If the person is naked, you could use skin color segmentation.
I am not sure if you really need to detect a person's body for your application. Maybe a "simple" background substraction algorithm would also work in your case.
With background substraction what you do is to build a background model, during the time there is no foreground (person) present in the image. Then you can use the background model to determine if a pixel belongs to the foreground or to the background. Unfortunately background substraction algorithm have problems with moving backrounds and sudden light changes...
Another idea would be to start with face detection á la Viola/Jones' haar like features...
If you thought a user might only use your app a few times, uploading an image to Amazon's mechanical turk is probably your best bet.