Three-dimensional information of objects is advantageous and widely used in multimedia systems and applications. Shape form focus (SFF) is a passive optical technique that reconstructs 3D shape of an object using a sequence of images with varying focus settings. In this paper, we propose an optimization of the focus measure. First, Wiener filter is applied for noise reduction from the image sequence. At the second stage, genetic algorithm (GA) is applied for focus measure optimization. GA finds the maximum focus measurement under a fitness criterion. Finally, 3D shape of the object is determined by maximizing focus measure along the optical direction. The proposed method is tested with image sequences of simulated and real objects. The performance of the proposed technique is analyzed through statistical criteria such as root mean square error (RMSE) and correlation. Comparative analysis shows the effectiveness of the proposed method.