1. A computer-readable medium having computer-executable instructions for detecting an object, comprising: acquiring image data from an in-vehicle imaging device, the in-vehicle imaging device being configured to image an environment of a vehicle and output the image data that is indicative of the imaged environment; and extracting an object region from the image data acquired, the object region being an image region where a preset object exists, wherein extracting the object region comprises: identifying the object region, wherein identifying the object region includes a plurality of identifiers for identifying candidate regions for the object region, the identifiers being serially linked so as to sequentially refine the candidate regions; measuring processing time for processing the image data acquired to identify the object region; and controlling, based on the measured processing time at a preset time point, a degree to which the candidate regions are refined after the preset time point, by adjusting at least one of a linkage between the identifiers and processes to be executed by the identifiers after the preset time point.