Bottlenecks in the auto focus system
The auto focus algorithm is based on edge sharpness. The optimum focal point is reached when the edge sharpness is at a maximum.Windows over which edge statistics are to be taken are defined. Statistics are over these windows are the obtianed.These statistics are obtained by comparing the green value of neighbouring pixels.( each pixel has a green value in the range of 0 to 255) Both vertical and horizontal scans of neighbouring pixels are made. The sharpness of a specific image over a specified window is then the total number of neighboring pixels whose gradient/difference is above a specified threshold.
While the main focus of this investigation is centred around determing an algorithm that will best enhance the performance of the auto focus on a digital camera, it is extremely important to note the major factors that influence the auto focus time.
Low light conditions
Passive auto focus systems are based on the amount of contrast in a scene. As a result, the lighting of the scene plays a very important role in the focusing process. Most well lit scenes will provide enough contrast for accurate focusing. Dark scenes and scenes with repeated patterns are however the nemesis of contrast based focusing algorithms. The statistics provided by the auto focus module will therefore be inaccurate and this is a well known cause of the failure focus problem in most consumer level digital camera's. A 3.1 megapixel CMOS image sensor is used in this investigation. These sensors are appearing more and more in consumer digital camera's. While they are much cheaper to produce and design for, their performance in low light enviroments is much worse than their CCD counterparts. In addition to the fact that they have a higher noise ratio than CCD's, they produce fixed pattern noise in low light conditions that can be seen as dots or noisy lines in an image. They also require larger exposure times during image capture than CCD sensors.
Auto focus algorithm
As with most algorithms, in order to obtain optimum performance, they must be optimized for the specific application. The most flexible component of an embedded system is the software that runs the system. Once the design of the system is complete modifications to the software are the quickest, cheapest and therefore most convenient method to influence the performance of an embedded system. The auto focus algorithm used will therefore come under heavy scrutiny once the design is complete. It is for this reason that this investigation will focus on the analysis of the post production performance enhancement of the passive auto focus system on a digital camera.
The range of motion of the auto focus motor is a major hinderance to enforcing a low auto focus time. The digital camera must be well calibrated such that the range of motion of the motors for each zoom position is as small as possible while ensuring that the actual focusing of the image is accurate. The major factor in determining the range of motion of the focusing lens is the optical setup of the focusing lens module. While the more expensive professional and prosumer camera's will use glass lenses, the cheap consumer camera's tend to use plastic lenses which generally tend to increase the range of motion ot the focusing lens needed to obtain a fully focused image. While the choice of which lenses to use is made during the initial design of the camera, it's influence is profound and must therefore be noted.