1. An object detecting device comprising: memory; and a processor connected to the memory, wherein the memory stores instructions that, when executed by the processor, cause the processor to execute: an image acquiring unit configured to acquire an image from a camera; a scanning interval calculating unit configured to calculate a scanning interval of a detection window for detecting a detection object in the image, where the scanning interval is calculated based on a camera parameter of the camera, a width of the detection object to be detected in a three-dimensional space, and position information of a position to be scanned in the three-dimensional space and where the scanning interval is a distance in a scanning direction between neighboring scanning positions of the detection window; a scanning unit configured to scan the detection window on the image using the scanning interval calculated by the scanning interval calculating unit; and a detecting unit configured to determine whether the detection object is present within the scanned detection window.