Disclosed is a stereo matching system and method using a dynamic programming scheme. The control circuit is provided with a microcontroller, a delivery circuit, a sensing circuit and a weld detect circuit. The phase shifted signals are mixed to obtain a error signal.