# factMethMask

Interprete the result of the factorization method to create a mask separating the obstacle from the background.

## Contents

- More About
- Code

## More About

It does not matter whether the object has a real or imaginary part. The factorization method detects it anyway.

## Code

    function res = factMethMask(seti,z)

    % highest = max(max(z));
    % lowest = min(min(z));
    % middle = mean([highest,lowest]);

    middleAll = mean(mean(z)); % too low..., but in case of sparsity OK.

    indx = (z>=middleAll*seti.facSepFac); % separate: make the decision: 0/1
    % S = z(indx);

    iG = @(x) x(:);
    res = logical(iG(indx)); % mask of the obstacle
    end