function MVF = calculateMVFpix(dQ, hbs, sr, lambda)

gridloc = zeros(1,1);
size_dQ = size(dQ); N = size_dQ(3);
MVF     = zeros(size_dQ(1), size_dQ(2), N-1, 2);


for tp = 2:N


    current  = dQ(:,:,tp);
    next     = dQ(:,:,tp-1);
    C        = double(current);
    NX       = double(next);

    % Determine the motion vector field (MVF) for one timestep
    marg = hbs+sr;

    % Go through all pixels
    for r = marg+1:size_dQ(1)-marg;
        for c = marg+1:size_dQ(2)-marg;
        
            loc = [r, c];
        
            % Cut a block from Current
            Cblock  = C( loc(1)-hbs:loc(1)+hbs, loc(2)-hbs:loc(2)+hbs );
        
            % Find a corresponding block in the Previous Frame and the Translation-vector    
            V = FindV(Cblock, loc, NX, sr, lambda);
       
            % Save this vector in MVF  
            MVF(r, c, tp-1, :) = V; 
        
        end
    end




end

















