Continuous and Discrete Models for Phase-Based Stereo Vision