Skip to content
Snippets Groups Projects
Commit fa3d2d8a authored by Marina Kreme's avatar Marina Kreme
Browse files

unnecessary file deletion

parent 8e796578
No related branches found
No related tags found
No related merge requests found
function mask = generate_mask_db(x_loc, x_wb, gamma, dgt, delta_mix_db, delta_loc_db,radius, or_mask)
%% GENERATE MASK
% mask = generate_mask_db(dgt_X_wb, dgt_X_loc, gain_mix_db, gain_loc_db,radius, or_mask)
% function that generates a binary mask
%
%%
signals = generate_mix_signal(x_wb, x_loc, gamma);
x_wb = signals.wideband;
x_loc = signals.localized;
tf_mat_loc_db = db(abs(dgt(x_loc)));
tf_mat_wb_db = db(abs(dgt(x_wb)));
mask_mix = tf_mat_loc_db > tf_mat_wb_db + delta_mix_db;
mask_loc = tf_mat_loc_db > max(tf_mat_loc_db(:)) - delta_loc_db;
if or_mask==1
mask_raw = or(mask_mix, mask_loc);
else
mask_raw = and(mask_mix, mask_loc);
end
%figure('name','init'); imagesc(mask)
%%
se = strel('disk',radius,0);
mask = mask_raw;
for k=1:10
%%
mask_close = imclose(mask,se);
%figure('name','imclose'); imagesc(mask)
%%
mask = imopen(mask_close,se);
%figure('name','imopen'); imagesc(mask)
end
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment