function BV = getBV(A, c, d, scale)

nc = size(A,2);

BV = uint8(ones(c*c+c-1,d*d+d-1)*255);
for i=1:c
    for j = 1:d
        h = j*c+i-c;
        if (h<=nc)
            Ax = A(:,h)';
            BV((c+1)*i-c:(c+1)*i-1, (d+1)*j-d:(d+1)*j-1) = v2i(Ax, c, d);
        end
    end
end

BV = imresize(BV, scale);

for i=1:c-1
    BV(i*(c+1)*scale-scale+1, :) = 128;
    BV(i*(c+1)*scale, :) = 128;
end

for i=1:d-1
    BV(:, i*(d+1)*scale-scale+1) = 128;
    BV(:, i*(d+1)*scale) = 128;
end

figure; imshow(BV);