Considering its advantages in dealing with high-dimensional visual input and learning control policies in discrete domain, Deep Q Network (DQN) could be an alternative method of traditional auto-focus means in the future. In this paper, based on Deep Reinforcement Learning, we propose an end-to-end approach that can learn auto-focus policies from visual input and finish at a clear spot automatically. We demonstrate that our method - discretizing the action space with coarse to fine steps and applying DQN is not only a solution to auto-focus but also a general approach towards vision-based control problems. Separate phases of training in virtual and real environments are applied to obtain an effective model. Virtual experiments, which are carried out after the virtual training phase, indicates that our method could achieve 100 accuracy on a certain view with different focus range. Further training on real robots could eliminate the deviation between the simulator and real scenario, leading to reliable performances in real applications.
As described above, existed passive auto-focus techniques contain two separate sections: a focus measure function and a search algorithm. Previous works contributed to these sections separately. Comparative works were done in evaluating different focus measure functions, e.g. Gaussian Based Methods, Laplacian Based Methods, etc., in execution time, correctness and other critical criterias @cite_13 @cite_16 . In this paper, we choose Tenengrad method (one type of Gaussian Based Methods) as a reference for reward due to its balanced performace on execution time and correctness. As for search algorithms, traditional methods focused on finding the nearest peak @cite_3 or the highest peak and all peaks @cite_17 based on intuitive ideas. Recent research utilized neural networks to search and achieved less computational complexity @cite_14 as well as faster speed @cite_7 , but they still applied focus measure values as inputs to feed the neural network.
@cite_14 @cite_7 @cite_3 @cite_16 @cite_13 @cite_17
2049617983 2091721145 2170930628 2087947314 2571032577 2082087395
This paper presents a passive auto-focus camera control system which can easily achieve the function of auto-focus with no necessary of any active component (e.g., infrared or ultrasonic sensor) in comparison with the conventional active focus system. To implement the technique we developed, the hardware system including the adjustable lens with CMOS sensor and servo motor, an 8051 image capture micro-controller, a field programmable gate array (FPGA) sharpness measurement circuit, a pulse width modulation (PWM) controller, and a personal digital assistant (PDA) image displayer was constructed. The discrete wavelet transformation (DWT), the morphology edge enhancement sharpness measurement algorithms, and the self-organizing map (SOM) neural network were used in developing the control mechanism of the system. Compared with other passive auto-focus methods, the method we proposed has the advantages of lower computational complexity and easier hardware implementation. Digital cameras are equipped with passive autofocus mechanisms where a lens is focused using only the camera's optical system and an algorithm for controlling the lens. The speed and accuracy of the autofocus algorithm are crucial to user satisfaction. In this paper, we address the problems of identifying the global optimum and significant local optima (or peaks) when focusing an image. We show that supervised machine learning techniques can be used to construct a passive autofocus heuristic for these problems that out-performs an existing hand-crafted heuristic and other baseline methods. In our approach, training and test data were produced using an offline simulation on a suite of 25 benchmarks and correctly labeled in a semi-automated manner. A decision tree learning algorithm was then used to induce an autofocus heuristic from the data. The automatically constructed machine-learning-based (ml-based) heuristic was compared against a previously proposed hand-crafted heuristic for autofocusing and other baseline methods. In our experiments, the ml-based heuristic had improved speed--reducing the number of iterations needed to focus by 37.9 on average in common photography settings and 22.9 on average in a more difficult focus stacking setting--while maintaining accuracy. A practical real-time auto-focus algorithm for a digital camera is presented, and it improves the reliability and speed of the auto-focus process, especially suitable for a mega-pixel high definition camera. The proposed algorithm adopts threshold gradient and edge point count technique besides focus value function, instead of the traditional two-stage climbing search algorithm that uses the focus value function only. Additionally, a relative difference ratio circuit is also proposed, which can implement adaptive step size searching to increase the searching speed. By adopting the modified algorithm on the prototype of our mega-pixel digital camera, the real-time auto-focus function is verified. The proposed algorithm is implemented in a test camera chip that has been manufactured in 0.25 spl mu m CMOS digital process. Abstract Microscopy images must be acquired at the optimal focal plane for the objects ofinterest in a scene. Although manual focusing is a standard task for a trained observer,automatic systems often fail to properly find the focal plane under different microscopeimaging modalities such as bright field microscopy or phase contrast microscopy. Thisarticle assesses several autofocus algorithms applied in the study of fluorescence-labeledtuberculosis bacteria. The goal of this work was to find the optimal algorithm in orderto build an automatic real-time system for diagnosing sputum smear samples, whereboth accuracy and computational time are important. We analyzed 13 focusingmethods, ranging from well-known algorithms to the most recently proposed func-tions. We took into consideration criteria that are inherent to the autofocus function,such as accuracy, computational cost, and robustness to noise and to illuminationchanges. We also analyzed the additional benefit provided by preprocessing techniquesbased on morphological operators and image projection profiling. Automatic tuberculosis (TB) detection methods using microscopic images are becoming more popular now a days. Auto-focusing is the first and foremost step in the development of an automated microscope for TB detection. Different focus measures exist for the selection of in-focus image from both fluorescence and bright field microscopic images. Recently, some researchers have investigated and compared several different focus measures for TB sputum microscopy. In this study we focused on bright field microscopic images and considered around 20 popular focus measures. Experiments were conducted on a large set of images having different features. This paper presents the development and real-time implementation of a rule-based approach to passive auto-focusing for digital still cameras. The implementation is performed on the processor DM310 which is specifically manufactured by Texas Instruments for digital still cameras. The squared-gradient sharpness function is considered to measure the amount of high-frequency content in an out-of-focus image. This sharpness function is then used within a rule-based search algorithm to obtain the focused lens position via moving the lens head step-motor. The developed rule-based approach is compared to the commonly used global search and binary search algorithms in terms of focusing speed and power consumption. It is shown that the introduced rule-based search algorithm achieves a lower number of focusing iterations or faster focusing speed, and a lower number of steps or lower power consumption.