function [ vMY, vMU, vMV, vHoles ] = combineViewsPro( vLY, vLU, vLV, vRY, vRU, vRV, holesL, holesR, width, height, bfL )
%% Combining the two views
% The left virtaul view is enhanced from right virtual view by filling the
% missed information in left view from the right view.
vMY(height, width) = double(zeros);
vMU(height/2, width/2) = double(zeros);
vMV(height/2, width/2) = double(zeros);
vHoles(height, width) = zeros;

for i=1:height
    for j=1:width
        if holesR(i, j) && ~holesL(i, j)
            vMY(i, j) = vRY(i, j);
            vMU(round(i/2), round(j/2)) = vRU(round(i/2), round(j/2));
            vMV(round(i/2), round(j/2)) = vRV(round(i/2), round(j/2));
            vHoles(i, j) = 1;
        elseif ~holesR(i, j) && holesL(i, j)
            vMY(i, j) = vLY(i, j);
            vMU(round(i/2), round(j/2)) = vLU(round(i/2), round(j/2));
            vMV(round(i/2), round(j/2)) = vLV(round(i/2), round(j/2));
            vHoles(i, j) = 1;  
        elseif holesR(i, j) && holesL(i, j)
            vMY(i, j) = ((1-bfL)*vRY(i, j) + bfL*vLY(i, j));
            vMU(round(i/2), round(j/2)) = (vRU(round(i/2), round(j/2)) + vLU(round(i/2), round(j/2)))/2;
            vMV(round(i/2), round(j/2)) = (vRV(round(i/2), round(j/2)) + vLV(round(i/2), round(j/2)))/2;
            vHoles(i, j) = 1;
        else
%             This case will be handelled later (HoleFilling)
        end
    end
end
vMY = round(vMY);
vMU = round(vMU);
vMV = round(vMV);
end

