caculate distortion params with StereoConfig, clean up codes about resolution