# factMethMaskInc

Increase the mask of the Factorization Method.

    function res = factMethMaskInc(seti,indx)
    indx = seti.G(indx);
    % Increase the mask
    indxNew = indx;
    n = max(1,round(seti.facMaskPer/100*seti.nROI)); % number of neighbor pixels
    np1 = n+1;
    for i = np1:size(indx,1)-np1 % (n+1):N-(n+1) instead of 1:N because we subtract or add n
        for j = np1:size(indx,2)-np1
            if indx(i,j) == 1
                indxNew(i-n:i+n,j-n:j+n) = 1;
            end
        end
    end
    indx = indxNew;
    iG = @(x) x(:);
    res = logical(iG(indx)); % mask of the obstacle
    end