1. A method of monitoring a building comprising: taking a video within a location in the building with a video sensor, the video comprising a plurality of frames, each frame including 2D image data; for each frame, receiving depth data associated with the 2D image data, the depth data corresponding to one or more distances from the video sensor to features represented by the 2D image data; analyzing the 2D image data including performing 2D analysis on the 2D image data to detect one or more image blobs in the video; using the depth data, projecting an image blob of the one or more image blobs onto a plurality of Z-planes, thereby creating a plurality of blob slices; separating the Z-planes into a ground plane and non-round planes based on a height threshold, so that at least a first blob slice on the ground plane is at or below the height threshold, and a second blob slice and additional blob slices on the non-ground planes are above the height threshold; creating a refined blob that includes the second blob slice, the additional blob slices, and only a portion of the first blob slice; performing object detection on the refined blob, to determine that the blob corresponds to a human object, thereby detecting a person in the video; based on the detected person and one or more additional detected people, counting a number of people at the location in the building; and controlling a system of the building in response to the number of people counted.