1. A method of generating three-dimensional (3-D) information of a sample using an optical microscope, the method comprising: varying the distance between the sample and an objective lens of the optical microscope at pre-determined steps; capturing an image at each pre-determined step, wherein a first surface of the sample and a second surface of the sample are within a field of view of each of the captured images; determining a characteristic value of each pixel in each captured image; determining a first captured image that is focused on a first surface of the sample based on the characteristic value of each pixel in each captured image; determining a measurement of an opening in the first surface of the sample based on the first captured image; determining a second captured image that is focused on a second surface of the sample based on the characteristics of each pixel in each captured image; determining a measurement of an opening in the second surface of the sample based on the second captured image; and determining a distance between the first surface of the sample and the second surface of the sample, wherein the distance between the first surface of the sample and the second surface of the sample indicates the depth of the opening in the sample.