function img_final = compose_hud_all2(dir, no_hud, init, last)
    %hsv_correction = [-10/360 -0.1 -0.02];
    %hsv_correction = [-10/360 0 0];
    img_final = load_dds(sprintf('%s/%s', dir, no_hud));

    for i = init:last
        [img, a] = load_dds(sprintf('%s/draw_%d.dds', dir, i));
        a = repmat(a, 1, 1, 3);

        fprintf('Blending image %d\n', i);
        img_final = img_final .* (1-a) + img;
    end
    
    %img_final = cc(img_final, hsv_correction);

    %figure
    %imshow(img_final);
    imwrite(img_final, sprintf('%s/hud_final.png', dir));
    
    function img = cc(img, hsv_correction)
        img = rgb2hsv(img);
        img = bsxfun(@plus, img, reshape(hsv_correction, 1, 1, 3));
        img(:, :, 1) = wrap_num(img(:, :, 1), 0, 1);
        img = hsv2rgb(img);
    end
    
    function n = wrap_num(n, l, h)
        n = n - h * floor((n + l) / h);
    end
end