Inferring three-dimensional (3D) shape of real objects from visual information belongs to the main domain of the computer vision applications. Shape From Focus (SFF) is one of the passive methods that uses focus as a cue to infer the 3D structure of the object. In SFF, the objective is to find out the depth by measuring the distance of well-focused position of each object point from the camera lens. A sequence of images is acquired either by displacing the object in small steps or by changing the focal length of the lens in the camera. First, a focus measure, which is a criterion that can effectively measure the focus quality, is applied on each image pixel of the sequence. An initial depth map is obtained by maximizing the focus measure along the optical axis. In order to refine the initial depth estimate, different approximation and machine learning techniques have been used. In this book, various focus measures and SFF techniques based on machine learning approaches are discussed.