A person entering a room is detected if they "appear" in the door region and then exit the region. A person leaving a room is detected if they enter the door region then "disappear" through the door. Some images to explain this are here.
Potential reasons this might not work are:
- The center of the box is not where the center of the person is. This issue is described here.
- The person does not seem to "appear" or "disappear" inside the region when there glass doors. This is because the person continues to be visible through the glass on the other side of the door.
- If the angle of the camera is straight out the door, a person leaving through a door may not "disappear" when he or she exits and returns. They may be visible the entire time through the door.