Ask Your Question
-1

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

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

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

Hi

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

Comments

you could read about segmentation methods, like watershed or grabcut

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

1 answer

Sort by ยป oldest newest most voted
1

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

fiammante gravatar image

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

The code below should give you the correct output:

blur = cv2.blur(img,(9,9))
blur2 = cv2.GaussianBlur(img,(3,3),0) 
absd=cv2.equalizeHist(cv2.cvtColor(cv2.absdiff(blur2,blur),cv2.COLOR_BGR2GRAY))

Good luck!

edit flag offensive delete link more

Comments

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 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 673 times

Last updated: Oct 11 '17