Optical tweezers have emerged as a powerful tool for micro- and nanomanipulation. Using optical tweezers to perform automated assembly requires on-line monitoring of components in the assembly workspace. This paper presents algorithms for estimating three-dimensional positions of microspheres in the assembly workspace. Algorithms presented in this paper use images obtained by optical section microscopy. The images are first segmented to locate areas of interest and then image gradient information from the areas of interest is used to locate the positions of individual micro spheres in the XY plane. Finally, signature curves are computed and utilized to obtain the Z locations of spheres. We have tested these algorithms with glass microspheres of two different sizes under different illumination conditions. Our experiments indicate that the algorithms described in this paper provide sufficient computational speed and accuracy to support the operation of optical tweezers.