-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathremoveSmallIntensity.m
More file actions
26 lines (23 loc) · 1.01 KB
/
Copy pathremoveSmallIntensity.m
File metadata and controls
26 lines (23 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
% ----------------------------------------
% Copyright Clariant, CNRS, Université de Montpellier, IRD, EPHE
% Contributors: Abdel Aouacheria, Victor Racine
% Contacts : abdel.aouacheria@umontpellier.fr, victor.racine@quantacell.com
%
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License v3.0 only.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see https://spdx.org/licenses/GPL-3.0-only.html
% ----------------------------------------
function maskOut=removeSmallIntensity(mask, I, minInt)
R = regionprops(mask,I, 'MeanIntensity');
ind = find([R.MeanIntensity] > minInt);
maskOut = bwlabel(ismember(mask,ind));
end