Popis: |
In order to overcome the disadvantages of the traditional auto-focus algorithms which are poor in real-time performance, weak in anti-noise capability and vulnerable to the influence of contrast and background pixels, this paper proposes an auto-focus algorithm based on maximum gradient and threshold. It introduces a threshold factor and takes a new kind of adaptive threshold to remove the pixels contaminated by noise and background in the image, then uses improved Sobel operators to extract maximum gray gradient after image preprocessing and calculates evaluation value. The experimental results show that the proposed algorithm has good real-time performance, strong unimodality, high sensitivity and strong anti-noise capability. In addition, the algorithm is less influenced by contrast and background pixels of the image. It can also control the sensitivity and focusing range of the focusing function. So the proposed algorithm is most suitable for auto-focus subsystem of video monitoring and tracking system. |