In order to increase detection accuracy for detecting, from a captured image, a mobile body to be detected that appears small in the captured image, this mobile body detection device comprises an acquisition unit, a classification unit, an adjustment unit, and an output unit. The acquisition unit acquires a captured image of a detection area. The classification unit classifies, by using a pixel value and a threshold for classification determination, each of the pixels constituting the acquired captured image as either a foreground pixel that reflects the mobile body or a background pixel that is any pixel other than the foreground pixel. If a foreground / background ratio of the captured image is higher or lower than a predetermined allowable range, the adjustment unit adjusts the threshold for classification determination so that the foreground / background ratio falls within the allowable range. The foreground / background ratio is a ratio of the number of pixels classified as the foreground pixels to the number of pixels classified as the background pixels. When the foreground / background ratio is within the allowable range, the output unit outputs detection information indicating a position in the captured image of the pixels classified as the foreground pixels.