Ask Your Question

How to detect human body(shirt detection) with clear edges rather than rectangle in android application?

asked 2017-09-25 06:52:48 -0500

updated 2017-09-25 07:04:31 -0500


We have to create an android application in OpenCV to detect human upper half body i.e shirt detection. We need to get the structure of the shirt exactly with the edges.

We are beginners to opencv.. please help us on the same

edit retag flag offensive close merge delete


you could read about segmentation methods, like watershed or grabcut

berak gravatar imageberak ( 2017-09-25 07:05:50 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2017-10-10 09:35:36 -0500

fiammante gravatar image

updated 2017-10-11 04:54:34 -0500

The code below should give you the correct output:

blur = cv2.blur(img,(9,9))
blur2 = cv2.GaussianBlur(img,(3,3),0) 

Good luck!

edit flag offensive delete link more


This will sharpen the edges, but it will not give you the shirt only. I guess you would want to combine this with an upper body detector and a watershed based algorithm on top of your generated edge map.

StevenPuttemans gravatar imageStevenPuttemans ( 2017-10-11 04:55:24 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-09-25 06:52:48 -0500

Seen: 430 times

Last updated: Oct 11 '17