d(x,y)=d\[VerticalSeparator]C=(min_(d∈D))Cost(x,y,d)Where   D=[min_disp,max_disp]   is   the   range   of shift   used   in   step   1   and   2.