1. A computer implemented method for detecting objects in an image, comprising: determining an initial rough shift of an input image based on a size of a scanning window in order to scan said input image for a plurality of potential detections, wherein said scanning window is classifiable with respect to a cascade of homogenous classification functions based on one or more features of an object to be detected; estimating at least one gradient of a confidence function for said scanning window based on said cascade of homogenous classification functions to determine a probability of an object occurrence in a particular area of said scanning, wherein said confidence function comprises an output of said object detector; outputting said object detector result indicating the presence of said object in said scanning window; adaptively changing a size and a scanning direction of said scanning window based on said object detector result and scanning an area of said input image utilizing a small shift, said small shift being less than said initial rough shift; detecting said object associated with said scanning window based on said response from said object detector in order to thereafter localize said object having sufficient features with a higher precision and accuracy thereto.