Globally consistent multi-label assignment on the ray space of 4D light fields