There are a few things, you are not using the
rect
object anywhere. Why? Isn't that supposed to capture the box bounding the found person? The rect which you will detect, will be used to render the box around the person.
I wrote an article covering this aspect, but I was working with faces. So after detecting the fact, I took the area of that face and drew a rectangle with the provided X Y values. You can do the same in this case, read the article for more on that,
Highlighting the faces in uploaded image in ASP.NET web applications[
^].