In order to meet the requirements of fast autofocus in focusing systems for rapid detection, a new adaptive focusing algorithm based on DFF is put forward. The algorithm uses coarse focus and precise focus with the two adaptive focusing strategies in different regions to achieve adaptive search to select the best evaluation function aiming to achieve autofocus. Experimental results show that the algorithm to maintain the premise of focusing accuracy can quickly focus on a large scale, and choose areas of interest to achieve accurate focus locally, and ultimately the average focusing time is less than 0.5 s, the success rate of one-time focus is 95%, to meet the focusing system for high-speed, high-precision AF requirements.