This paper aims to develop an automated optical inspection (AOI) system for 3D image reconstruction consisting of two line scan cameras, a single-axis motion platform driven by servo motor, and LED light sources. After completing the hardware device, in this paper, three disparity estimation algorithms such as block matching (BM), semi global block matching (SGBM), and graph cut (GC), are applied to the AOI system for comparing their performance. So we can choose the best one for the AOI system to reconstruct depth images. Next, this paper develops a graphical user interface (GUI) for users to manipulate the AOI system including control of the single-axis motion platform and line scan cameras, and parameters adjustment. Experimental results show that the proposed AOI system can reconstruct the depth image of a workpiece in just three seconds with average distortion rate 3%.