For the mountedprinted circuit board inspection, the inspection system is required to detect the 3-D position of the components. To detect the 3-D positions of components,a 3-D vision sensor with multiple CCD cameras has been introduced. The system executes the stereo image processing to measure the 3-D position of he objects. For the electric components, the expected position on he PCB boards can be defined. So, the method of stereo image processing is simplified. Only preparing a measuremen line on every component is enough to detect its position. To perform the stereo image processing on the line, Dynamic Programming can be applied to perform the stereo matching between the locally deformed two images. Introducing the DP method to the stereo matching,the experimental system has been proved its precise 3-D position detection ability.