An iterative prediction and correction method for automatic stereocomparison