%EUSIPCO 2012
%Imperial College London 
%Andriy Gelman, Jon Onativia and Pier Luigi Dragotti 

function input = change_view_location(input, disparity, input_location, wanted_location)

[r,c,k] = size(input);

for l = 1:k
    %total_shift = sign((wanted_location(l)-input_location(l))*disparity)*ceil(abs((wanted_location(l)-input_location(l))*disparity));
    total_shift = -(disparity(input_location(l)) - disparity(wanted_location(l)));
    input(:,:,l) = integer_shift(input(:,:,l), total_shift);
end

end