Contour

Hello I am having problems with the contour detection of a partial body.
I have found that each time the blob intersects with the window limits the blobs includes the window limits, instead of just the body limits. I guess the pictures will be more self explanatory. The first one is what I need, but without increasing the treshhold and therefore without cutting the human body. Any Ideas?

![](<br%20/><a%20href=)http://2.bp.blogspot.com/_ruvf2F7DKAY/S … ontour.JPG
" alt="" />

http://3.bp.blogspot.com/_ruvf2F7DKAY/S … ntour2.JPG
" alt="" />

sorry, what i need is something like the second pic…

just the human body contour without including the window borders

thanks…

P.D. I have also tried changing the min and max values in without any luck

int findContours( ofxCvGrayscaleImage& input,
int minArea, int maxArea,
int nConsidered, bool bFindHoles,
bool bUseApproximation = true);