1. A method for detecting an object in an image, comprising: determining a relationship between sampling parameters and a detection rate for an object detection process, wherein the detection rate corresponds to a probability of object detection process detecting the object; determining a relationship between the sampling parameters and a detection speed for the object detection process, wherein the detection speed corresponds to an amount of time for the object detection process to complete; using the determined relationships to generate specific sampling parameters; and performing the object detection process, wherein the object detection process uses the sampling parameters to sample locations in the image, wherein a sampling process is used to refine the search for the object by identifying locations that respond to an object detector and are hence likely to be proximate to an instance of the object.