Abstract
The technique to estimate the depth and 3D shape of an object from the images of the same sample obtained at different focus settings is called shape from focus (SFF). Conventional SFF methods sum up the focus values within a small window of each pixel in the image. It produces a surface distortion effect, and an inaccurate depth map is obtained. In this paper, a fast and accurate SFF method based on averaging filter is proposed. We suggest that instead of averaging focus values, averaging depth values produces more accurate depth map. The experimental results demonstrate the effectiveness and the efficiency of the proposed method in comparison to the conventional methods.