1. A method of determining costs between blob trackers and blobs, the method comprising: detecting a blob in a video frame, wherein the blob includes pixels of at least a portion of a foreground object in the video frame; determining a spatial relationship between a blob tracker and the blob, the spatial relationship including an overlap between the blob tracker and the blob in at least one or more of a first dimension or a second dimension; determining a physical distance between the blob tracker and the blob based on the spatial relationship, wherein calculation of the physical distance depends on whether the blob tracker and the blob overlap in the first dimension, in the second dimension, or in both the first dimension and the second dimension; and determining a cost between the blob tracker and the blob using the physical distance, wherein the costs between the blob trackers and the blobs are used to associate one or more of the blob trackers with one or more of the blobs.