1. A method for video-based encroachment detection comprising: receiving first and second images; modeling a background from the first image; subtracting the background from the second image to provide a detection map; calibrating the size of an object at different parts of the image from the pixel level; integrating a projection of the object with the detection map using dynamic programming; and detecting the object in a region if the projection matches that region of the detection map.