Parallax measurement and distance calculation