An accurate system calibration method is presented in this paper to calibrate stereo deflectometry. A corresponding iterative optimization algorithm is also proposed to improve the system calibration accuracy. This merges CCD parameters and geometrical relation between CCDs and the LCD into one cost function. In this calibration technique, an optical flat acts as a reference mirror and simultaneously reflect sinusoidal fringe patterns into the two CCDs. The normal vector of the reference mirror is used as an intermediate variable to implement this iterative optimization algorithm until the root mean square of the reprojection errors converge to a minimum. The experiment demonstrates that this method can optimize all the calibration parameters and can effectively reduce reprojection error, which correspondingly improves the final reconstruction accuracy.